• Post Reply Bookmark Topic Watch Topic
  • New Topic

Jsp and Web.xml

 
hitu solanki
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to configur web.xml for using JSP.
What we can write in the web.xml file.
 
Arun Manivannan
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is no need for any entry in the web.xml for deployment of JSPs.. unless you are giving a different name i.e. accessing the JSP with a different URL. In the latter case, the configuration would be something like

<servlet>
<servlet-name>MyJSP</servlet-name>
</jsp-file>/MyOriginalCodedJSP.jsp</jsp-file>
</servlet>

</servlet-mapping>
<servlet-name>MyJSP</servlet-name>
<url-pattern>/AliasJSP.do</url-pattern>
</servlet-mapping>
 
Juanjo Bazan
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by hitu solanki:
What we can write in the web.xml file.


For a complete list of what you can use the web.xml for I recommend you to check the servlet specification. You can download it from java.sun.com download page.
The web.xml is described in the chapter 13 of the servlet 2.4 spec.
HTH
Juanjo Bazan
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!