Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mapping of web.xml for .jsp files  RSS feed

 
kengyiam Ng
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Recently, I had upload my applications(Servlets and Jsp) and web.xml which I developed in tomcat 3 to an apache server hosted by a company.
What the administrator told me was I had to name or map all my .jsp files in my web.xml file inorder to view the .jsp files.
What I knew before was mapping of servlets in web.xml but not any .jsp files.
Please kindly advise me on how the code like when mapping .jsp files on the web.xml file.
Thanks alot.
Warmest regards,
Keng Yiam
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What the administrator told me was I had to name or map all my .jsp files in my web.xml file inorder to view the .jsp files.

This is not required. To map use jsp-file in place of servlet-class tag.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the Servlet mapping, if you want a certain URL be handled by a particular JSP, you can create such mapping.
Otherwise, the JSP can be directly accessed via the browser.
Nick.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only thing that is required is to have Apache configured to route requests for JSP files to Tomcat.
Tomcat will then happily process the requests and send the generated HTML back to the client through Apache.
This configuration is definitely HIS responsibility and not yours!
If he refuses he's lazy, incompetent or both and you should escalate the issue to your superior to get action taken by his superior.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!