RE: web.xml not working

2001-06-27 Thread Stefan Neumann

give that one a try:

/story/*

using SERVERNAME/sampleapp/story



-Original Message-
From: Erin Lester [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 26. Juni 2001 16:25
To: [EMAIL PROTECTED]
Subject: web.xml not working


I have created a web application as per the Servlet API specs and deployed
it into the webapps directory of Tomcat in a directory called 'sampleapp.'

The only way that I am able to access the webapp's servlet (which is in
sampleapp/WEB-INF/classes) is by the url
'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and this is only when I
don't have a web.xml file in the WEB-INF directory.  When I place the
web.xml file that I created (using to the documents on the Sun and
Jakarta sites) I am unable to find my servlet.

The servlet mapping in the web.xml file looks like this:


StoryGeneratorServlet 
StoryGenerator 



StoryGeneratorServlet 
/story 


I tried using the urls 'SERVERNAME/sampleapp/servlet/story' and
'SERVERNAME/sampleapp/story'

I also tried to install the J2EE sample 'petstore' web application but had
problems accessing the servlets with it too.  I am able to get to the jsps
and static files okay.

Does anyone know what I am doing wrong? 

Thanks!
Erin

PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7



Re: web.xml not working

2001-06-26 Thread Charles Baker

Okay, that sample was just what I had modified/copied
from the web.xml that was supplied w/ TomCat.
--- Erin Lester <[EMAIL PROTECTED]>
wrote:
> Thanks for the suggestion, but I don't think that's
> it.  According to the
> Java Servlet Spec. v2.2 (ch. 13, pg 65),
> servlet-mapping isn't contained
> within the servlet element, but is a seperate
> element.  
> 
> In my original post I said I couldn't have a web.xml
> file in my
> application.  That was incorrect, I am able to have
> a web.xml file, but
> the servlet mappings in it aren't working.
> 
> To clarify, my servlet isn't in a package.
> 
> - Erin
> 
> On Tue, 26 Jun 2001, Charles Baker wrote:
> 
> >Here is a servlet definition from my web.xml file:
> >
> >
> >
> >Login
> >
> >
> >com.beeslender.servlets.LoginServlet
> >
> >
> >
> >Login
> >
> >
> >/Login
> >
> >
> >
> >
> >Notice that  is a child of
> .
> >Also, did you create your servlets as part of a
> >package? If so, you need a directory structure
> under
> >$TOMCAT_HOME/sampleapp/WEB-INF/classes that matches
> >your package. For example, 
> >
>
>$TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets
> >
> >That's where the *.class files would go.
> >
> >--- Erin Lester
> <[EMAIL PROTECTED]>
> >wrote:
> >> I have created a web application as per the
> Servlet
> >> API specs and deployed
> >> it into the webapps directory of Tomcat in a
> >> directory called 'sampleapp.'
> >> 
> >> The only way that I am able to access the
> webapp's
> >> servlet (which is in
> >> sampleapp/WEB-INF/classes) is by the url
> >> 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and
> >> this is only when I
> >> don't have a web.xml file in the WEB-INF
> directory. 
> >> When I place the
> >> web.xml file that I created (using to the
> documents
> >> on the Sun and
> >> Jakarta sites) I am unable to find my servlet.
> >> 
> >> The servlet mapping in the web.xml file looks
> like
> >> this:
> >> 
> >>
> >>
> StoryGeneratorServlet
> >> 
> >>StoryGenerator 
> >>
> >> 
> >>
> >>
> StoryGeneratorServlet
> >> 
> >>/story 
> >>
> >> 
> >> I tried using the urls
> >> 'SERVERNAME/sampleapp/servlet/story' and
> >> 'SERVERNAME/sampleapp/story'
> >> 
> >> I also tried to install the J2EE sample
> 'petstore'
> >> web application but had
> >> problems accessing the servlets with it too.  I
> am
> >> able to get to the jsps
> >> and static files okay.
> >> 
> >> Does anyone know what I am doing wrong? 
> >> 
> >> Thanks!
> >> Erin
> >> 
> >> PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun
> 2.7
> >> 
> >
> >
> >=
> >-
> >[EMAIL PROTECTED]
> >Hacking is a "Good Thing!"
> >See
> http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> >
> >__
> >Do You Yahoo!?
> >Get personalized email addresses from Yahoo! Mail
> >http://personal.mail.yahoo.com/
> >
> 


=
-
[EMAIL PROTECTED]
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: web.xml not working

2001-06-26 Thread Charles Baker

That was my web.xml for Erin to use as an example.
Mine works just fine btw.

--- Krishna Muthyala <[EMAIL PROTECTED]> wrote:
> Eric
> 
> If you deploy your servlets using a web.xml then you
> should have your servlets properly packaged. so in
> your case you need to package your servlets as
> 
> com.beeslender.servlets.LoginServlet
> 
> package com.beelender.servlets; at the top of your
> Login Servlet and then you should map your web.xml
> in
> the following way
> 
> 
> 
> LoginServlet
>
com.beeslender.servlets.LoginServlet
> 
> 
> 
>   LoginServlet
> 
>
>  /com/beeslender/servlets/LoginServlet/*
>
>  
> 
> 
> 
> 
> 
> 
> 
> in your server.xml also you need to specify as
> followd
> 
> 
>   crossContext="false" debug="0" 
> reloadable="true"
> > 
>
>   
>docBase="webapps/com/beeslender" 
>  crossContext="false" debug="0" 
> reloadable="true"
> > 
>
>   
>docBase="webapps/com/beeslender/servlets" 
>  crossContext="false" debug="0" 
> reloadable="true"
> > 
>
> 
> 
> 
> you want to make your servlets work, package them
> and
> deploy them as above, ok
> 
> Kris
> --- Erin Lester <[EMAIL PROTECTED]>
> wrote:
> > Thanks for the suggestion, but I don't think
> that's
> > it.  According to the
> > Java Servlet Spec. v2.2 (ch. 13, pg 65),
> > servlet-mapping isn't contained
> > within the servlet element, but is a seperate
> > element.  
> > 
> > In my original post I said I couldn't have a
> web.xml
> > file in my
> > application.  That was incorrect, I am able to
> have
> > a web.xml file, but
> > the servlet mappings in it aren't working.
> > 
> > To clarify, my servlet isn't in a package.
> > 
> > - Erin
> > 
> > On Tue, 26 Jun 2001, Charles Baker wrote:
> > 
> > >Here is a servlet definition from my web.xml
> file:
> > >
> > >
> > >
> > >Login
> > >
> > >
> > >com.beeslender.servlets.LoginServlet
> > >
> > >
> > >
> > >Login
> > >
> > >
> > >/Login
> > >
> > >
> > >
> > >
> > >Notice that  is a child of
> > .
> > >Also, did you create your servlets as part of a
> > >package? If so, you need a directory structure
> > under
> > >$TOMCAT_HOME/sampleapp/WEB-INF/classes that
> matches
> > >your package. For example, 
> > >
> >
>
>$TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets
> > >
> > >That's where the *.class files would go.
> > >
> > >--- Erin Lester
> > <[EMAIL PROTECTED]>
> > >wrote:
> > >> I have created a web application as per the
> > Servlet
> > >> API specs and deployed
> > >> it into the webapps directory of Tomcat in a
> > >> directory called 'sampleapp.'
> > >> 
> > >> The only way that I am able to access the
> > webapp's
> > >> servlet (which is in
> > >> sampleapp/WEB-INF/classes) is by the url
> > >> 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME'
> and
> > >> this is only when I
> > >> don't have a web.xml file in the WEB-INF
> > directory. 
> > >> When I place the
> > >> web.xml file that I created (using to the
> > documents
> > >> on the Sun and
> > >> Jakarta sites) I am unable to find my servlet.
> > >> 
> > >> The servlet mapping in the web.xml file looks
> > like
> > >> this:
> > >> 
> > >>  
> > >>  
> > StoryGeneratorServlet
> > >> 
> > >>  StoryGenerator
> 
> > >>  
> > >> 
> > >>  
> > >>  
> > StoryGeneratorServlet
> > >> 
> > >>  /story 
> > >>  
> > >> 
> > >> I tried using the urls
> > >> 'SERVERNAME/sampleapp/servlet/story' and
> > >> 'SERVERNAME/sampleapp/story'
> > >> 
> > >> I also tried to install the J2EE sample
> > 'petstore'
> > >> web application but had
> > >> problems accessing the servlets with it too.  I
> > am
> > >> able to get to the jsps
> > >> and static files okay.
> > >> 
> > >> Does anyone know what I am doing wrong? 
> > >> 
> > >> Thanks!
> > >> Erin
> > >> 
> > >> PS - I'm using Tomcat 3.2 with Apache 1.3 on
> Sun
> > 2.7
> > >> 
> > >
> > >
> > >=
> > >-
> > >[EMAIL PROTECTED]
> > >Hacking is a "Good Thing!"
> > >See
> > http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> > >
> >
> >__
> > >Do You Yahoo!?
> > >Get personalized email addresses from Yahoo! Mail
> > >http://personal.mail.yahoo.com/
> > >
> 
=== message truncated ===


=
-
[EMAIL PROTECTED]
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: web.xml not working

2001-06-26 Thread Krishna Muthyala

Eric

If you deploy your servlets using a web.xml then you
should have your servlets properly packaged. so in
your case you need to package your servlets as

com.beeslender.servlets.LoginServlet

package com.beelender.servlets; at the top of your
Login Servlet and then you should map your web.xml in
the following way



LoginServlet
com.beeslender.servlets.LoginServlet



LoginServlet

   
 /com/beeslender/servlets/LoginServlet/*
   
 







in your server.xml also you need to specify as followd


 
 

 
 

 
 



you want to make your servlets work, package them and
deploy them as above, ok

Kris
--- Erin Lester <[EMAIL PROTECTED]>
wrote:
> Thanks for the suggestion, but I don't think that's
> it.  According to the
> Java Servlet Spec. v2.2 (ch. 13, pg 65),
> servlet-mapping isn't contained
> within the servlet element, but is a seperate
> element.  
> 
> In my original post I said I couldn't have a web.xml
> file in my
> application.  That was incorrect, I am able to have
> a web.xml file, but
> the servlet mappings in it aren't working.
> 
> To clarify, my servlet isn't in a package.
> 
> - Erin
> 
> On Tue, 26 Jun 2001, Charles Baker wrote:
> 
> >Here is a servlet definition from my web.xml file:
> >
> >
> >
> >Login
> >
> >
> >com.beeslender.servlets.LoginServlet
> >
> >
> >
> >Login
> >
> >
> >/Login
> >
> >
> >
> >
> >Notice that  is a child of
> .
> >Also, did you create your servlets as part of a
> >package? If so, you need a directory structure
> under
> >$TOMCAT_HOME/sampleapp/WEB-INF/classes that matches
> >your package. For example, 
> >
>
>$TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets
> >
> >That's where the *.class files would go.
> >
> >--- Erin Lester
> <[EMAIL PROTECTED]>
> >wrote:
> >> I have created a web application as per the
> Servlet
> >> API specs and deployed
> >> it into the webapps directory of Tomcat in a
> >> directory called 'sampleapp.'
> >> 
> >> The only way that I am able to access the
> webapp's
> >> servlet (which is in
> >> sampleapp/WEB-INF/classes) is by the url
> >> 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and
> >> this is only when I
> >> don't have a web.xml file in the WEB-INF
> directory. 
> >> When I place the
> >> web.xml file that I created (using to the
> documents
> >> on the Sun and
> >> Jakarta sites) I am unable to find my servlet.
> >> 
> >> The servlet mapping in the web.xml file looks
> like
> >> this:
> >> 
> >>
> >>
> StoryGeneratorServlet
> >> 
> >>StoryGenerator 
> >>
> >> 
> >>
> >>
> StoryGeneratorServlet
> >> 
> >>/story 
> >>
> >> 
> >> I tried using the urls
> >> 'SERVERNAME/sampleapp/servlet/story' and
> >> 'SERVERNAME/sampleapp/story'
> >> 
> >> I also tried to install the J2EE sample
> 'petstore'
> >> web application but had
> >> problems accessing the servlets with it too.  I
> am
> >> able to get to the jsps
> >> and static files okay.
> >> 
> >> Does anyone know what I am doing wrong? 
> >> 
> >> Thanks!
> >> Erin
> >> 
> >> PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun
> 2.7
> >> 
> >
> >
> >=
> >-
> >[EMAIL PROTECTED]
> >Hacking is a "Good Thing!"
> >See
> http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> >
> >__
> >Do You Yahoo!?
> >Get personalized email addresses from Yahoo! Mail
> >http://personal.mail.yahoo.com/
> >
> 


__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/



Re: web.xml not working

2001-06-26 Thread Erin Lester

Thanks for the suggestion, but I don't think that's it.  According to the
Java Servlet Spec. v2.2 (ch. 13, pg 65), servlet-mapping isn't contained
within the servlet element, but is a seperate element.  

In my original post I said I couldn't have a web.xml file in my
application.  That was incorrect, I am able to have a web.xml file, but
the servlet mappings in it aren't working.

To clarify, my servlet isn't in a package.

- Erin

On Tue, 26 Jun 2001, Charles Baker wrote:

>Here is a servlet definition from my web.xml file:
>
>
>
>Login
>
>
>com.beeslender.servlets.LoginServlet
>
>
>
>Login
>
>
>/Login
>
>
>
>
>Notice that  is a child of .
>Also, did you create your servlets as part of a
>package? If so, you need a directory structure under
>$TOMCAT_HOME/sampleapp/WEB-INF/classes that matches
>your package. For example, 
>
>$TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets
>
>That's where the *.class files would go.
>
>--- Erin Lester <[EMAIL PROTECTED]>
>wrote:
>> I have created a web application as per the Servlet
>> API specs and deployed
>> it into the webapps directory of Tomcat in a
>> directory called 'sampleapp.'
>> 
>> The only way that I am able to access the webapp's
>> servlet (which is in
>> sampleapp/WEB-INF/classes) is by the url
>> 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and
>> this is only when I
>> don't have a web.xml file in the WEB-INF directory. 
>> When I place the
>> web.xml file that I created (using to the documents
>> on the Sun and
>> Jakarta sites) I am unable to find my servlet.
>> 
>> The servlet mapping in the web.xml file looks like
>> this:
>> 
>>  
>>  StoryGeneratorServlet
>> 
>>  StoryGenerator 
>>  
>> 
>>  
>>  StoryGeneratorServlet
>> 
>>  /story 
>>  
>> 
>> I tried using the urls
>> 'SERVERNAME/sampleapp/servlet/story' and
>> 'SERVERNAME/sampleapp/story'
>> 
>> I also tried to install the J2EE sample 'petstore'
>> web application but had
>> problems accessing the servlets with it too.  I am
>> able to get to the jsps
>> and static files okay.
>> 
>> Does anyone know what I am doing wrong? 
>> 
>> Thanks!
>> Erin
>> 
>> PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7
>> 
>
>
>=
>-
>[EMAIL PROTECTED]
>Hacking is a "Good Thing!"
>See http://www.tuxedo.org/~esr/faqs/hacker-howto.html
>
>__
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail
>http://personal.mail.yahoo.com/
>




Re: web.xml not working

2001-06-26 Thread Charles Baker

Here is a servlet definition from my web.xml file:



Login


com.beeslender.servlets.LoginServlet



Login


/Login




Notice that  is a child of .
Also, did you create your servlets as part of a
package? If so, you need a directory structure under
$TOMCAT_HOME/sampleapp/WEB-INF/classes that matches
your package. For example, 

$TOMCAT_HOME/sampleapp/WEB-INF/classes/com/beeslender/servlets

That's where the *.class files would go.

--- Erin Lester <[EMAIL PROTECTED]>
wrote:
> I have created a web application as per the Servlet
> API specs and deployed
> it into the webapps directory of Tomcat in a
> directory called 'sampleapp.'
> 
> The only way that I am able to access the webapp's
> servlet (which is in
> sampleapp/WEB-INF/classes) is by the url
> 'SERVERADDRESS/sampleapp/servlet/SERVLETNAME' and
> this is only when I
> don't have a web.xml file in the WEB-INF directory. 
> When I place the
> web.xml file that I created (using to the documents
> on the Sun and
> Jakarta sites) I am unable to find my servlet.
> 
> The servlet mapping in the web.xml file looks like
> this:
> 
>   
>   StoryGeneratorServlet
> 
>   StoryGenerator 
>   
> 
>   
>   StoryGeneratorServlet
> 
>   /story 
>   
> 
> I tried using the urls
> 'SERVERNAME/sampleapp/servlet/story' and
> 'SERVERNAME/sampleapp/story'
> 
> I also tried to install the J2EE sample 'petstore'
> web application but had
> problems accessing the servlets with it too.  I am
> able to get to the jsps
> and static files okay.
> 
> Does anyone know what I am doing wrong? 
> 
> Thanks!
> Erin
> 
> PS - I'm using Tomcat 3.2 with Apache 1.3 on Sun 2.7
> 


=
-
[EMAIL PROTECTED]
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/