tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Labanowski <...@osc.edu>
Subject Re: newbie servlet deploy question
Date Fri, 02 Mar 2001 02:58:00 GMT
You may want to read about servlet URLs ramapping in my
   http://www.ccl.net/cca/software/UNIX/apache/tomcatfaq.shtml
Howver, I am not sure it will gonna work...
You can have it remapped to http://localhost:8080/demo/demo
but what you want is to have null path in the context to correspond
to your servlet... You probably still do not know what you want {:-)}.
But it will come with a sacrifice of reading stuff on Tomcat, the 
Servlet 2.1 spec and JSP 1.1 spec on the JavaSun. It is all in there...

 <servlet>
   <servlet-name>DemoServletto</servlet-name>
   <servlet-class>org.demo.DemoServlet</servlet-class>
 </servlet>
 
 <servlet-mapping>
   <servlet-name>DemoServletto</servlet-name>
   <url-pattern>demo</url-pattern>
 </servlet-mapping>

You may want to add

 <servlet-mapping>
   <servlet-name>DemoServletto</servlet-name>
   <url-pattern>/</url-pattern>
 </servlet-mapping>

and see if this will work for  
   http://localhost:8080/demo
But again... You only think you want it... But in fact you do not want it.

On Thu, 1 Mar 2001, Jason Novotny wrote:

> 
> I would like to be able to access a servlet with the URL
> http://localhost:8080/demo
> 
> However, it only works if I go to
> http://localhost:8080/demo/servlet/demo
> 
>     I have the following in server.xml and web.xml respectively:
> 
> <Context path="/demo"
>                  docBase="webapps/demo"
>                  crossContext="true"
>                  debug="0"
>                  reloadable="true"
>                  trusted="false" >
>         </Context>
> 
> BTW, should I comment out or use the following in some way?
> <RequestInterceptor
>             className="org.apache.tomcat.request.InvokerInterceptor"
>             debug="0" prefix="/servlet/" />
> 
> 
> My web.xml in webapps/demo/WEB_INF/web.xml has the following:
> 
> <servlet>
>       <servlet-name>demo</servlet-name>
>       <servlet-class>org.demo.DemoServlet</servlet-class>
>     </servlet>
> 
> <servlet-mapping>
>       <servlet-name>demo</servlet-name>
>       <url-pattern>/demo</url-pattern>
>     </servlet-mapping>
> 
> So I would like to be able to use <form action="/demo">  and have the
> servlet invoked.
> 
> 
>     Thanks very much, Jason
> 
> 
> 
> 
> --
> Jason Novotny               novotny@george.lbl.gov
> Home: (510) 704-9917        Work: (510) 486-8662
> NERSC Distributed Computing http://www-didc.lbl.gov
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-user-help@jakarta.apache.org
> 

Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
Ohio Supercomputer Center    |    Internet: jkl@osc.edu 
1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
Columbus, OH 43212-1163      |    http://www.osc.edu/


Mime
View raw message