Thanks, Jan

    I actually read your great document plus all the docs in Tomcat- actually
I'm trying to design a web app very much like the one in chapter 9 of the
kolb and fields book.

The idea is to have a central controller servlet- DemoServlet that gets
invoked initially by the user. I was hoping to use localhost:8080/demo, but
as you say, it doesn't seem setup for this. (although in the chapter they
claim on page 275 to have mapped FaqAdminServlet to /faqtool- later they use
<form action="/faqtool" ...> to reinvoke the controller servlet)- which is
very much what I want to do-

    In your opinion is it easier in the long run to map onto /demo/demo?

    Ultimately, I want to be able to invoke the servlet and refer to html,jsp
without caring where the web app was deployed or site specific settings of
server.xml.

    Thanks, Jason


Jan Labanowski wrote:

> 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               [EMAIL PROTECTED]
> > Home: (510) 704-9917        Work: (510) 486-8662
> > NERSC Distributed Computing http://www-didc.lbl.gov
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
> Jan K. Labanowski            |    phone: 614-292-9279,  FAX: 614-292-7168
> Ohio Supercomputer Center    |    Internet: [EMAIL PROTECTED]
> 1224 Kinnear Rd,             |    http://www.ccl.net/chemistry.html
> Columbus, OH 43212-1163      |   http://www.osc.edu/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]

--
Jason Novotny               [EMAIL PROTECTED]
Home: (510) 704-9917        Work: (510) 486-8662
NERSC Distributed Computing http://www-didc.lbl.gov




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to