Jump to content

[Solved] Please Restart Tomcat Server.


vaninf

Recommended Posts

It has nothing to do with .war file, I didn't create .war file. I uploaded the servlet class files and web.xml into /home/vaninf/public_html/WEB-INF/ folder by myself, I accessed http://vaninf.heliohost.org/index.htm

to invoke the servlet because index.htm is mapped to the servlet. The server shows "The requested URL /index.htm

was not found on this server."

 

I think this is caused by Apache http server, it must have been configured to pass only .jsp file requests to Tomcat server, so

all other file requests are blocked by Apache http server, they can't reach Tomcat server. So the servlet mapping defined in

web.xml are not used when we access http://vaninf.heliohost.org/index.htm, because index.htm is not .jsp file name.

 

Am I right?

Link to comment
Share on other sites

Yes, Apache is much better at serving html files. Tomcat handles .jsp etc.

 

It has nothing to do with .war file, I didn't create .war file.

Why do you keep requesting for them to be deployed then? http://www.helionet.org/index/topic/28363-please-deploy-my-war-file/ http://www.helionet.org/index/topic/28339-please-deploy-my-war-file/ http://www.helionet.org/index/topic/28326-please-deploy-my-war-file/ ?
Link to comment
Share on other sites

To prove you and I are correct, I have changed the servlet mapping in web.xml, now the servlets

are mapped to .jsp file names. I have uploaded web.xml again. To let the new web.xml take effect,

Tomcat server should be restarted. Could you please restart Tomcat server? Thanks

Link to comment
Share on other sites

The deployed war files don't work as expected because request.getServerName(), request.getServerPort()

and request.getContextPath() return wrong values. My web application won't work if I deploy it this way.



The new servlet mapping defined in web.xml still doesn't work. Could you please find out why?



The new servlet mapping defined in web.xml still doesn't work. Could you please find out why?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...