cbarnes wrote: > I posted this query to the Tomcat mailing list but couldn't get an answer to > my question. > Can anyone here help? > I am using Tomcat 4 by the way. > > In web.xml I have added a servlet mapping so that the servlet can take extra > path information as follows: > > <servlet-mapping> > <servlet-name>myservlet</servlet-name> > <url-pattern>/myservlet/*</url-pattern> > </servlet-mapping> > > Is it possible to do something similar with JSPs - and if so how and where > do I configure this? > I would like to be able to use a URL such as > http://server/application/mypage.jsp/extra/path/info
Sorry, but the servlet spec does not allow a path that is mapped to an extension (*.jsp) to include additional path info. I believe some container allows it, but relying on that behavior is not portable. You're only option for embedding extra information in a JSP path is to use a query string: http://server/application/mypage.jsp?extra=myinfo If the extra info is a path (a string with slashes), you must URL encode it. Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com