You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by PG...@aol.com on 2005/03/17 13:05:12 UTC

web.xml

Hi there,
i think this is a fairly easy thing to do, but i'm a newbie to  tomcat & jsp.
 
I am requesting the following url
_http://localhost:8081/webReg.jsp_ (http://localhost:8081/webReg.jsp)   which 
exists and dsiplays fine.  However, i want to be able to request 
_http://localhost:8081/webReg_ (http://localhost:8081/webReg)  and for  tomcat to display 
_http://localhost:8081/webReg.jsp_ (http://localhost:8081/webReg.jsp) .
 

What do i need to add in web.xml?
 

Re: web.xml

Posted by Omar Adobati <om...@gmail.com>.
you have to use the servlet mapping, something like this (each for
every mapping you need)
==
 <servlet>
    <servlet-name>myOwnJSPPage</servlet-name>
    <display-name>myOwnJSPPage</display-name>
    <description>my own servlet called: myOwnJSPPage</description>
    <jsp-file>/myJSP.jsp</jsp-file>
  </servlet>
  
  <servlet-mapping>
    <servlet-name>myOwnJSPPage</servlet-name>
    <url-pattern>/myJSP</url-pattern>
  </servlet-mapping>
==

On Thu, 17 Mar 2005 07:05:12 EST, PGibbonsX@aol.com <PG...@aol.com> wrote:
> Hi there,
> i think this is a fairly easy thing to do, but i'm a newbie to  tomcat & jsp.
> 
> I am requesting the following url
> _http://localhost:8081/webReg.jsp_ (http://localhost:8081/webReg.jsp)   which
> exists and dsiplays fine.  However, i want to be able to request
> _http://localhost:8081/webReg_ (http://localhost:8081/webReg)  and for  tomcat to display
> _http://localhost:8081/webReg.jsp_ (http://localhost:8081/webReg.jsp) .
> 
> What do i need to add in web.xml?
> 
> 


-- 
Adobati Omar
omar.adobati@gmail.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: web.xml

Posted by Markus Schönhaber <ma...@schoenhaber.de>.
Am Donnerstag, 17. März 2005 13:05 schrieb PGibbonsX@aol.com:
> I am requesting the following url
> _http://localhost:8081/webReg.jsp_ (http://localhost:8081/webReg.jsp)  
> which exists and dsiplays fine.  However, i want to be able to request
> _http://localhost:8081/webReg_ (http://localhost:8081/webReg)  and for 
> tomcat to display _http://localhost:8081/webReg.jsp_
> (http://localhost:8081/webReg.jsp) .
>
>
> What do i need to add in web.xml?

Add
<welcome-file>webReg.jsp</welcome-file>
to the
<welcome-file-list>-Element of web.xml.

Regards
mks

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org