rakesh73 Posted March 20, 2018 Posted March 20, 2018 Hello, username: rakesh73war name home.warrequest: undeploy Thanks to your free hosting, I have been able to deploy my first servlet using cPanel. Please could you undeploy the home.war I would like to deploy another war file after home.war is undeployed. Please let me know how to undeploy war files from cPanel. Where can I find tomcat logs for my instance. Thanks
Luigi123 Posted March 20, 2018 Posted March 20, 2018 This support request is being escalated to our root admin.
wolstech Posted March 21, 2018 Posted March 21, 2018 There is no need to request a WAR file be undeployed. When we deploy your new one, your old one will undeploy on its own so it can be replaced. Just let us know what the new one is called and I'll deploy it for you
rakesh73 Posted March 21, 2018 Author Posted March 21, 2018 Thanks for the info. I have deployed a new war file using cPanel. I am facing two issues described below: 1. The servlet path It is not available securely. The servlets are accessible on http:// On trying to access by https:// I get a 404 error. I was expecting the servlets to be available on a secure path just like jsp files. This could cause security issues for example if I try to send login information to a servlet, I should be sending over a secured path. 2. I set some relative paths for static resources like javascript and css files using httpServletRequest.getContextPath().My application url is <my-domain>/blog, but the httpServletRequest.getContextPath() returns a contextPath /rakesh73_blog This makes setting the relative paths very difficult. The httpServletRequest.getContextPath() should return contextPath "/blog" as visible in the last part of the application url.<my-domain>/blog Thanks
rakesh73 Posted March 21, 2018 Author Posted March 21, 2018 I just realized this topic is marked as SOLVED, so I am posting my last query in a new topic
wolstech Posted March 21, 2018 Posted March 21, 2018 I'll answer here since you posted it. For #1, we don't support HTTPS for Java by default because it uses a lot of resources and means your account would up 2 Java slots instead of one if supported both HTTP and HTTPS. It can be enabled for you, but regular HTTP won't work anymore if you want us to do this. For #2, this is a limitation of how we handle WAR files. It occurs because we deploy into a username prefixed folder. If we didn't, nobody else on the server would be able to have a WAR called "blog". We recommend naming your WAR file with the username_ in front of it (e.g username_blog) so the deployment path and the URL are the same. There is no fix other than to either rename the WAR, or develop your code to make the assumption that the username will appear in front when searching for its files.
rakesh73 Posted March 22, 2018 Author Posted March 22, 2018 Thanks for your reply. Please enable HTTPS for java for my account. If possible, I do not want regular HTTP requests should be routed to my HTTPS path. Thanks,Rakesh
wolstech Posted March 22, 2018 Posted March 22, 2018 I will leave this open for Krydos to see. He's the one who handles advanced requests such as this. Please be advised that Krydos has been busy with non-HelioHost stuff lately, so your request may take several days to be completed. We're all volunteers who don't receive any sort of pay for what we do here, so we all have a life and job to tend to as well
rakesh73 Posted March 25, 2018 Author Posted March 25, 2018 Thanks for enabling https for my servlets. I am facing a new issue now. I am unable to login to my application after successful authentication. I have a login page that accepts my user name and password.After successful, the response is redirected to home page. The home page checks if user is authenticated. If not, the response is redirected to login page. I user is authenticated, the home page is displayed In my case after login, the user is redirected to home page after successful login. The home page does not find the user authenticated and the redirects back to login page. Are cookies enabled for my app. I am using using Spring framework's WebSecurityConfigurerAdapter for authentication which I believe uses cookies for session handling between requests. Thanks
Krydos Posted March 25, 2018 Posted March 25, 2018 Try naming your .war rakesh73_blog.war and deploy that. Some users have had issues with cookies when the system appends your username to the front of the file.
rakesh73 Posted March 26, 2018 Author Posted March 26, 2018 I have deployed rakesh73_blog.war but it is getting deployed at <my_domain>/blog. Please can you fix this so my servlet path is <my_domain>/rakesh73_blog Also I have https enabled for my servlets but it seems servlets paths can invoked both from http and https. I was hoping all http requests would get routed to https on the server side automatically. Thanks
Recommended Posts