Oz Kologlu wrote:

> We are currently looking for a "Servlet/JSP implementation version
> independant" way of accessing our web site so that it is as portable as
> possible between servers.
>
> So far we have been developing under JSWDK and we have run into a little
> grief with paths converting to Tomcat, mostly because of the difference
> between JSWDK's implementation of the servlet path (eg."/servlet/classname")
> and Tomcat's ("/context/servlet/classname"), and their relative JSP paths.
>

If you use the default context, then "/servlet/classname" will work in both JSWDK
and Tomcat because the context path is (essentially) a zero-length string ("").

>
> With Tomcat still a while off being a serious contender we don't really want
> place our eggs in that basket, but want to be able to move to a JSP 1.1 /
> Servlet 2.2 server quickly when the time is right.
>
> Does anyone know how best to path JSPs/Servlets independant of the
> specification version.
>

Besides the above suggestion, I would look at mapping servlets to explicit paths
(or filename extensions) instead of using the "/servlet/xxxxx" approach.  Then,
you don't have to be dependent on your servlet engine mapping "/servlet" to the
invoker (this is common but not mandated by the specification).  In addition,
either mapping lets you use relative paths that make your app independent of
whatever the context path is.

>
> Thanks
> Oz
>

Craig McClanahan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to