Re: Servlet mapping - url pattern with *

2005-08-01 Thread flower

Bill Barker wrote:

"flower" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
 


Hello,

Let's consider situation like this:
We have got some servlets responsible for genereting galery page. We want 
group galery pages by use common part in uri (/galery/):

http://x.com/galery/galery_id/firstpage.html
http://x.com/galery/galery_id/secondpage.html

firstpage.html is generated by servlet1 , secondpage.html by servlet2.

So we must url-pattern like this: /galery/*/firstpage.html and 
/galery/*/secondpage.html but this url-pattern doesn't work.

question: why ? ( I use version 5.5.9 )

Some people, with I was talking about this, said that patterns like this 
was work with previously version and that version 5.5.9 is "crazy" ;]


I've got a vague recollection that some some such Tomcat-specific extension 
was proposed on the dev list.  Can't remember if it was ever implemented 
(and to which version), and I'm much to lazy to look it up :).  However, the 
5.5.9 behavior is in strict compilance with the Servlet spec (and, hence 
anything but "crazy").
 


mhm, when some time ago I was reading Servlet spec, I noticed that.


Is any way to obtain behaviour like above with latest version ?


Simplest is with a Filter that does something like:
  RequestDispatcher rd = null;
  if(request.getRequestURI().endsWith("/firstpage.html") {
  rd = getServletContext().getNamedDispatcher("servlet1");
  } else if(request.getRequestURI().endsWith("/secondpage.html");
  rd = getServletContext().getNamedDispatcher("servlet2");
  }
  if(rd != null) {
 rd.forward(request, response);
  }
 


thx for example :)
I was thinking about somethings like this ... but my lazy force me to 
looking buildin solution :)


thx and greetings
flow


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



Re: Servlet mapping - url pattern with *

2005-08-01 Thread Bill Barker

"flower" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> Hello,
>
> Let's consider situation like this:
> We have got some servlets responsible for genereting galery page. We want 
> group galery pages by use common part in uri (/galery/):
> http://x.com/galery/galery_id/firstpage.html
> http://x.com/galery/galery_id/secondpage.html
>
> firstpage.html is generated by servlet1 , secondpage.html by servlet2.
>
> So we must url-pattern like this: /galery/*/firstpage.html and 
> /galery/*/secondpage.html but this url-pattern doesn't work.
> question: why ? ( I use version 5.5.9 )
>
> Some people, with I was talking about this, said that patterns like this 
> was work with previously version and that version 5.5.9 is "crazy" ;]
>

I've got a vague recollection that some some such Tomcat-specific extension 
was proposed on the dev list.  Can't remember if it was ever implemented 
(and to which version), and I'm much to lazy to look it up :).  However, the 
5.5.9 behavior is in strict compilance with the Servlet spec (and, hence 
anything but "crazy").

> Is any way to obtain behaviour like above with latest version ?
>

Simplest is with a Filter that does something like:
   RequestDispatcher rd = null;
   if(request.getRequestURI().endsWith("/firstpage.html") {
   rd = getServletContext().getNamedDispatcher("servlet1");
   } else if(request.getRequestURI().endsWith("/secondpage.html");
   rd = getServletContext().getNamedDispatcher("servlet2");
   }
   if(rd != null) {
  rd.forward(request, response);
   }



> Greatings
> flow 




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



Re: servlet mapping and url

2005-07-06 Thread David Smith
This trick isn't necessary in Tomcat 5.x and servlet spec 2.4.  Welcome 
files as listed in the web.xml are each appended to the remote user's 
request and the result is processed until it resolves to a servlet or file.


--David

Geiglein, Gary wrote:


If you create a file in the root of the context (any file, could be an
empty file, it just needs to show up in a directory listing) then map
your servlet to the same URL you would use to reference the file, then
add the file to the welcome-file-list and it will work.

Tomcat will not forward to a welcome file unless it shows up in the
directory. But once you map the servlet to the same URL, the servlet
will intercept the request.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 02, 2005 9:25 AM

To: Tomcat Users List
Subject: Re: servlet mapping and url

Hi,

I don't think there is any restriction to mapping a servlet to a welcome

page:


MyServlet 
com.company.app.MyServlet



MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do

the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.


Frank

s s wrote:
 


i want to invoke a servlet using url like http://localhost:8080 only

i have done it using http://localhost:8080/index.html where index.html
   


is a servlet. Is it possible to load this servlet as a default just like
a default web page. The point is i want a servlet to recieve a request
when url http://localhost:8080 is referenced i.e without the servlet
name.
 



is it possible?





-
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
   



 





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



RE: servlet mapping and url

2005-07-06 Thread Geiglein, Gary
If you create a file in the root of the context (any file, could be an
empty file, it just needs to show up in a directory listing) then map
your servlet to the same URL you would use to reference the file, then
add the file to the welcome-file-list and it will work.

Tomcat will not forward to a welcome file unless it shows up in the
directory. But once you map the servlet to the same URL, the servlet
will intercept the request.

-Original Message-
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Saturday, July 02, 2005 9:25 AM
To: Tomcat Users List
Subject: Re: servlet mapping and url

Hi,

I don't think there is any restriction to mapping a servlet to a welcome

page:


MyServlet 
com.company.app.MyServlet


MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do

the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.

Frank

s s wrote:
> i want to invoke a servlet using url like http://localhost:8080 only
>  
> i have done it using http://localhost:8080/index.html where index.html
is a servlet. Is it possible to load this servlet as a default just like
a default web page. The point is i want a servlet to recieve a request
when url http://localhost:8080 is referenced i.e without the servlet
name.
>  
> is it possible?
>  
>  
> 
> 
>   
> -
> Yahoo! Mail Mobile
>  Take Yahoo! Mail with you! Check email on your mobile phone.

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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


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



Re: servlet mapping and url

2005-07-02 Thread Frank W. Zammetti

Hi,

I don't think there is any restriction to mapping a servlet to a welcome 
page:



MyServlet 
com.company.app.MyServlet



MyServlet
/myServlet


/myServlet


Also, I'm not as sure, put I think just mapping the servlet to / will do 
the trick as well.  Both are easy enough to test though, give it a shot 
and post back your results for the archives.


Frank

s s wrote:

i want to invoke a servlet using url like http://localhost:8080 only
 
i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name.
 
is it possible?
 
 




-
Yahoo! Mail Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com


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



Re: servlet mapping and url

2005-07-02 Thread Hardik Tank
you can configure your web.xml file and make index.jsp
file as an welcome file using,


index.jsp


now, create index.jsp file which will simply forward
the request to your servlet!

Rgds,
Hardik

--- s s <[EMAIL PROTECTED]> wrote:

> i want to invoke a servlet using url like
> http://localhost:8080 only
>  
> i have done it using
> http://localhost:8080/index.html where index.html is
> a servlet. Is it possible to load this servlet as a
> default just like a default web page. The point is i
> want a servlet to recieve a request when url
> http://localhost:8080 is referenced i.e without the
> servlet name.
>  
> is it possible?
>  
>  
> 
> 
>   
> -
> Yahoo! Mail Mobile
>  Take Yahoo! Mail with you! Check email on your
> mobile phone.




 
Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football 
http://football.fantasysports.yahoo.com

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



Re: [OT] Re: Servlet mapping problem.

2004-11-22 Thread Ben Souther
Glad to see you're up and running.


On Mon, 2004-11-22 at 13:20, Stefan wrote:
> Yoav and Ben,
> 
> After a fresh install of Tomcat, everything seems to be working fine.
> 
> Many thanks for your extra patience with my fumbling about!
> 
> Best regards,
> 
> Stefan
> 
> 
> - Original Message - 
> From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 22, 2004 12:12 PM
> Subject: RE: Servlet mapping problem.
> 
> 
> 
> Hi,
> Do you get any errors in your log on startup?  Are you running Tomcat as
> a Windows service, or from the command line?
> 
> Yoav Shapira http://www.yoavshapira.com
> 
> 
> >-Original Message-
> >From: Stefan [mailto:[EMAIL PROTECTED]
> >Sent: Monday, November 22, 2004 12:06 PM
> >To: Tomcat Users List
> >Subject: Re: Servlet mapping problem.
> >
> >Yoav,
> >
> >As I stated in a previous post - I actually included the context name
> in
> >the
> >context.xml file, I just omitted it in my email.
> >
> >Beyond that, I initially did not include a context.xml file - but it
> did
> >not
> >work, so I figured I'd give it a go.
> >
> >But if you noticed in my last post, I just dropped in Bens war file and
> it
> >is not working either ... seems to be some container issue and not a
> web
> >app
> >issue ...
> >
> >Yes, you're right, I am just starting out (again) with Tomcat. First
> time
> >I've looked at it in years ...
> >
> >Stefan
> >
> >
> >
> >- Original Message -
> >From: "Shapira, Yoav" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Sent: Monday, November 22, 2004 11:58 AM
> >Subject: RE: Servlet mapping problem.
> >
> >
> >
> >Hi,
> >The problem is that you've messed up your configuration.  You created
> >context.xml and you created your static HTML page.  One says path=""
> and
> >the other asks for path="/context_name".  It's a beginner's mistake
> >that's trivial to correct, and it's your mistake, not Tomcat's fault.
> >
> >You don't even need a context.xml file: you could have simply created a
> >directory for your app under webapps, and put your files there, and
> >voila: i.e. you didn't need to do ANY server configuration to get this
> >running.  But since you chose to have a context.xml file, it's up to
> you
> >to learn how to use it.
> >
> >Yoav Shapira http://www.yoavshapira.com
> >
> >
> >>-Original Message-
> >>From: Stefan [mailto:[EMAIL PROTECTED]
> >>Sent: Monday, November 22, 2004 11:54 AM
> >>To: Tomcat Users List
> >>Subject: Re: Servlet mapping problem.
> >>
> >>Thanks Ben - I'll give it a go .. the client may insist still on
> >Tomcat,
> >>anyway it bugs me that I can't get it to work!
> >>
> >>Thanks.
> >>
> >>Stefan
> >>
> >>www.killersites.com
> >>www.how-to-build-websites.com
> >>www.secretsites.com
> >>www.csstutorial.net
> >>www.websitereviews.org
> >>www.websitetemplates.name
> >>
> >>- Original Message -
> >>From: "Ben Souther" <[EMAIL PROTECTED]>
> >>To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >>Sent: Monday, November 22, 2004 11:41 AM
> >>Subject: Re: Servlet mapping problem.
> >>
> >>
> >>> If you're interested, I've got some simple apps all WARed up on my
> >site.
> >>> http://simple.souther.us.
> >>>
> >>> Try dropping one of those wars in your webapps directory.  If they
> >work
> >>> (which they will if you have an out of the box installation of
> >Tomcat),
> >>> you can compare them with your app to see what's different.
> >>>
> >>> Good-luck.
> >>>
> >>>
> >>>
> >>>
> >>> On Mon, 2004-11-22 at 11:29, Stefan wrote:
> >>> > Hi,
> >>> >
> >>> > I actually put the context reference in the context tag ... just
> >>something I
> >>> > omitted in the email. But alas, it still does not work ...
> >>> >
> >>> > :(
> >>> >
> >>> > I'm actually going to see if I can get the client to use R

[OT] Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Yoav and Ben,

After a fresh install of Tomcat, everything seems to be working fine.

Many thanks for your extra patience with my fumbling about!

Best regards,

Stefan


- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 12:12 PM
Subject: RE: Servlet mapping problem.



Hi,
Do you get any errors in your log on startup?  Are you running Tomcat as
a Windows service, or from the command line?

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Stefan [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 12:06 PM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem.
>
>Yoav,
>
>As I stated in a previous post - I actually included the context name
in
>the
>context.xml file, I just omitted it in my email.
>
>Beyond that, I initially did not include a context.xml file - but it
did
>not
>work, so I figured I'd give it a go.
>
>But if you noticed in my last post, I just dropped in Bens war file and
it
>is not working either ... seems to be some container issue and not a
web
>app
>issue ...
>
>Yes, you're right, I am just starting out (again) with Tomcat. First
time
>I've looked at it in years ...
>
>Stefan
>
>
>
>- Original Message -
>From: "Shapira, Yoav" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, November 22, 2004 11:58 AM
>Subject: RE: Servlet mapping problem.
>
>
>
>Hi,
>The problem is that you've messed up your configuration.  You created
>context.xml and you created your static HTML page.  One says path=""
and
>the other asks for path="/context_name".  It's a beginner's mistake
>that's trivial to correct, and it's your mistake, not Tomcat's fault.
>
>You don't even need a context.xml file: you could have simply created a
>directory for your app under webapps, and put your files there, and
>voila: i.e. you didn't need to do ANY server configuration to get this
>running.  But since you chose to have a context.xml file, it's up to
you
>to learn how to use it.
>
>Yoav Shapira http://www.yoavshapira.com
>
>
>>-Original Message-
>>From: Stefan [mailto:[EMAIL PROTECTED]
>>Sent: Monday, November 22, 2004 11:54 AM
>>To: Tomcat Users List
>>Subject: Re: Servlet mapping problem.
>>
>>Thanks Ben - I'll give it a go .. the client may insist still on
>Tomcat,
>>anyway it bugs me that I can't get it to work!
>>
>>Thanks.
>>
>>Stefan
>>
>>www.killersites.com
>>www.how-to-build-websites.com
>>www.secretsites.com
>>www.csstutorial.net
>>www.websitereviews.org
>>www.websitetemplates.name
>>
>>- Original Message -
>>From: "Ben Souther" <[EMAIL PROTECTED]>
>>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>Sent: Monday, November 22, 2004 11:41 AM
>>Subject: Re: Servlet mapping problem.
>>
>>
>>> If you're interested, I've got some simple apps all WARed up on my
>site.
>>> http://simple.souther.us.
>>>
>>> Try dropping one of those wars in your webapps directory.  If they
>work
>>> (which they will if you have an out of the box installation of
>Tomcat),
>>> you can compare them with your app to see what's different.
>>>
>>> Good-luck.
>>>
>>>
>>>
>>>
>>> On Mon, 2004-11-22 at 11:29, Stefan wrote:
>>> > Hi,
>>> >
>>> > I actually put the context reference in the context tag ... just
>>something I
>>> > omitted in the email. But alas, it still does not work ...
>>> >
>>> > :(
>>> >
>>> > I'm actually going to see if I can get the client to use Resin
(for
>>some
>>> > reason, everything works fine is Resin ... out of the box),
frankly
>at
>>this
>>> > point I'm not too impressed the Tomcat.
>>> >
>>> > Thanks Ben.
>>> >
>>> > Stefan
>>> >
>>> >
>>> >
>>> >
>>> > - Original Message -
>>> > From: "Ben Souther" <[EMAIL PROTECTED]>
>>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>> > Sent: Monday, November 22, 2004 10:40 AM
>>> > Subject: Re: Servlet mapping problem.
>>> >
>>> >
>>> > > In your conte

RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,
Do you get any errors in your log on startup?  Are you running Tomcat as
a Windows service, or from the command line?

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Stefan [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 12:06 PM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem.
>
>Yoav,
>
>As I stated in a previous post - I actually included the context name
in
>the
>context.xml file, I just omitted it in my email.
>
>Beyond that, I initially did not include a context.xml file - but it
did
>not
>work, so I figured I'd give it a go.
>
>But if you noticed in my last post, I just dropped in Bens war file and
it
>is not working either ... seems to be some container issue and not a
web
>app
>issue ...
>
>Yes, you're right, I am just starting out (again) with Tomcat. First
time
>I've looked at it in years ...
>
>Stefan
>
>
>
>- Original Message -
>From: "Shapira, Yoav" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, November 22, 2004 11:58 AM
>Subject: RE: Servlet mapping problem.
>
>
>
>Hi,
>The problem is that you've messed up your configuration.  You created
>context.xml and you created your static HTML page.  One says path=""
and
>the other asks for path="/context_name".  It's a beginner's mistake
>that's trivial to correct, and it's your mistake, not Tomcat's fault.
>
>You don't even need a context.xml file: you could have simply created a
>directory for your app under webapps, and put your files there, and
>voila: i.e. you didn't need to do ANY server configuration to get this
>running.  But since you chose to have a context.xml file, it's up to
you
>to learn how to use it.
>
>Yoav Shapira http://www.yoavshapira.com
>
>
>>-Original Message-
>>From: Stefan [mailto:[EMAIL PROTECTED]
>>Sent: Monday, November 22, 2004 11:54 AM
>>To: Tomcat Users List
>>Subject: Re: Servlet mapping problem.
>>
>>Thanks Ben - I'll give it a go .. the client may insist still on
>Tomcat,
>>anyway it bugs me that I can't get it to work!
>>
>>Thanks.
>>
>>Stefan
>>
>>www.killersites.com
>>www.how-to-build-websites.com
>>www.secretsites.com
>>www.csstutorial.net
>>www.websitereviews.org
>>www.websitetemplates.name
>>
>>- Original Message -
>>From: "Ben Souther" <[EMAIL PROTECTED]>
>>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>Sent: Monday, November 22, 2004 11:41 AM
>>Subject: Re: Servlet mapping problem.
>>
>>
>>> If you're interested, I've got some simple apps all WARed up on my
>site.
>>> http://simple.souther.us.
>>>
>>> Try dropping one of those wars in your webapps directory.  If they
>work
>>> (which they will if you have an out of the box installation of
>Tomcat),
>>> you can compare them with your app to see what's different.
>>>
>>> Good-luck.
>>>
>>>
>>>
>>>
>>> On Mon, 2004-11-22 at 11:29, Stefan wrote:
>>> > Hi,
>>> >
>>> > I actually put the context reference in the context tag ... just
>>something I
>>> > omitted in the email. But alas, it still does not work ...
>>> >
>>> > :(
>>> >
>>> > I'm actually going to see if I can get the client to use Resin
(for
>>some
>>> > reason, everything works fine is Resin ... out of the box),
frankly
>at
>>this
>>> > point I'm not too impressed the Tomcat.
>>> >
>>> > Thanks Ben.
>>> >
>>> > Stefan
>>> >
>>> >
>>> >
>>> >
>>> > - Original Message -
>>> > From: "Ben Souther" <[EMAIL PROTECTED]>
>>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>>> > Sent: Monday, November 22, 2004 10:40 AM
>>> > Subject: Re: Servlet mapping problem.
>>> >
>>> >
>>> > > In your context tag, your specifying: path=""
>>> > > but in your url you're using:
>>> > > http://127.0.0.1/the_context/loginResponse.do";
>>> > >  ^^^
>>> > >
>>> > >
>>> > > Either put: path="/the_context" in your context tag or
>>> > > don't specify it in your url.
>>>

[OT] Re: Servlet mapping problem.

2004-11-22 Thread Ben Souther
I've added the [OT] because those examples are not a Tomcat issue.

SimpleServlet (as the name implies) is the most basic example you can
create.  It has worked for everyone else who has tried it.

Try again, with a fresh Tomcat install. Don't configure anything.





On Mon, 2004-11-22 at 12:00, Stefan wrote:
> Ben,
> 
> I just dropped in your SimpleServlet war file and got this error:
> 
> HTTP Status 404 - /SimpleServlet/test
> 
> 
> 
> 
> type Status report
> 
> message /SimpleServlet/test
> 
> description The requested resource (/SimpleServlet/test) is not available.
> 
> Well at least we know it is something with the server config and not the web
> apps themselves ... where to go now ...
> 
> Would it make a difference with this version of Tomcat if it's installed in
> the 'Program Files' directory - that is to say, could it be some physical
> path issue?
> 
> Thanks,
> 
> 
> Stefan
> 
> 
> 
> - Original Message - 
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 22, 2004 11:41 AM
> Subject: Re: Servlet mapping problem.
> 
> 
> > If you're interested, I've got some simple apps all WARed up on my site.
> > http://simple.souther.us.
> >
> > Try dropping one of those wars in your webapps directory.  If they work
> > (which they will if you have an out of the box installation of Tomcat),
> > you can compare them with your app to see what's different.
> >
> > Good-luck.
> >
> >
> >
> >
> > On Mon, 2004-11-22 at 11:29, Stefan wrote:
> > > Hi,
> > >
> > > I actually put the context reference in the context tag ... just
> something I
> > > omitted in the email. But alas, it still does not work ...
> > >
> > > :(
> > >
> > > I'm actually going to see if I can get the client to use Resin (for some
> > > reason, everything works fine is Resin ... out of the box), frankly at
> this
> > > point I'm not too impressed the Tomcat.
> > >
> > > Thanks Ben.
> > >
> > > Stefan
> > >
> > >
> > >
> > >
> > > - Original Message - 
> > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 22, 2004 10:40 AM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > > In your context tag, your specifying: path=""
> > > > but in your url you're using:
> > > > http://127.0.0.1/the_context/loginResponse.do";
> > > >  ^^^
> > > >
> > > >
> > > > Either put: path="/the_context" in your context tag or
> > > > don't specify it in your url.
> > > > loginResponse.do
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, 2004-11-22 at 10:31, Stefan wrote:
> > > > > Hi Ben,
> > > > >
> > > > > I've used a relative link - same problem ...
> > > > >
> > > > > Could this be a problem having to do with setting up the context?
> What I
> > > did
> > > > > to do this,  was drop an xml file with my web apps name in the
> folder:
> > > > >
> > > > > conf\Catalina\localhost
> > > > >
> > > > > In the xml file (contexName.xml) I have this entry:
> > > > >
> > > > >  > > > > reloadable="true">
> > > > >
> > > > > Of course, my web app is sitting in the 'webapps' directory in
> Tomcat.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > Stefan
> > > > >
> > > > > www.killersites.com
> > > > >
> > > > >
> > > > > - Original Message - 
> > > > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > > Subject: Re: Servlet mapping problem.
> > > > >
> > > > >
> > > > > > Why don't you just use a relative link?:
> > 

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Yoav,

As I stated in a previous post - I actually included the context name in the
context.xml file, I just omitted it in my email.

Beyond that, I initially did not include a context.xml file - but it did not
work, so I figured I'd give it a go.

But if you noticed in my last post, I just dropped in Bens war file and it
is not working either ... seems to be some container issue and not a web app
issue ...

Yes, you're right, I am just starting out (again) with Tomcat. First time
I've looked at it in years ...

Stefan



- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 11:58 AM
Subject: RE: Servlet mapping problem.



Hi,
The problem is that you've messed up your configuration.  You created
context.xml and you created your static HTML page.  One says path="" and
the other asks for path="/context_name".  It's a beginner's mistake
that's trivial to correct, and it's your mistake, not Tomcat's fault.

You don't even need a context.xml file: you could have simply created a
directory for your app under webapps, and put your files there, and
voila: i.e. you didn't need to do ANY server configuration to get this
running.  But since you chose to have a context.xml file, it's up to you
to learn how to use it.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Stefan [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 11:54 AM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem.
>
>Thanks Ben - I'll give it a go .. the client may insist still on
Tomcat,
>anyway it bugs me that I can't get it to work!
>
>Thanks.
>
>Stefan
>
>www.killersites.com
>www.how-to-build-websites.com
>www.secretsites.com
>www.csstutorial.net
>www.websitereviews.org
>www.websitetemplates.name
>
>- Original Message -
>From: "Ben Souther" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, November 22, 2004 11:41 AM
>Subject: Re: Servlet mapping problem.
>
>
>> If you're interested, I've got some simple apps all WARed up on my
site.
>> http://simple.souther.us.
>>
>> Try dropping one of those wars in your webapps directory.  If they
work
>> (which they will if you have an out of the box installation of
Tomcat),
>> you can compare them with your app to see what's different.
>>
>> Good-luck.
>>
>>
>>
>>
>> On Mon, 2004-11-22 at 11:29, Stefan wrote:
>> > Hi,
>> >
>> > I actually put the context reference in the context tag ... just
>something I
>> > omitted in the email. But alas, it still does not work ...
>> >
>> > :(
>> >
>> > I'm actually going to see if I can get the client to use Resin (for
>some
>> > reason, everything works fine is Resin ... out of the box), frankly
at
>this
>> > point I'm not too impressed the Tomcat.
>> >
>> > Thanks Ben.
>> >
>> > Stefan
>> >
>> >
>> >
>> >
>> > - Original Message -
>> > From: "Ben Souther" <[EMAIL PROTECTED]>
>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> > Sent: Monday, November 22, 2004 10:40 AM
>> > Subject: Re: Servlet mapping problem.
>> >
>> >
>> > > In your context tag, your specifying: path=""
>> > > but in your url you're using:
>> > > http://127.0.0.1/the_context/loginResponse.do";
>> > >  ^^^
>> > >
>> > >
>> > > Either put: path="/the_context" in your context tag or
>> > > don't specify it in your url.
>> > > loginResponse.do
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, 2004-11-22 at 10:31, Stefan wrote:
>> > > > Hi Ben,
>> > > >
>> > > > I've used a relative link - same problem ...
>> > > >
>> > > > Could this be a problem having to do with setting up the
context?
>What I
>> > did
>> > > > to do this,  was drop an xml file with my web apps name in the
>folder:
>> > > >
>> > > > conf\Catalina\localhost
>> > > >
>> > > > In the xml file (contexName.xml) I have this entry:
>> > > >
>> > > > > > > > reloadable="true">
>> > &g

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Ben,

I just dropped in your SimpleServlet war file and got this error:

HTTP Status 404 - /SimpleServlet/test




type Status report

message /SimpleServlet/test

description The requested resource (/SimpleServlet/test) is not available.

Well at least we know it is something with the server config and not the web
apps themselves ... where to go now ...

Would it make a difference with this version of Tomcat if it's installed in
the 'Program Files' directory - that is to say, could it be some physical
path issue?

Thanks,


Stefan



- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 11:41 AM
Subject: Re: Servlet mapping problem.


> If you're interested, I've got some simple apps all WARed up on my site.
> http://simple.souther.us.
>
> Try dropping one of those wars in your webapps directory.  If they work
> (which they will if you have an out of the box installation of Tomcat),
> you can compare them with your app to see what's different.
>
> Good-luck.
>
>
>
>
> On Mon, 2004-11-22 at 11:29, Stefan wrote:
> > Hi,
> >
> > I actually put the context reference in the context tag ... just
something I
> > omitted in the email. But alas, it still does not work ...
> >
> > :(
> >
> > I'm actually going to see if I can get the client to use Resin (for some
> > reason, everything works fine is Resin ... out of the box), frankly at
this
> > point I'm not too impressed the Tomcat.
> >
> > Thanks Ben.
> >
> > Stefan
> >
> >
> >
> >
> > - Original Message - 
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 22, 2004 10:40 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > > In your context tag, your specifying: path=""
> > > but in your url you're using:
> > > http://127.0.0.1/the_context/loginResponse.do";
> > >  ^^^
> > >
> > >
> > > Either put: path="/the_context" in your context tag or
> > > don't specify it in your url.
> > > loginResponse.do
> > >
> > >
> > >
> > >
> > >
> > > On Mon, 2004-11-22 at 10:31, Stefan wrote:
> > > > Hi Ben,
> > > >
> > > > I've used a relative link - same problem ...
> > > >
> > > > Could this be a problem having to do with setting up the context?
What I
> > did
> > > > to do this,  was drop an xml file with my web apps name in the
folder:
> > > >
> > > > conf\Catalina\localhost
> > > >
> > > > In the xml file (contexName.xml) I have this entry:
> > > >
> > > >  > > > reloadable="true">
> > > >
> > > > Of course, my web app is sitting in the 'webapps' directory in
Tomcat.
> > > >
> > > > Any ideas?
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > - Original Message - 
> > > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > > Why don't you just use a relative link?:
> > > > > 
> > > > >
> > > > > On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Just out of curiousity I changed the forms' action attribute to
> > include
> > > > the
> > > > > > full path:
> > > > > >
> > > > > > http://127.0.0.1/the_context/loginResponse.do";
> > > > method="post">
> > > > > >
> > > > > > >From a page with this URL:
http://127.0.0.1/the_context/logIn.jsp
> > > > > >
> > > > > > And when I submit the form I am taken to Tomcats' web server
admin
> > tool
> > > > > > login page!
> > > > > >
> > > > > > The URL: http://127.0.0.1/admin/index.

RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,
The problem is that you've messed up your configuration.  You created
context.xml and you created your static HTML page.  One says path="" and
the other asks for path="/context_name".  It's a beginner's mistake
that's trivial to correct, and it's your mistake, not Tomcat's fault. 

You don't even need a context.xml file: you could have simply created a
directory for your app under webapps, and put your files there, and
voila: i.e. you didn't need to do ANY server configuration to get this
running.  But since you chose to have a context.xml file, it's up to you
to learn how to use it.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Stefan [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 11:54 AM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem.
>
>Thanks Ben - I'll give it a go .. the client may insist still on
Tomcat,
>anyway it bugs me that I can't get it to work!
>
>Thanks.
>
>Stefan
>
>www.killersites.com
>www.how-to-build-websites.com
>www.secretsites.com
>www.csstutorial.net
>www.websitereviews.org
>www.websitetemplates.name
>
>- Original Message -
>From: "Ben Souther" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, November 22, 2004 11:41 AM
>Subject: Re: Servlet mapping problem.
>
>
>> If you're interested, I've got some simple apps all WARed up on my
site.
>> http://simple.souther.us.
>>
>> Try dropping one of those wars in your webapps directory.  If they
work
>> (which they will if you have an out of the box installation of
Tomcat),
>> you can compare them with your app to see what's different.
>>
>> Good-luck.
>>
>>
>>
>>
>> On Mon, 2004-11-22 at 11:29, Stefan wrote:
>> > Hi,
>> >
>> > I actually put the context reference in the context tag ... just
>something I
>> > omitted in the email. But alas, it still does not work ...
>> >
>> > :(
>> >
>> > I'm actually going to see if I can get the client to use Resin (for
>some
>> > reason, everything works fine is Resin ... out of the box), frankly
at
>this
>> > point I'm not too impressed the Tomcat.
>> >
>> > Thanks Ben.
>> >
>> > Stefan
>> >
>> >
>> >
>> >
>> > - Original Message -
>> > From: "Ben Souther" <[EMAIL PROTECTED]>
>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> > Sent: Monday, November 22, 2004 10:40 AM
>> > Subject: Re: Servlet mapping problem.
>> >
>> >
>> > > In your context tag, your specifying: path=""
>> > > but in your url you're using:
>> > > http://127.0.0.1/the_context/loginResponse.do";
>> > >  ^^^
>> > >
>> > >
>> > > Either put: path="/the_context" in your context tag or
>> > > don't specify it in your url.
>> > > loginResponse.do
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, 2004-11-22 at 10:31, Stefan wrote:
>> > > > Hi Ben,
>> > > >
>> > > > I've used a relative link - same problem ...
>> > > >
>> > > > Could this be a problem having to do with setting up the
context?
>What I
>> > did
>> > > > to do this,  was drop an xml file with my web apps name in the
>folder:
>> > > >
>> > > > conf\Catalina\localhost
>> > > >
>> > > > In the xml file (contexName.xml) I have this entry:
>> > > >
>> > > > > > > > reloadable="true">
>> > > >
>> > > > Of course, my web app is sitting in the 'webapps' directory in
>Tomcat.
>> > > >
>> > > > Any ideas?
>> > > >
>> > > > Stefan
>> > > >
>> > > > www.killersites.com
>> > > >
>> > > >
>> > > > - Original Message -
>> > > > From: "Ben Souther" <[EMAIL PROTECTED]>
>> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> > > > Sent: Monday, November 22, 2004 10:19 AM
>> > > > Subject: Re: Servlet mapping problem.
>> > > >
>> > > >
>> > > >

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Thanks Ben - I'll give it a go .. the client may insist still on Tomcat,
anyway it bugs me that I can't get it to work!

Thanks.

Stefan

www.killersites.com
www.how-to-build-websites.com
www.secretsites.com
www.csstutorial.net
www.websitereviews.org
www.websitetemplates.name

- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 11:41 AM
Subject: Re: Servlet mapping problem.


> If you're interested, I've got some simple apps all WARed up on my site.
> http://simple.souther.us.
>
> Try dropping one of those wars in your webapps directory.  If they work
> (which they will if you have an out of the box installation of Tomcat),
> you can compare them with your app to see what's different.
>
> Good-luck.
>
>
>
>
> On Mon, 2004-11-22 at 11:29, Stefan wrote:
> > Hi,
> >
> > I actually put the context reference in the context tag ... just
something I
> > omitted in the email. But alas, it still does not work ...
> >
> > :(
> >
> > I'm actually going to see if I can get the client to use Resin (for some
> > reason, everything works fine is Resin ... out of the box), frankly at
this
> > point I'm not too impressed the Tomcat.
> >
> > Thanks Ben.
> >
> > Stefan
> >
> >
> >
> >
> > - Original Message - 
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 22, 2004 10:40 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > > In your context tag, your specifying: path=""
> > > but in your url you're using:
> > > http://127.0.0.1/the_context/loginResponse.do";
> > >  ^^^
> > >
> > >
> > > Either put: path="/the_context" in your context tag or
> > > don't specify it in your url.
> > > loginResponse.do
> > >
> > >
> > >
> > >
> > >
> > > On Mon, 2004-11-22 at 10:31, Stefan wrote:
> > > > Hi Ben,
> > > >
> > > > I've used a relative link - same problem ...
> > > >
> > > > Could this be a problem having to do with setting up the context?
What I
> > did
> > > > to do this,  was drop an xml file with my web apps name in the
folder:
> > > >
> > > > conf\Catalina\localhost
> > > >
> > > > In the xml file (contexName.xml) I have this entry:
> > > >
> > > >  > > > reloadable="true">
> > > >
> > > > Of course, my web app is sitting in the 'webapps' directory in
Tomcat.
> > > >
> > > > Any ideas?
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > - Original Message - 
> > > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > > Why don't you just use a relative link?:
> > > > > 
> > > > >
> > > > > On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > > > > > Hi,
> > > > > >
> > > > > > Just out of curiousity I changed the forms' action attribute to
> > include
> > > > the
> > > > > > full path:
> > > > > >
> > > > > > http://127.0.0.1/the_context/loginResponse.do";
> > > > method="post">
> > > > > >
> > > > > > >From a page with this URL:
http://127.0.0.1/the_context/logIn.jsp
> > > > > >
> > > > > > And when I submit the form I am taken to Tomcats' web server
admin
> > tool
> > > > > > login page!
> > > > > >
> > > > > > The URL: http://127.0.0.1/admin/index.jsp
> > > > > >
> > > > > > And for the sake of completeness my mapping for the servlet:
> > > > > >
> > > > > > 
> > > > > >   loginResponse
> > > > > >   /loginResponse.do
> > > > > >  
> > > > > >
> > > > > >

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Ha ha ha ha ha 

I wasn't meant as an insult, but the truth cannot be ignored ...

You have to ask yourself a question when you take the exact same code and
drop it into Resin and in 1 minute it works fine, whereas with Tomcat, after
an hour or two of poking around, it still doesn't work ...

Thanks for your help.

Stefan



- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 11:34 AM
Subject: RE: Servlet mapping problem.



Hi,

>I actually put the context reference in the context tag ... just
something
>I
>omitted in the email. But alas, it still does not work ...

>I'm actually going to see if I can get the client to use Resin (for
some
>reason, everything works fine is Resin ... out of the box), frankly at
this
>point I'm not too impressed the Tomcat.

And we tend to be not too impressed with people who omit details from
their emails and hard-code absolute context paths, but nonetheless good
luck and have fun ;)

Yoav



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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


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



Re: Servlet mapping problem.

2004-11-22 Thread Ben Souther
If you're interested, I've got some simple apps all WARed up on my site.
http://simple.souther.us.

Try dropping one of those wars in your webapps directory.  If they work
(which they will if you have an out of the box installation of Tomcat), 
you can compare them with your app to see what's different.

Good-luck.




On Mon, 2004-11-22 at 11:29, Stefan wrote:
> Hi,
> 
> I actually put the context reference in the context tag ... just something I
> omitted in the email. But alas, it still does not work ...
> 
> :(
> 
> I'm actually going to see if I can get the client to use Resin (for some
> reason, everything works fine is Resin ... out of the box), frankly at this
> point I'm not too impressed the Tomcat.
> 
> Thanks Ben.
> 
> Stefan
> 
> 
> 
> 
> - Original Message - 
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 22, 2004 10:40 AM
> Subject: Re: Servlet mapping problem.
> 
> 
> > In your context tag, your specifying: path=""
> > but in your url you're using:
> > http://127.0.0.1/the_context/loginResponse.do";
> >  ^^^
> >
> >
> > Either put: path="/the_context" in your context tag or
> > don't specify it in your url.
> > loginResponse.do
> >
> >
> >
> >
> >
> > On Mon, 2004-11-22 at 10:31, Stefan wrote:
> > > Hi Ben,
> > >
> > > I've used a relative link - same problem ...
> > >
> > > Could this be a problem having to do with setting up the context? What I
> did
> > > to do this,  was drop an xml file with my web apps name in the folder:
> > >
> > > conf\Catalina\localhost
> > >
> > > In the xml file (contexName.xml) I have this entry:
> > >
> > >  > > reloadable="true">
> > >
> > > Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> > >
> > > Any ideas?
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > >
> > > - Original Message - 
> > > From: "Ben Souther" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Monday, November 22, 2004 10:19 AM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > > Why don't you just use a relative link?:
> > > > 
> > > >
> > > > On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > > > > Hi,
> > > > >
> > > > > Just out of curiousity I changed the forms' action attribute to
> include
> > > the
> > > > > full path:
> > > > >
> > > > > http://127.0.0.1/the_context/loginResponse.do";
> > > method="post">
> > > > >
> > > > > >From a page with this URL: http://127.0.0.1/the_context/logIn.jsp
> > > > >
> > > > > And when I submit the form I am taken to Tomcats' web server admin
> tool
> > > > > login page!
> > > > >
> > > > > The URL: http://127.0.0.1/admin/index.jsp
> > > > >
> > > > > And for the sake of completeness my mapping for the servlet:
> > > > >
> > > > > 
> > > > >   loginResponse
> > > > >   /loginResponse.do
> > > > >  
> > > > >
> > > > >
> > > > > Does this shed any light on what is going on?
> > > > >
> > > > >
> > > > > Stefan
> > > > >
> > > > > www.killersites.com
> > > > >
> > > > >
> > > > > - Original Message - 
> > > > > From: "Stefan" <[EMAIL PROTECTED]>
> > > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > > Sent: Sunday, November 21, 2004 10:31 PM
> > > > > Subject: Re: Servlet mapping problem.
> > > > >
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I am actually using a form to post to the target servlet:
> > > > > >
> > > > > > 
> > > > > >
> > > > > > name: 
> > > > > >
> > > > > > 
> > > > > >
> > 

RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,

>I actually put the context reference in the context tag ... just
something
>I
>omitted in the email. But alas, it still does not work ...

>I'm actually going to see if I can get the client to use Resin (for
some
>reason, everything works fine is Resin ... out of the box), frankly at
this
>point I'm not too impressed the Tomcat.

And we tend to be not too impressed with people who omit details from
their emails and hard-code absolute context paths, but nonetheless good
luck and have fun ;)

Yoav



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Hi,

I actually put the context reference in the context tag ... just something I
omitted in the email. But alas, it still does not work ...

:(

I'm actually going to see if I can get the client to use Resin (for some
reason, everything works fine is Resin ... out of the box), frankly at this
point I'm not too impressed the Tomcat.

Thanks Ben.

Stefan




- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 10:40 AM
Subject: Re: Servlet mapping problem.


> In your context tag, your specifying: path=""
> but in your url you're using:
> http://127.0.0.1/the_context/loginResponse.do";
>  ^^^
>
>
> Either put: path="/the_context" in your context tag or
> don't specify it in your url.
> loginResponse.do
>
>
>
>
>
> On Mon, 2004-11-22 at 10:31, Stefan wrote:
> > Hi Ben,
> >
> > I've used a relative link - same problem ...
> >
> > Could this be a problem having to do with setting up the context? What I
did
> > to do this,  was drop an xml file with my web apps name in the folder:
> >
> > conf\Catalina\localhost
> >
> > In the xml file (contexName.xml) I have this entry:
> >
> >  > reloadable="true">
> >
> > Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> >
> > Any ideas?
> >
> > Stefan
> >
> > www.killersites.com
> >
> >
> > - Original Message - 
> > From: "Ben Souther" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 22, 2004 10:19 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > > Why don't you just use a relative link?:
> > > 
> > >
> > > On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > > > Hi,
> > > >
> > > > Just out of curiousity I changed the forms' action attribute to
include
> > the
> > > > full path:
> > > >
> > > > http://127.0.0.1/the_context/loginResponse.do";
> > method="post">
> > > >
> > > > >From a page with this URL: http://127.0.0.1/the_context/logIn.jsp
> > > >
> > > > And when I submit the form I am taken to Tomcats' web server admin
tool
> > > > login page!
> > > >
> > > > The URL: http://127.0.0.1/admin/index.jsp
> > > >
> > > > And for the sake of completeness my mapping for the servlet:
> > > >
> > > > 
> > > >   loginResponse
> > > >   /loginResponse.do
> > > >  
> > > >
> > > >
> > > > Does this shed any light on what is going on?
> > > >
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > - Original Message - 
> > > > From: "Stefan" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > Sent: Sunday, November 21, 2004 10:31 PM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > I am actually using a form to post to the target servlet:
> > > > >
> > > > > 
> > > > >
> > > > > name: 
> > > > >
> > > > > 
> > > > >
> > > > > 
> > > > >
> > > > > The form itself is sitting in a page with this URL:
> > > > >
> > > > > http://127.0.0.1/myWebsite/logIn.jsp
> > > > >
> > > > > And the strange thing is that when I submit the form I am taken to
> > this
> > > > URL:
> > > > >
> > > > > http://127.0.0.1/login.jsp
> > > > >
> > > > > And I get this error:
> > > > >
> > > > > HTTP Status 404 - /login.jsp
> > > > >
> > > > >
> > > >
> >
> --
> > > > --
> > > > > 
> > > > >
> > > > > type Status

Re: Servlet mapping problem.

2004-11-22 Thread Ben Souther
In your context tag, your specifying: path=""
but in your url you're using:
http://127.0.0.1/the_context/loginResponse.do";
 ^^^ 


Either put: path="/the_context" in your context tag or
don't specify it in your url.
loginResponse.do





On Mon, 2004-11-22 at 10:31, Stefan wrote:
> Hi Ben,
> 
> I've used a relative link - same problem ...
> 
> Could this be a problem having to do with setting up the context? What I did
> to do this,  was drop an xml file with my web apps name in the folder:
> 
> conf\Catalina\localhost
> 
> In the xml file (contexName.xml) I have this entry:
> 
>  reloadable="true">
> 
> Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> 
> Any ideas?
> 
> Stefan
> 
> www.killersites.com
> 
> 
> - Original Message - 
> From: "Ben Souther" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 22, 2004 10:19 AM
> Subject: Re: Servlet mapping problem.
> 
> 
> > Why don't you just use a relative link?:
> > 
> >
> > On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > > Hi,
> > >
> > > Just out of curiousity I changed the forms' action attribute to include
> the
> > > full path:
> > >
> > > http://127.0.0.1/the_context/loginResponse.do";
> method="post">
> > >
> > > >From a page with this URL: http://127.0.0.1/the_context/logIn.jsp
> > >
> > > And when I submit the form I am taken to Tomcats' web server admin tool
> > > login page!
> > >
> > > The URL: http://127.0.0.1/admin/index.jsp
> > >
> > > And for the sake of completeness my mapping for the servlet:
> > >
> > > 
> > >   loginResponse
> > >   /loginResponse.do
> > >  
> > >
> > >
> > > Does this shed any light on what is going on?
> > >
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > >
> > > - Original Message - 
> > > From: "Stefan" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Sunday, November 21, 2004 10:31 PM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > > Hi,
> > > >
> > > > I am actually using a form to post to the target servlet:
> > > >
> > > > 
> > > >
> > > > name: 
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > The form itself is sitting in a page with this URL:
> > > >
> > > > http://127.0.0.1/myWebsite/logIn.jsp
> > > >
> > > > And the strange thing is that when I submit the form I am taken to
> this
> > > URL:
> > > >
> > > > http://127.0.0.1/login.jsp
> > > >
> > > > And I get this error:
> > > >
> > > > HTTP Status 404 - /login.jsp
> > > >
> > > >
> > >
> > --
> > > --
> > > > 
> > > >
> > > > type Status report
> > > >
> > > > message /login.jsp
> > > >
> > > > description The requested resource (/login.jsp) is not available.
> > > >
> > > >
> > >
> > --
> > > --
> > > > 
> > > >
> > > > Apache Tomcat/5.0.28
> > > > Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in
> Resin.
> > > >
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > > - Original Message - 
> > > > From: "sven morales" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > > Sent: Sunday, November 21, 2004 9:58 PM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > >Can you show us what you type in to your browser?
> > > > >
> > > > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > > >

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Hi Ben,

I've used a relative link - same problem ...

Could this be a problem having to do with setting up the context? What I did
to do this,  was drop an xml file with my web apps name in the folder:

conf\Catalina\localhost

In the xml file (contexName.xml) I have this entry:



Of course, my web app is sitting in the 'webapps' directory in Tomcat.

Any ideas?

Stefan

www.killersites.com


- Original Message - 
From: "Ben Souther" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 10:19 AM
Subject: Re: Servlet mapping problem.


> Why don't you just use a relative link?:
> 
>
> On Mon, 2004-11-22 at 10:13, Stefan wrote:
> > Hi,
> >
> > Just out of curiousity I changed the forms' action attribute to include
the
> > full path:
> >
> > http://127.0.0.1/the_context/loginResponse.do";
method="post">
> >
> > >From a page with this URL: http://127.0.0.1/the_context/logIn.jsp
> >
> > And when I submit the form I am taken to Tomcats' web server admin tool
> > login page!
> >
> > The URL: http://127.0.0.1/admin/index.jsp
> >
> > And for the sake of completeness my mapping for the servlet:
> >
> > 
> >   loginResponse
> >   /loginResponse.do
> >  
> >
> >
> > Does this shed any light on what is going on?
> >
> >
> > Stefan
> >
> > www.killersites.com
> >
> >
> > - Original Message - 
> > From: "Stefan" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Sunday, November 21, 2004 10:31 PM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > > Hi,
> > >
> > > I am actually using a form to post to the target servlet:
> > >
> > > 
> > >
> > > name: 
> > >
> > > 
> > >
> > > 
> > >
> > > The form itself is sitting in a page with this URL:
> > >
> > > http://127.0.0.1/myWebsite/logIn.jsp
> > >
> > > And the strange thing is that when I submit the form I am taken to
this
> > URL:
> > >
> > > http://127.0.0.1/login.jsp
> > >
> > > And I get this error:
> > >
> > > HTTP Status 404 - /login.jsp
> > >
> > >
> >
> --
> > --
> > > 
> > >
> > > type Status report
> > >
> > > message /login.jsp
> > >
> > > description The requested resource (/login.jsp) is not available.
> > >
> > >
> >
> --
> > --
> > > 
> > >
> > > Apache Tomcat/5.0.28
> > > Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in
Resin.
> > >
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > > - Original Message - 
> > > From: "sven morales" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > > Sent: Sunday, November 21, 2004 9:58 PM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > >Can you show us what you type in to your browser?
> > > >
> > > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I first posted this question with the wrong subject
> > > > > heading ... sorry about
> > > > > the duplicates.
> > > > >
> > > > > My question:
> > > > >
> > > > > Using Tomcat 5.0.28 standalone on windows XP with
> > > > > JVM 1.4, I get this error
> > > > > even though I have mapped my servlet in the web.xml
> > > > > file of the web app:
> > > > >
> > > > >
> > > > > HTTP Status 404 - /loginResponse.do
> > > > >
> > > > >
> > >
> >
> --
> > > --
> > > > > 
> > > > >
> > > > > type Status report
> > > > >
> > > > > message /loginResponse.do
> > > > >
> > > > > description The requested resource
> > > > > (/loginResponse.do) is not available.
&

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
The HTML form is actually in a static page, I'm not generating the form via
a servlet.

I've actually began this with a relative URL, I've just been trying
different things to see if I could figure out how to get this to work. I
agree with your comments regarding the portability, I've just been trying
anything now to get this to work...

With that being said and having shown you my web.xml et cetera, can you see
what I am doing wrong?

Thanks,

Stefan

www.killersites.com

- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 10:12 AM
Subject: RE: Servlet mapping problem.



Hi,

>
>
>name: 
>
>
>
>

I meant the server-side code, not the HTML output.

>Q. Accordingly, how do you generate this  element?
>A. I'm not sure what you mean, it's just a hard-coded HTML form.

It shouldn't be.  Try a relative URL instead.

>Q. I assume you don't have the webapp's name hard-coded
>A. Hard-coded where? In the forms' action attribute? If so, is that a
>problem?

It's poor design that limits your portability and presents a possible
problem if your server configuration doesn't match your hard-coded
value.  For example, if could be that Tomcat is deploying your webapp at
a different path, then you would get a 404...

Yoav



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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


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



Re: Servlet mapping problem.

2004-11-22 Thread Ben Souther
Why don't you just use a relative link?:


On Mon, 2004-11-22 at 10:13, Stefan wrote:
> Hi,
> 
> Just out of curiousity I changed the forms' action attribute to include the
> full path:
> 
> http://127.0.0.1/the_context/loginResponse.do"; method="post">
> 
> >From a page with this URL: http://127.0.0.1/the_context/logIn.jsp
> 
> And when I submit the form I am taken to Tomcats' web server admin tool
> login page!
> 
> The URL: http://127.0.0.1/admin/index.jsp
> 
> And for the sake of completeness my mapping for the servlet:
> 
> 
>   loginResponse
>   /loginResponse.do
>  
> 
> 
> Does this shed any light on what is going on?
> 
> 
> Stefan
> 
> www.killersites.com
> 
> 
> - Original Message - 
> From: "Stefan" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Sunday, November 21, 2004 10:31 PM
> Subject: Re: Servlet mapping problem.
> 
> 
> > Hi,
> >
> > I am actually using a form to post to the target servlet:
> >
> > 
> >
> > name: 
> >
> > 
> >
> > 
> >
> > The form itself is sitting in a page with this URL:
> >
> > http://127.0.0.1/myWebsite/logIn.jsp
> >
> > And the strange thing is that when I submit the form I am taken to this
> URL:
> >
> > http://127.0.0.1/login.jsp
> >
> > And I get this error:
> >
> > HTTP Status 404 - /login.jsp
> >
> >
> > --
> --
> > 
> >
> > type Status report
> >
> > message /login.jsp
> >
> > description The requested resource (/login.jsp) is not available.
> >
> >
> > --------------
> --
> > 
> >
> > Apache Tomcat/5.0.28
> > Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in Resin.
> >
> >
> > Stefan
> >
> > www.killersites.com
> >
> > - Original Message - 
> > From: "sven morales" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Sunday, November 21, 2004 9:58 PM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > >Can you show us what you type in to your browser?
> > >
> > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I first posted this question with the wrong subject
> > > > heading ... sorry about
> > > > the duplicates.
> > > >
> > > > My question:
> > > >
> > > > Using Tomcat 5.0.28 standalone on windows XP with
> > > > JVM 1.4, I get this error
> > > > even though I have mapped my servlet in the web.xml
> > > > file of the web app:
> > > >
> > > >
> > > > HTTP Status 404 - /loginResponse.do
> > > >
> > > >
> >
> > --
> > --
> > > > 
> > > >
> > > > type Status report
> > > >
> > > > message /loginResponse.do
> > > >
> > > > description The requested resource
> > > > (/loginResponse.do) is not available.
> > > >
> > > >
> > > >
> >
> > --
> > --
> > > > 
> > > >
> > > > Apache Tomcat/5.0.28
> > > >
> > > >
> > > > I've placed my webapp folder in Tomcats' webapps
> > > > directory and all the jsp
> > > > pages run fine as do my POJO's for business logic,
> > > > any ideas why the servlet
> > > > code could be causing problems?
> > > >
> > > > The servlet mappings:
> > > >
> > > >
> > > >   code:
> > > >
> >
> > --
> > --
> > > > --
> > > >
> > > >   
> > > > loginResponse
> > > >
> > > com._ABC.authenticateAdmin
> > > > 
> > > > adminPassword
> > > > xxx
> > > >   
> > > > loginResponse
> > > > /loginResponse.do
> > > > 
> > > >
> >
> > 

RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,

>
>
>name: 
>
>
>
>

I meant the server-side code, not the HTML output.

>Q. Accordingly, how do you generate this  element?
>A. I'm not sure what you mean, it's just a hard-coded HTML form.

It shouldn't be.  Try a relative URL instead.

>Q. I assume you don't have the webapp's name hard-coded
>A. Hard-coded where? In the forms' action attribute? If so, is that a
>problem?

It's poor design that limits your portability and presents a possible
problem if your server configuration doesn't match your hard-coded
value.  For example, if could be that Tomcat is deploying your webapp at
a different path, then you would get a 404...

Yoav



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Hi,

Just out of curiousity I changed the forms' action attribute to include the
full path:

http://127.0.0.1/the_context/loginResponse.do"; method="post">

>From a page with this URL: http://127.0.0.1/the_context/logIn.jsp

And when I submit the form I am taken to Tomcats' web server admin tool
login page!

The URL: http://127.0.0.1/admin/index.jsp

And for the sake of completeness my mapping for the servlet:


  loginResponse
  /loginResponse.do
 


Does this shed any light on what is going on?


Stefan

www.killersites.com


- Original Message - 
From: "Stefan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, November 21, 2004 10:31 PM
Subject: Re: Servlet mapping problem.


> Hi,
>
> I am actually using a form to post to the target servlet:
>
> 
>
> name: 
>
> 
>
> 
>
> The form itself is sitting in a page with this URL:
>
> http://127.0.0.1/myWebsite/logIn.jsp
>
> And the strange thing is that when I submit the form I am taken to this
URL:
>
> http://127.0.0.1/login.jsp
>
> And I get this error:
>
> HTTP Status 404 - /login.jsp
>
>
> --
--
> 
>
> type Status report
>
> message /login.jsp
>
> description The requested resource (/login.jsp) is not available.
>
>
> --
--
> 
>
> Apache Tomcat/5.0.28
> Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in Resin.
>
>
> Stefan
>
> www.killersites.com
>
> - Original Message - 
> From: "sven morales" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Sunday, November 21, 2004 9:58 PM
> Subject: Re: Servlet mapping problem.
>
>
> >Can you show us what you type in to your browser?
> >
> > --- Stefan <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I first posted this question with the wrong subject
> > > heading ... sorry about
> > > the duplicates.
> > >
> > > My question:
> > >
> > > Using Tomcat 5.0.28 standalone on windows XP with
> > > JVM 1.4, I get this error
> > > even though I have mapped my servlet in the web.xml
> > > file of the web app:
> > >
> > >
> > > HTTP Status 404 - /loginResponse.do
> > >
> > >
>
> --
> --
> > > 
> > >
> > > type Status report
> > >
> > > message /loginResponse.do
> > >
> > > description The requested resource
> > > (/loginResponse.do) is not available.
> > >
> > >
> > >
>
> --
> --
> > > 
> > >
> > > Apache Tomcat/5.0.28
> > >
> > >
> > > I've placed my webapp folder in Tomcats' webapps
> > > directory and all the jsp
> > > pages run fine as do my POJO's for business logic,
> > > any ideas why the servlet
> > > code could be causing problems?
> > >
> > > The servlet mappings:
> > >
> > >
> > >   code:
> > >
>
> --
> --
> > > --
> > >
> > >   
> > > loginResponse
> > >
> > com._ABC.authenticateAdmin
> > > 
> > > adminPassword
> > > xxx
> > >   
> > > loginResponse
> > > /loginResponse.do
> > > 
> > >
>
> --
> --
> > > --
> > >
> > >
> > >
> > > It's my first time using Tomcat, been a Resin user
> > > for years ... any ideas?
> > >
> > > Thanks,
> > >
> > > Stef
> > >
> > >
> > >
> > > - Original Message - 
> > > From: "Mark Thomas" <[EMAIL PROTECTED]>
> > > To: "'Tomcat Users List'"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, November 21, 2004 12:10 PM
> > > Subject: RE: CGI Again...Servlet.service() for
> > > servlet cgi threw exception
> > >
> > >
> > > > I'll look into this but I need a bit more info:
> > > >
> > > > 1. What servlet mapping did yo

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Hi,

my form code:



name: 





To naswer your questions:

Q. Accordingly, how do you generate this  element?
A. I'm not sure what you mean, it's just a hard-coded HTML form.

Q. I assume you don't have the webapp's name hard-coded
A. Hard-coded where? In the forms' action attribute? If so, is that a
problem?

Thanks,


Stefan

www.killersites.com


- Original Message - 
From: "Shapira, Yoav" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 9:03 AM
Subject: RE: Servlet mapping problem.



Hi,
>message /loginResponse.do
>
>description The requested resource (/loginResponse.do) is not
available.

It seems the context_name part of your  element is blank, missing,
or wrong, since the page is asking for /loginResponse.do and not
/whatever/loginResponse.do.  Accordingly, how do you generate this
 element?  I assume you don't have the webapp's name hard-coded.

To answer your question in general, Tomcat's servlet mapping behavior is
extremely well-tested, and has been for years.  I'd be surprised if this
issue was NOT caused by a configuration or coding mistake in your
webapp.  That said, Tomcat is not as lax in permitting developer
conveniences as some other containers.

Finally, a small note: please start a new thread for a new issue, don't
reply to a different message and change the subject.  It screws up the
archives.

Yoav



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.


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


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



RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,
The web.xml file looks reasonable.  But you have yet to answer the other
question, which is how you generate the form tag.

Yoav Shapira http://www.yoavshapira.com


>-Original Message-
>From: Stefan [mailto:[EMAIL PROTECTED]
>Sent: Monday, November 22, 2004 10:00 AM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem.
>
>Hi,
>
>This is my web.xml for the web app:
>
>
>
>2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd";>
>
> index.jsp
>
> 
>  authentication filter
>  com._XYZ.authenticateAdminFilter
> 
>
> 
>  authentication filter
>  /admin/*
> 
>
> 
>  loginResponse
>  com._XYZ.authenticateAdmin
>
>  
>   testPassword
>   xxx
>  
> 
>
> 
>  loginResponse
>  /loginResponse.do
> 
>
>
>
>At this point I'm stumped as to why Tomcat refuses the servlet mapping?
>
>Stefan
>
>www.killersites.com
>
>
>- Original Message -
>From: "Andoni" <[EMAIL PROTECTED]>
>To: "Tomcat Users List" <[EMAIL PROTECTED]>
>Sent: Monday, November 22, 2004 7:39 AM
>Subject: Re: Servlet mapping problem.
>
>
>> If you are not using Struts why did you call the login JSP,
>> loginResponse.do?
>>
>> Did you add .do to your web.xml file as a JSP type? Can you post your
>> web.xml.
>>
>> Andoni.
>>
>> - Original Message -
>> From: "Stefan" <[EMAIL PROTECTED]>
>> Newsgroups: gmane.comp.jakarta.tomcat.user
>> Sent: Monday, November 22, 2004 5:36 AM
>> Subject: Re: Servlet mapping problem.
>>
>>
>> > Hi,
>> >
>> > I'm not using struts.
>> >
>> > Stefan
>> >
>> > www.killersites.com
>> >
>> >
>> > - Original Message -
>> > From: "sven morales" <[EMAIL PROTECTED]>
>> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
>> > Sent: Monday, November 22, 2004 12:25 AM
>> > Subject: Re: Servlet mapping problem.
>> >
>> >
>> > >   Can you also post all your struts-config.xml > > >  ..> ? I was looking for something that may be
>> > > ing it to login.jsp.  This line you have in
>> > > your form,  > > > action="/context_name/loginResponse.do"  points to
>> > > context_name/loginResponse.do  so show this 
>> > > line of your struts-config.xml
>> > >
>> > > --- Stefan <[EMAIL PROTECTED]> wrote:
>> > >
>> > > > Hi,
>> > > >
>> > > > I am actually using a form to post to the target
>> > > > servlet:
>> > > >
>> > > > > > > > method="post">
>> > > >
>> > > > name: 
>> > > >
>> > > > 
>> > > >
>> > > > 
>> > > >
>> > > > The form itself is sitting in a page with this URL:
>> > > >
>> > > > http://127.0.0.1/myWebsite/logIn.jsp
>> > > >
>> > > > And the strange thing is that when I submit the form
>> > > > I am taken to this URL:
>> > > >
>> > > > http://127.0.0.1/login.jsp
>> > > >
>> > > > And I get this error:
>> > > >
>> > > > HTTP Status 404 - /login.jsp
>> > > >
>> > > >
>> > > >
>> >
>>
>>

-
>-
>> > --
>> > > > 
>> > > >
>> > > > type Status report
>> > > >
>> > > > message /login.jsp
>> > > >
>> > > > description The requested resource (/login.jsp) is
>> > > > not available.
>> > > >
>> > > >
>> > > >
>> >
>>
>>

-
>-
>> > --
>> > > > 
>> > > >
>> > > > Apache Tomcat/5.0.28
>> > > > Any ideas? Is this a bug in Tomcat ? This works fine
>> > > > (naturally) in Resin.
>> > > >
>> > > >
>> > > > Stefan
>> > > >
>> > > > www.killersites.com
>> > > >
>> > > > - Original Message -
>> > > > From: "sven morales" <[EMAIL PROTECTED]>
>> > > > To: 

Re: Servlet mapping problem.

2004-11-22 Thread Stefan
Hi,

This is my web.xml for the web app:



http://java.sun.com/dtd/web-app_2_3.dtd";>

 index.jsp

 
  authentication filter
  com._XYZ.authenticateAdminFilter
 

 
  authentication filter
  /admin/*
 

 
  loginResponse
  com._XYZ.authenticateAdmin

  
   testPassword
   xxx
  
 

 
  loginResponse
  /loginResponse.do
 



At this point I'm stumped as to why Tomcat refuses the servlet mapping?

Stefan

www.killersites.com


- Original Message - 
From: "Andoni" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 7:39 AM
Subject: Re: Servlet mapping problem.


> If you are not using Struts why did you call the login JSP,
> loginResponse.do?
>
> Did you add .do to your web.xml file as a JSP type? Can you post your
> web.xml.
>
> Andoni.
>
> - Original Message - 
> From: "Stefan" <[EMAIL PROTECTED]>
> Newsgroups: gmane.comp.jakarta.tomcat.user
> Sent: Monday, November 22, 2004 5:36 AM
> Subject: Re: Servlet mapping problem.
>
>
> > Hi,
> >
> > I'm not using struts.
> >
> > Stefan
> >
> > www.killersites.com
> >
> >
> > - Original Message - 
> > From: "sven morales" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List" <[EMAIL PROTECTED]>
> > Sent: Monday, November 22, 2004 12:25 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > >   Can you also post all your struts-config.xml  > >  ..> ? I was looking for something that may be
> > > ing it to login.jsp.  This line you have in
> > > your form,   > > action="/context_name/loginResponse.do"  points to
> > > context_name/loginResponse.do  so show this 
> > > line of your struts-config.xml
> > >
> > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I am actually using a form to post to the target
> > > > servlet:
> > > >
> > > >  > > > method="post">
> > > >
> > > > name: 
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > The form itself is sitting in a page with this URL:
> > > >
> > > > http://127.0.0.1/myWebsite/logIn.jsp
> > > >
> > > > And the strange thing is that when I submit the form
> > > > I am taken to this URL:
> > > >
> > > > http://127.0.0.1/login.jsp
> > > >
> > > > And I get this error:
> > > >
> > > > HTTP Status 404 - /login.jsp
> > > >
> > > >
> > > >
> >
>
> --
> > --
> > > > 
> > > >
> > > > type Status report
> > > >
> > > > message /login.jsp
> > > >
> > > > description The requested resource (/login.jsp) is
> > > > not available.
> > > >
> > > >
> > > >
> >
>
> --
> > --
> > > > 
> > > >
> > > > Apache Tomcat/5.0.28
> > > > Any ideas? Is this a bug in Tomcat ? This works fine
> > > > (naturally) in Resin.
> > > >
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > > - Original Message - 
> > > > From: "sven morales" <[EMAIL PROTECTED]>
> > > > To: "Tomcat Users List"
> > > > <[EMAIL PROTECTED]>
> > > > Sent: Sunday, November 21, 2004 9:58 PM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > >Can you show us what you type in to your
> > > > browser?
> > > > >
> > > > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I first posted this question with the wrong
> > > > subject
> > > > > > heading ... sorry about
> > > > > > the duplicates.
> > > > > >
> > > > > > My question:
> > > > > >
> > > > > > Using Tomcat 5.0.28 standalone on windows XP
> > > > with
> > > > > > JVM 1.4, I get this error
> &g

RE: Servlet mapping problem.

2004-11-22 Thread Shapira, Yoav

Hi,
>message /loginResponse.do
>
>description The requested resource (/loginResponse.do) is not
available.

It seems the context_name part of your  element is blank, missing,
or wrong, since the page is asking for /loginResponse.do and not
/whatever/loginResponse.do.  Accordingly, how do you generate this
 element?  I assume you don't have the webapp's name hard-coded.

To answer your question in general, Tomcat's servlet mapping behavior is
extremely well-tested, and has been for years.  I'd be surprised if this
issue was NOT caused by a configuration or coding mistake in your
webapp.  That said, Tomcat is not as lax in permitting developer
conveniences as some other containers.

Finally, a small note: please start a new thread for a new issue, don't
reply to a different message and change the subject.  It screws up the
archives.

Yoav



This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


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



Re: Servlet mapping problem.

2004-11-22 Thread Andoni
If you are not using Struts why did you call the login JSP,
loginResponse.do?

Did you add .do to your web.xml file as a JSP type? Can you post your
web.xml.

Andoni.

- Original Message - 
From: "Stefan" <[EMAIL PROTECTED]>
Newsgroups: gmane.comp.jakarta.tomcat.user
Sent: Monday, November 22, 2004 5:36 AM
Subject: Re: Servlet mapping problem.


> Hi,
>
> I'm not using struts.
>
> Stefan
>
> www.killersites.com
>
>
> - Original Message - 
> From: "sven morales" <[EMAIL PROTECTED]>
> To: "Tomcat Users List" <[EMAIL PROTECTED]>
> Sent: Monday, November 22, 2004 12:25 AM
> Subject: Re: Servlet mapping problem.
>
>
> >   Can you also post all your struts-config.xml  >  ..> ? I was looking for something that may be
> > ing it to login.jsp.  This line you have in
> > your form,   > action="/context_name/loginResponse.do"  points to
> > context_name/loginResponse.do  so show this 
> > line of your struts-config.xml
> >
> > --- Stefan <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I am actually using a form to post to the target
> > > servlet:
> > >
> > >  > > method="post">
> > >
> > > name: 
> > >
> > > 
> > >
> > > 
> > >
> > > The form itself is sitting in a page with this URL:
> > >
> > > http://127.0.0.1/myWebsite/logIn.jsp
> > >
> > > And the strange thing is that when I submit the form
> > > I am taken to this URL:
> > >
> > > http://127.0.0.1/login.jsp
> > >
> > > And I get this error:
> > >
> > > HTTP Status 404 - /login.jsp
> > >
> > >
> > >
>
> --
> --
> > > 
> > >
> > > type Status report
> > >
> > > message /login.jsp
> > >
> > > description The requested resource (/login.jsp) is
> > > not available.
> > >
> > >
> > >
>
> --
> --
> > > 
> > >
> > > Apache Tomcat/5.0.28
> > > Any ideas? Is this a bug in Tomcat ? This works fine
> > > (naturally) in Resin.
> > >
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > > - Original Message - 
> > > From: "sven morales" <[EMAIL PROTECTED]>
> > > To: "Tomcat Users List"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, November 21, 2004 9:58 PM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > >Can you show us what you type in to your
> > > browser?
> > > >
> > > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I first posted this question with the wrong
> > > subject
> > > > > heading ... sorry about
> > > > > the duplicates.
> > > > >
> > > > > My question:
> > > > >
> > > > > Using Tomcat 5.0.28 standalone on windows XP
> > > with
> > > > > JVM 1.4, I get this error
> > > > > even though I have mapped my servlet in the
> > > web.xml
> > > > > file of the web app:
> > > > >
> > > > >
> > > > > HTTP Status 404 - /loginResponse.do
> > > > >
> > > > >
> > > >
> > >
>
> --
> > > --
> > > > > 
> > > > >
> > > > > type Status report
> > > > >
> > > > > message /loginResponse.do
> > > > >
> > > > > description The requested resource
> > > > > (/loginResponse.do) is not available.
> > > > >
> > > > >
> > > > >
> > > >
> > >
>
> --
> > > --
> > > > > 
> > > > >
> > > > > Apache Tomcat/5.0.28
> > > > >
> > > > >
> > > > > I've placed my webapp folder in Tomcats' webapps
> > > > > directory and all the jsp
> > > > > pages run fine a

Re: Servlet mapping problem.

2004-11-21 Thread Stefan
Hi,

I'm not using struts.

Stefan

www.killersites.com


- Original Message - 
From: "sven morales" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 22, 2004 12:25 AM
Subject: Re: Servlet mapping problem.


>   Can you also post all your struts-config.xml   ..> ? I was looking for something that may be
> ing it to login.jsp.  This line you have in
> your form,   action="/context_name/loginResponse.do"  points to
> context_name/loginResponse.do  so show this 
> line of your struts-config.xml
>
> --- Stefan <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I am actually using a form to post to the target
> > servlet:
> >
> >  > method="post">
> >
> > name: 
> >
> > 
> >
> > 
> >
> > The form itself is sitting in a page with this URL:
> >
> > http://127.0.0.1/myWebsite/logIn.jsp
> >
> > And the strange thing is that when I submit the form
> > I am taken to this URL:
> >
> > http://127.0.0.1/login.jsp
> >
> > And I get this error:
> >
> > HTTP Status 404 - /login.jsp
> >
> >
> >
> --
--
> > 
> >
> > type Status report
> >
> > message /login.jsp
> >
> > description The requested resource (/login.jsp) is
> > not available.
> >
> >
> >
> --
--
> > 
> >
> > Apache Tomcat/5.0.28
> > Any ideas? Is this a bug in Tomcat ? This works fine
> > (naturally) in Resin.
> >
> >
> > Stefan
> >
> > www.killersites.com
> >
> > - Original Message - 
> > From: "sven morales" <[EMAIL PROTECTED]>
> > To: "Tomcat Users List"
> > <[EMAIL PROTECTED]>
> > Sent: Sunday, November 21, 2004 9:58 PM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > >Can you show us what you type in to your
> > browser?
> > >
> > > --- Stefan <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi,
> > > >
> > > > I first posted this question with the wrong
> > subject
> > > > heading ... sorry about
> > > > the duplicates.
> > > >
> > > > My question:
> > > >
> > > > Using Tomcat 5.0.28 standalone on windows XP
> > with
> > > > JVM 1.4, I get this error
> > > > even though I have mapped my servlet in the
> > web.xml
> > > > file of the web app:
> > > >
> > > >
> > > > HTTP Status 404 - /loginResponse.do
> > > >
> > > >
> > >
> >
> --
> > --
> > > > 
> > > >
> > > > type Status report
> > > >
> > > > message /loginResponse.do
> > > >
> > > > description The requested resource
> > > > (/loginResponse.do) is not available.
> > > >
> > > >
> > > >
> > >
> >
> --
> > --
> > > > 
> > > >
> > > > Apache Tomcat/5.0.28
> > > >
> > > >
> > > > I've placed my webapp folder in Tomcats' webapps
> > > > directory and all the jsp
> > > > pages run fine as do my POJO's for business
> > logic,
> > > > any ideas why the servlet
> > > > code could be causing problems?
> > > >
> > > > The servlet mappings:
> > > >
> > > >
> > > >   code:
> > > >
> > >
> >
> --
> > --
> > > > --
> > > >
> > > >   
> > > > loginResponse
> > > >
> > >
> >
> com._ABC.authenticateAdmin
> > > > 
> > > > adminPassword
> > > > xxx
> > > >   
> > > > loginResponse
> > > > /loginResponse.do
> > > > 
> > > >
> > >
> >
> --
> > --
> > > > --
> > > >
> > > >
> > > >
> > > > It's my first time usin

Re: Servlet mapping problem.

2004-11-21 Thread sven morales
  Can you also post all your struts-config.xml  ? I was looking for something that may be
ing it to login.jsp.  This line you have in
your form,  
line of your struts-config.xml

--- Stefan <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am actually using a form to post to the target
> servlet:
> 
>  method="post">
> 
> name: 
> 
> 
> 
> 
> 
> The form itself is sitting in a page with this URL:
> 
> http://127.0.0.1/myWebsite/logIn.jsp
> 
> And the strange thing is that when I submit the form
> I am taken to this URL:
> 
> http://127.0.0.1/login.jsp
> 
> And I get this error:
> 
> HTTP Status 404 - /login.jsp
> 
> 
>

> 
> 
> type Status report
> 
> message /login.jsp
> 
> description The requested resource (/login.jsp) is
> not available.
> 
> 
>

> 
> 
> Apache Tomcat/5.0.28
> Any ideas? Is this a bug in Tomcat ? This works fine
> (naturally) in Resin.
> 
> 
> Stefan
> 
> www.killersites.com
> 
> ----- Original Message - 
> From: "sven morales" <[EMAIL PROTECTED]>
> To: "Tomcat Users List"
> <[EMAIL PROTECTED]>
> Sent: Sunday, November 21, 2004 9:58 PM
> Subject: Re: Servlet mapping problem.
> 
> 
> >Can you show us what you type in to your
> browser?
> >
> > --- Stefan <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I first posted this question with the wrong
> subject
> > > heading ... sorry about
> > > the duplicates.
> > >
> > > My question:
> > >
> > > Using Tomcat 5.0.28 standalone on windows XP
> with
> > > JVM 1.4, I get this error
> > > even though I have mapped my servlet in the
> web.xml
> > > file of the web app:
> > >
> > >
> > > HTTP Status 404 - /loginResponse.do
> > >
> > >
> >
>
--
> --
> > > 
> > >
> > > type Status report
> > >
> > > message /loginResponse.do
> > >
> > > description The requested resource
> > > (/loginResponse.do) is not available.
> > >
> > >
> > >
> >
>
--
> --
> > > 
> > >
> > > Apache Tomcat/5.0.28
> > >
> > >
> > > I've placed my webapp folder in Tomcats' webapps
> > > directory and all the jsp
> > > pages run fine as do my POJO's for business
> logic,
> > > any ideas why the servlet
> > > code could be causing problems?
> > >
> > > The servlet mappings:
> > >
> > >
> > >   code:
> > >
> >
>
--
> --
> > > --
> > >
> > >   
> > > loginResponse
> > >
> >
>
com._ABC.authenticateAdmin
> > > 
> > > adminPassword
> > > xxx
> > >   
> > > loginResponse
> > > /loginResponse.do
> > > 
> > >
> >
>
--
> --
> > > --
> > >
> > >
> > >
> > > It's my first time using Tomcat, been a Resin
> user
> > > for years ... any ideas?
> > >
> > > Thanks,
> > >
> > > Stef
> > >
> > >
> > >
> > > - Original Message - 
> > > From: "Mark Thomas" <[EMAIL PROTECTED]>
> > > To: "'Tomcat Users List'"
> > > <[EMAIL PROTECTED]>
> > > Sent: Sunday, November 21, 2004 12:10 PM
> > > Subject: RE: CGI Again...Servlet.service() for
> > > servlet cgi threw exception
> > >
> > >
> > > > I'll look into this but I need a bit more
> info:
> > > >
> > > > 1. What servlet mapping did you specify in
> > > web.xml?
> > > > 2. What URL are you requesting?
> > > >
> > > > Mark
> > > >
> > > > > -Original Message-
> > > > > From: Sergey Kamshilin
> > > [mailto:[EMAIL PROTECTED]
> > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > To: [EMAIL PROTECTED]
> > > > > Subject: CGI Again...Servlet.service() for
> > > servlet cgi threw exception
> > > > >
> > > > > Sorry guys, I gave up digging into it and
> > > haven't seen such
> > > > > problems in
> > > > > archives...
> > > > >
> > > > > Tomcat 4.1.31 on Solaris.
> > > > >
> > > > > I enabled cgi scripting:
> > > > > changes in web.xml:
> > > > > --
> > > > > 
> > > > > cgi
> > > > >
> > > > >
> > >
> >
>
org.apache.catalina.servlets.CGIServlet
> > > > > 
> > > > >   debug
> > > > >   6
> > > > > 
> > > > > 
> 
=== message truncated ===




__ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 


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



Re: Servlet mapping problem.

2004-11-21 Thread Stefan
Hi,

I am actually using a form to post to the target servlet:



name: 





The form itself is sitting in a page with this URL:

http://127.0.0.1/myWebsite/logIn.jsp

And the strange thing is that when I submit the form I am taken to this URL:

http://127.0.0.1/login.jsp

And I get this error:

HTTP Status 404 - /login.jsp





type Status report

message /login.jsp

description The requested resource (/login.jsp) is not available.





Apache Tomcat/5.0.28
Any ideas? Is this a bug in Tomcat ? This works fine (naturally) in Resin.


Stefan

www.killersites.com

- Original Message - 
From: "sven morales" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Sunday, November 21, 2004 9:58 PM
Subject: Re: Servlet mapping problem.


>Can you show us what you type in to your browser?
>
> --- Stefan <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I first posted this question with the wrong subject
> > heading ... sorry about
> > the duplicates.
> >
> > My question:
> >
> > Using Tomcat 5.0.28 standalone on windows XP with
> > JVM 1.4, I get this error
> > even though I have mapped my servlet in the web.xml
> > file of the web app:
> >
> >
> > HTTP Status 404 - /loginResponse.do
> >
> >
> --
--
> > 
> >
> > type Status report
> >
> > message /loginResponse.do
> >
> > description The requested resource
> > (/loginResponse.do) is not available.
> >
> >
> >
> --
--
> > 
> >
> > Apache Tomcat/5.0.28
> >
> >
> > I've placed my webapp folder in Tomcats' webapps
> > directory and all the jsp
> > pages run fine as do my POJO's for business logic,
> > any ideas why the servlet
> > code could be causing problems?
> >
> > The servlet mappings:
> >
> >
> >   code:
> >
> --
--
> > --
> >
> >   
> > loginResponse
> >
> com._ABC.authenticateAdmin
> > 
> > adminPassword
> > xxx
> >   
> > loginResponse
> > /loginResponse.do
> > 
> >
> --
--
> > --
> >
> >
> >
> > It's my first time using Tomcat, been a Resin user
> > for years ... any ideas?
> >
> > Thanks,
> >
> > Stef
> >
> >
> >
> > - Original Message - 
> > From: "Mark Thomas" <[EMAIL PROTECTED]>
> > To: "'Tomcat Users List'"
> > <[EMAIL PROTECTED]>
> > Sent: Sunday, November 21, 2004 12:10 PM
> > Subject: RE: CGI Again...Servlet.service() for
> > servlet cgi threw exception
> >
> >
> > > I'll look into this but I need a bit more info:
> > >
> > > 1. What servlet mapping did you specify in
> > web.xml?
> > > 2. What URL are you requesting?
> > >
> > > Mark
> > >
> > > > -Original Message-
> > > > From: Sergey Kamshilin
> > [mailto:[EMAIL PROTECTED]
> > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: CGI Again...Servlet.service() for
> > servlet cgi threw exception
> > > >
> > > > Sorry guys, I gave up digging into it and
> > haven't seen such
> > > > problems in
> > > > archives...
> > > >
> > > > Tomcat 4.1.31 on Solaris.
> > > >
> > > > I enabled cgi scripting:
> > > > changes in web.xml:
> > > > --
> > > > 
> > > > cgi
> > > >
> > > >
> >
> org.apache.catalina.servlets.CGIServlet
> > > > 
> > > >   debug
> > > >   6
> > > > 
> > > > 
> > > >   cgiPathPrefix
> > > >
> > /WEB-INF/cgi-bin/
> > > > 
> > > > 5
> > > > 
> > > > --
> > > > renamed servlets-cgi.jar
> > > >
> > > > The script is
> > > >
> >
> /usr/jakarta-tomcat/webapps/ROOT

Re: Servlet mapping problem.

2004-11-21 Thread sven morales
   Can you show us what you type in to your browser?

--- Stefan <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I first posted this question with the wrong subject
> heading ... sorry about
> the duplicates.
> 
> My question:
> 
> Using Tomcat 5.0.28 standalone on windows XP with
> JVM 1.4, I get this error
> even though I have mapped my servlet in the web.xml
> file of the web app:
> 
> 
> HTTP Status 404 - /loginResponse.do
> 
>

> 
> 
> type Status report
> 
> message /loginResponse.do
> 
> description The requested resource
> (/loginResponse.do) is not available.
> 
> 
>

> 
> 
> Apache Tomcat/5.0.28
> 
> 
> I've placed my webapp folder in Tomcats' webapps
> directory and all the jsp
> pages run fine as do my POJO's for business logic,
> any ideas why the servlet
> code could be causing problems?
> 
> The servlet mappings:
> 
> 
>   code:
>

> --
> 
>   
> loginResponse
>
com._ABC.authenticateAdmin
> 
> adminPassword
> xxx
>   
> loginResponse
> /loginResponse.do
> 
>

> --
> 
> 
> 
> It's my first time using Tomcat, been a Resin user
> for years ... any ideas?
> 
> Thanks,
> 
> Stef
> 
> 
> 
> - Original Message - 
> From: "Mark Thomas" <[EMAIL PROTECTED]>
> To: "'Tomcat Users List'"
> <[EMAIL PROTECTED]>
> Sent: Sunday, November 21, 2004 12:10 PM
> Subject: RE: CGI Again...Servlet.service() for
> servlet cgi threw exception
> 
> 
> > I'll look into this but I need a bit more info:
> >
> > 1. What servlet mapping did you specify in
> web.xml?
> > 2. What URL are you requesting?
> >
> > Mark
> >
> > > -Original Message-
> > > From: Sergey Kamshilin
> [mailto:[EMAIL PROTECTED]
> > > Sent: Saturday, November 20, 2004 12:00 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: CGI Again...Servlet.service() for
> servlet cgi threw exception
> > >
> > > Sorry guys, I gave up digging into it and
> haven't seen such
> > > problems in
> > > archives...
> > >
> > > Tomcat 4.1.31 on Solaris.
> > >
> > > I enabled cgi scripting:
> > > changes in web.xml:
> > > --
> > > 
> > > cgi
> > >
> > >
>
org.apache.catalina.servlets.CGIServlet
> > > 
> > >   debug
> > >   6
> > > 
> > > 
> > >   cgiPathPrefix
> > >  
> /WEB-INF/cgi-bin/
> > > 
> > > 5
> > > 
> > > --
> > > renamed servlets-cgi.jar
> > >
> > > The script is
> > >
>
/usr/jakarta-tomcat/webapps/ROOT/WEB-INF/cgi-bin/index.pl
> > > (Everything is OK, Right?)
> > > 
> > > when I try to access it I got the error:
> > > 2004-11-19 15:53:15 cgi: findCGI:
> path=/index.cgi,
> > >
>
/usr/jakarta-tomcat-4.1.31/webapps/ROOT//WEB-INF/cgi-bin/
> > > 2004-11-19 15:53:15 cgi: findCGI:
> > >
>
currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
> > > 2004-11-19 15:53:15 cgi: findCGI:
> > >
>
currentLoc=/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin
> > > 2004-11-19 15:53:15 cgi: findCGI: FOUND cgi at
> > >
>
/usr/jakarta-tomcat-4.1.31/webapps/ROOT/WEB-INF/cgi-bin/index.cgi
> > > 2004-11-19 15:53:15 StandardWrapperValve[cgi]:
> > > Servlet.service() for servlet
> > > cgi threw exception
> > > java.lang.StringIndexOutOfBoundsException:
> String index out
> > > of range: -2
> > > at
> java.lang.String.substring(String.java:1444)
> > > at
> java.lang.String.substring(String.java:1411)
> > > at
> > >
>
org.apache.catalina.servlets.CGIServlet$CGIEnvironment.findCGI
> > > (CGIServlet.ja
> > > va:935)
> > > 
> > > Why the servlet makes exception What else I
> need to check?
> > >
> > > Thank you!
> > >
> > > /Sergeyk
> > >
> > > (Lab Documentation -
> > > "\\Lizard\rad\DraftDocs\msv\ctn\1290 Lab network
> description")
> > > Phone: 604 918-6360
> > > Cell:  604 351-8966
> > >
> > >
> > >
>
-
> > > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >
> >
>
-
> > To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > For additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> 
> 
>
-
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 




__ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


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



Re: Servlet mapping problem

2004-09-29 Thread Michael McGrady
Anto Paul wrote:
Hi there,
 I posted this to Tomcat User List. I didnt posted this to Struts.
Although the application is using Struts it is not specific to Struts.
rgds
Anto Paul
On Wed, 29 Sep 2004 00:59:53 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
 

Anto Paul wrote:
   

Hi all,
I am writing an application which have to serve content based on the
hostname it is requested. Different hosts will be set to same ROOT
directory. There wont be any content at the ROOT. Everything will be
on subdirectories. I wrote a servlet with mapping as / . But when it
is forwarded to subdirectory it is coming to same servlet and
executing in a loop. This is an example of what I need.
Directory structure.   Host name
ROOT/sites/one.com -  one.com
ROOT/sites/two.comtwo.com
ROOT/sites/three.com  three.com
A request to one.com should go to /sites/one.com .
A request to two.com should go to /sites/two.com .
How to make it.
Thanks in advance
Anto Paul

 

Hello, Anto,
I don't have enough information to tell what your  problem is.  Are you
using ActionForwards to go to these areas?  What "servlet" with a
mapping as / are you talking about?  Remember this is a Struts list.  If
you have everything mapped to your servlet in your web.xml, then, of
course, everything is going to go to your servlet.  I suspect this is
what you have done.  Why do you have a servlet with a "mapping" as "/" ?
Michael McGrady
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   


 

Oops, my bad. 

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


RE: Servlet mapping problem

2004-09-29 Thread Shapira, Yoav

Hi,
You can do forwards from a filter if you want, as well as sendRedirects.
It's a valid use for them.  Just be careful to only forward/redirect the
appropriate requests, e.g. if something is requesting a gif or HTML you
probably don't want to do anything, just pass it through.

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: Anto Paul [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, September 29, 2004 10:06 AM
>To: Tomcat Users List
>Subject: Re: Servlet mapping problem
>
>What if I use a filter ?. I will map it like this
>
>
>MappingFilter
>/
>
>
> 
>MappingFilter
>/*
>
>
>In filter I forward to the path substituted with the directory. With
>servlet I failed to achieve what I want. I am sceptical about using a
>forward in a filter. This filter is the only filter that exists in the
>application. Even if another filter is added it can be put as he last
>filter in web.xml. Please comment on this.
>
>rgds
>Anto Paul
>
>
>On Wed, 29 Sep 2004 09:04:32 -0400, Shapira, Yoav
<[EMAIL PROTECTED]>
>wrote:
>>
>> Hi,
>>
>> >However, I am sure about the fact, that you cannot map a single url
>> such as
>> >"/".
>> >(Yes, you can define a mapping of "/", but that maps to EVERY
request,
>> NOT
>> >to the root url only.)
>>
>> No.  You're mistaking the default configuration for something that's
>> hard-coded.  Out of the box, "/" is mapped to Tomcat's
DefaultServlet,
>> which handles static content.  This is routine for other containers
as
>> well and is not a particular Tomcat trick.
>>
>> Per the servlet spec, / is the default mapping also, so anything
that's
>> not matched by other mappings will end up there.
>>
>> So, here's one way to change things:
>> - Explicitly map the things you want handled by Tomcat's
DefaultServlet
>> to it, e.g.
>>
DefaultServlet*.html> ern>.  Same for *.htm, *.gif, *.jpg, *.png, etc.
>> - Map any servlet of your choice to URL pattern /.
>> - Ensure that rest of your app has no unmapped pages, i.e. ones
that'll
>> propagate to /.
>>
>>
>>
>> Yoav
>>
>> This e-mail, including any attachments, is a confidential business
>communication, and may contain information that is confidential,
>proprietary and/or privileged.  This e-mail is intended only for the
>individual(s) to whom it is addressed, and may not be saved, copied,
>printed, disclosed or used by anyone else.  If you are not the(an)
intended
>recipient, please immediately delete this e-mail from your computer
system
>and notify the sender.  Thank you.
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
>
>--
>To strive,to seek,to find and not to yield
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet mapping problem

2004-09-29 Thread Anto Paul
What if I use a filter ?. I will map it like this


MappingFilter
/


 
MappingFilter
/*


In filter I forward to the path substituted with the directory. With
servlet I failed to achieve what I want. I am sceptical about using a
forward in a filter. This filter is the only filter that exists in the
application. Even if another filter is added it can be put as he last
filter in web.xml. Please comment on this.

rgds
Anto Paul 


On Wed, 29 Sep 2004 09:04:32 -0400, Shapira, Yoav <[EMAIL PROTECTED]> wrote:
> 
> Hi,
> 
> >However, I am sure about the fact, that you cannot map a single url
> such as
> >"/".
> >(Yes, you can define a mapping of "/", but that maps to EVERY request,
> NOT
> >to the root url only.)
> 
> No.  You're mistaking the default configuration for something that's
> hard-coded.  Out of the box, "/" is mapped to Tomcat's DefaultServlet,
> which handles static content.  This is routine for other containers as
> well and is not a particular Tomcat trick.
> 
> Per the servlet spec, / is the default mapping also, so anything that's
> not matched by other mappings will end up there.
> 
> So, here's one way to change things:
> - Explicitly map the things you want handled by Tomcat's DefaultServlet
> to it, e.g.
> DefaultServlet*.html ern>.  Same for *.htm, *.gif, *.jpg, *.png, etc.
> - Map any servlet of your choice to URL pattern /.
> - Ensure that rest of your app has no unmapped pages, i.e. ones that'll
> propagate to /.
> 
> 
> 
> Yoav
> 
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged.  
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
To strive,to seek,to find and not to yield

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



RE: Servlet mapping problem

2004-09-29 Thread Shapira, Yoav

Hi,

>However, I am sure about the fact, that you cannot map a single url
such as
>"/".
>(Yes, you can define a mapping of "/", but that maps to EVERY request,
NOT
>to the root url only.)

No.  You're mistaking the default configuration for something that's
hard-coded.  Out of the box, "/" is mapped to Tomcat's DefaultServlet,
which handles static content.  This is routine for other containers as
well and is not a particular Tomcat trick.

Per the servlet spec, / is the default mapping also, so anything that's
not matched by other mappings will end up there.

So, here's one way to change things:
- Explicitly map the things you want handled by Tomcat's DefaultServlet
to it, e.g.
DefaultServlet*.html.  Same for *.htm, *.gif, *.jpg, *.png, etc.
- Map any servlet of your choice to URL pattern /.
- Ensure that rest of your app has no unmapped pages, i.e. ones that'll
propagate to /.

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Servlet mapping problem

2004-09-29 Thread Shapira, Yoav

Hi,

>You cannot map a single url. Tomcat only maps prefixes. So, you cannot
map

Really?  Where did this nugget come from? ;)  I nearly choked on my
(otherwise fabulous) croissant.  Your assertion above is wrong.  Tomcat
implements servlet mapping exactly as required by the Servlet
Specification (SRV 11).  That includes path, extension, and default
mappings.  That also includes specific handling of the / mapping (which
is valid and is used in Tomcat all the time, usually without the user
being aware of it).

Yoav



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet mapping problem

2004-09-29 Thread Anto Paul
Hi there,
  I posted this to Tomcat User List. I didnt posted this to Struts.
Although the application is using Struts it is not specific to Struts.

rgds
Anto Paul


On Wed, 29 Sep 2004 00:59:53 -0700, Michael McGrady
<[EMAIL PROTECTED]> wrote:
> 
> 
> Anto Paul wrote:
> 
> >Hi all,
> >  I am writing an application which have to serve content based on the
> >hostname it is requested. Different hosts will be set to same ROOT
> >directory. There wont be any content at the ROOT. Everything will be
> >on subdirectories. I wrote a servlet with mapping as / . But when it
> >is forwarded to subdirectory it is coming to same servlet and
> >executing in a loop. This is an example of what I need.
> >
> >Directory structure.   Host name
> >ROOT/sites/one.com -  one.com
> >ROOT/sites/two.comtwo.com
> >ROOT/sites/three.com  three.com
> >
> >A request to one.com should go to /sites/one.com .
> >A request to two.com should go to /sites/two.com .
> >
> >How to make it.
> >
> >Thanks in advance
> >
> >Anto Paul
> >
> >
> >
> >
> Hello, Anto,
> 
> I don't have enough information to tell what your  problem is.  Are you
> using ActionForwards to go to these areas?  What "servlet" with a
> mapping as / are you talking about?  Remember this is a Struts list.  If
> you have everything mapped to your servlet in your web.xml, then, of
> course, everything is going to go to your servlet.  I suspect this is
> what you have done.  Why do you have a servlet with a "mapping" as "/" ?
> 
> Michael McGrady
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 



-- 
To strive,to seek,to find and not to yield

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



Re: Servlet mapping problem

2004-09-29 Thread Michael McGrady
Anto Paul wrote:
Hi all,
 I am writing an application which have to serve content based on the
hostname it is requested. Different hosts will be set to same ROOT
directory. There wont be any content at the ROOT. Everything will be
on subdirectories. I wrote a servlet with mapping as / . But when it
is forwarded to subdirectory it is coming to same servlet and
executing in a loop. This is an example of what I need.
Directory structure.   Host name
ROOT/sites/one.com -  one.com
ROOT/sites/two.comtwo.com
ROOT/sites/three.com  three.com
A request to one.com should go to /sites/one.com .
A request to two.com should go to /sites/two.com .
How to make it.
Thanks in advance
Anto Paul
 

Hello, Anto,
I don't have enough information to tell what your  problem is.  Are you 
using ActionForwards to go to these areas?  What "servlet" with a 
mapping as / are you talking about?  Remember this is a Struts list.  If 
you have everything mapped to your servlet in your web.xml, then, of 
course, everything is going to go to your servlet.  I suspect this is 
what you have done.  Why do you have a servlet with a "mapping" as "/" ?

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


RE: servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread Dale, Matt

You need to enable the invoker servlet in your web.xml. This is not recommended for 
production but it should work just as you expect.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 03 August 2004 18:52
To: Tomcat Users List
Subject: servlet-mapping required??? Tomcat 5 upgrade problem...



Hi,

I'm using Struts with Tomcat, and am upgrading to Tomcat 5.

It appears that it won't recognize any of my servlets, though, which I
could previously call though ...[webapp]/servlet/servletname.

I managed to call them by adding a servlet-mapping to eliminate the
/servlet/ bit, but this is an existing app and I don't want to change
everything to that degree.

Can't I still use /servlet/ ?  What am I missing?

cheers,

David





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

Any opinions expressed in this E-mail may be those of the individual and not 
necessarily the company. This E-mail and any files transmitted with it are 
confidential and solely for the use of the intended recipient. If you are not the 
intended recipient or the person responsible for delivering to the intended recipient, 
be advised that you have received this E-mail in error and that any use or copying is 
strictly prohibited. If you have received this E-mail in error please notify the 
beCogent postmaster at [EMAIL PROTECTED]
Unless expressly stated, opinions in this email are those of the individual sender and 
not beCogent Ltd. You must take full responsibility for virus checking this email and 
any attachments.
Please note that the content of this email or any of its attachments may contain data 
that falls within the scope of the Data Protection Acts and that you must ensure that 
any handling or processing of such data by you is fully compliant with the terms and 
provisions of the Data Protection Act 1984 and 1998.


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

RE: servlet-mapping required??? Tomcat 5 upgrade problem...

2004-08-03 Thread Shapira, Yoav

Hi,
See http://jakarta.apache.org/tomcat/faq/misc.html#invoker.  You should
have always had s.

Yoav Shapira
Millennium Research Informatics


>-Original Message-
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 03, 2004 1:52 PM
>To: Tomcat Users List
>Subject: servlet-mapping required??? Tomcat 5 upgrade problem...
>
>
>Hi,
>
>I'm using Struts with Tomcat, and am upgrading to Tomcat 5.
>
>It appears that it won't recognize any of my servlets, though, which I
>could previously call though ...[webapp]/servlet/servletname.
>
>I managed to call them by adding a servlet-mapping to eliminate the
>/servlet/ bit, but this is an existing app and I don't want to change
>everything to that degree.
>
>Can't I still use /servlet/ ?  What am I missing?
>
>cheers,
>
>David
>
>
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet-Mapping Question, recursive capable?

2004-02-25 Thread David Erickson
I hope they hurry up and do it... it's not that big of a change and it would
make life much easier..  for that matter it really annoys me how when your
extension mapping, say *.do for struts, the servlet strips what you
extension mapped off when it sends it to the servlet.  IE if you matched
/actions/blah.do with a *.do mapping, struts only gets /actions/blah to
match by..
-David

- Original Message - 
From: "Daniel Gibby" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, February 25, 2004 6:54 AM
Subject: Re: Servlet-Mapping Question, recursive capable?


> I'm just predicting the future, and I think eventually the ** convention
> will be adopted in many systems and specs. I'm kinda going off topic, so
> sorry.
>
> dangby
>
> Tim Funk wrote:
>
> > The mapping rules are dictated by the servlet spec. Its not tomcat
> > specific.
> >
> > -Tim
> >
> > Daniel Gibby wrote:
> >
> >> Too bad though. I really like ant's recursive matching capabilities.
> >> I think that eventually a 'rebash' shell will be written that
> >> supports ** as recursive so that
> >> grep catalina **/docs/*.java
> >> would look for only java files in a subdirectory somewhere named docs
> >> with the text catalina in it. How nice would that be!
> >>
> >> Then apache and tomcat will decide on supporting this as well...
> >>
> >> Daniel Gibby
> >>
> >> Tim Funk wrote:
> >>
> >>> No. You can prefix match or file extension match, but not both at
> >>> the same time.
> >>>
> >>> -Tim
> >>>
> >>> David Erickson wrote:
> >>>
> >>>> Hi I would like to do something like:
> >>>> 
> >>>>
> >>>> action
> >>>>
> >>>> /docs/**.pdf
> >>>>
> >>>> 
> >>>>
> >>>>
> >>>>
> >>>> So that anything in the /docs/ folder AND ANY of its subfolders
> >>>> with the
> >>>> .pdf extension gets sent to my action servlet.
> >>>>
> >>>> Is that possible with tomcat 4.1.24?  If not does anybody know the
> >>>> class
> >>>> that matches those things so I can alter it?
> >>>>
> >>>> Thanks!
> >>>>
> >>>> -David
> >>>
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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



RE: servlet mapping problem

2004-02-25 Thread Shapira, Yoav

Howdy,

>   unpackWARs="true" autoDeploy="true"
>   xmlValidation="false" xmlNamespaceAware="false">
>
>If I want multiple appBase directories for this host, can I define
>multiple host lines, changing the appBase directive for each one?

Each host has one appBase directory.  You can either change "localhost"
or define another Host (you can have as many as you want).  The appBase
is either absolute (/cs/...) or relative to $CATALINA_HOME.

>Would this mean that I now do not have to add any context lines for the
>applications to work?

Yes, by default, thanks to the Automatic Application Deployment.  Read
these:
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automat
ic%20Application%20Deployment

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: servlet mapping problem

2004-02-25 Thread Jason Keltz
Thanks, Yoav.

Using localhost:8080/test works if the docBase in the context is defined
to include test.  However, as you suggested, I'm trying to create a
directory with multiple webapps, and I want to have multiple directories
like this.  For example:

/cs/home/jas/webapps1/app1
/cs/home/jas/webapps1/app2

/cs/home/jas/webapps2/app3

/cs/home/jas/webapps3/app4
/cs/home/jas/webapps3/app5

I would prefer not to have to define each context/webapp individually, and
I would like new webapps to automatically be deployed if placed in any of
these repositories.  You say that I can define appBase for the host.
Right now, in server.xml, I see:



If I want multiple appBase directories for this host, can I define
multiple host lines, changing the appBase directive for each one?

Would this mean that I now do not have to add any context lines for the
applications to work?

Thanks so much for your help ...

Jason.

On Wed, 25 Feb 2004, Shapira, Yoav wrote:

>
> Howdy,
>
> >I am very troubled over a servlet mapping problem, and I am hoping that
> >someone can make a suggestion.
> >
> >I have added a context in conf/Catalina/localhost/test.xml as follows:
> >
> > reloadable="true"
> >autoDeploy="true">
> >
> >In "/cs/home/jas/webapps/test", I have a directory "test" with a
> >"WEB-INF" directory containing:
>
> Make sure you understand that one context = one webapp.  If you want the
> "test" webapp to available, make test.xml more like
>
> 
>
> And then go to http://yourhost:yourport/test to access your webapp.
>
> If you have multiple webapps under /cs/home/jas/webapps and want tomcat
> to recognize them all, define /cs/home/jas/webapps as the appBase
> directory for a Host.
>
> Yoav Shapira
>
>
>
> This e-mail, including any attachments, is a confidential business communication, 
> and may contain information that is confidential, proprietary and/or privileged.  
> This e-mail is intended only for the individual(s) to whom it is addressed, and may 
> not be saved, copied, printed, disclosed or used by anyone else.  If you are not 
> the(an) intended recipient, please immediately delete this e-mail from your computer 
> system and notify the sender.  Thank you.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

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



RE: servlet mapping problem

2004-02-25 Thread Shapira, Yoav

Howdy,

>Context block should be in conf/server.xml file.

It doesn't have to be, and with tomcat 5 that's actually discouraged.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: servlet mapping problem

2004-02-25 Thread BAO RuiXian


Jason Keltz wrote:

Hi.

I am very troubled over a servlet mapping problem, and I am hoping that
someone can make a suggestion.
I have added a context in conf/Catalina/localhost/test.xml as follows:
 

Context block should be in conf/server.xml file.

Best

Bao



In "/cs/home/jas/webapps/test", I have a directory "test" with a
"WEB-INF" directory containing:
1) a "classes" directory containing HelloWorldExample.class
2) a "web.xml" file containing:

http://java.sun.com/dtd/web-app_2_3.dtd";>


   Servlet Example
   
 Servlet Example
   
   
   HelloWorldExample
   HelloWorldExample
   
   
   HelloWorldExample
   /servlet/HelloWorldExample
   


--

If I try to go to:

http://localhost:8080/mywebapps/servlet/HelloWorldExample

I get that the requested resource is not available.

Please help.

Thanks,

Jason.

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



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


RE: servlet mapping problem

2004-02-25 Thread Shapira, Yoav

Howdy,

>I am very troubled over a servlet mapping problem, and I am hoping that
>someone can make a suggestion.
>
>I have added a context in conf/Catalina/localhost/test.xml as follows:
>
>autoDeploy="true">
>
>In "/cs/home/jas/webapps/test", I have a directory "test" with a
>"WEB-INF" directory containing:

Make sure you understand that one context = one webapp.  If you want the
"test" webapp to available, make test.xml more like



And then go to http://yourhost:yourport/test to access your webapp.

If you have multiple webapps under /cs/home/jas/webapps and want tomcat
to recognize them all, define /cs/home/jas/webapps as the appBase
directory for a Host.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet-Mapping Question, recursive capable?

2004-02-25 Thread Daniel Gibby
I'm just predicting the future, and I think eventually the ** convention 
will be adopted in many systems and specs. I'm kinda going off topic, so 
sorry.

dangby

Tim Funk wrote:

The mapping rules are dictated by the servlet spec. Its not tomcat 
specific.

-Tim

Daniel Gibby wrote:

Too bad though. I really like ant's recursive matching capabilities. 
I think that eventually a 'rebash' shell will be written that 
supports ** as recursive so that
grep catalina **/docs/*.java
would look for only java files in a subdirectory somewhere named docs 
with the text catalina in it. How nice would that be!

Then apache and tomcat will decide on supporting this as well...

Daniel Gibby

Tim Funk wrote:

No. You can prefix match or file extension match, but not both at 
the same time.

-Tim

David Erickson wrote:

Hi I would like to do something like:

action

/docs/**.pdf





So that anything in the /docs/ folder AND ANY of its subfolders 
with the
.pdf extension gets sent to my action servlet.

Is that possible with tomcat 4.1.24?  If not does anybody know the 
class
that matches those things so I can alter it?

Thanks!

-David 



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


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


Re: Servlet-Mapping Question, recursive capable?

2004-02-25 Thread Tim Funk
The mapping rules are dictated by the servlet spec. Its not tomcat specific.

-Tim

Daniel Gibby wrote:
Too bad though. I really like ant's recursive matching capabilities. I 
think that eventually a 'rebash' shell will be written that supports ** 
as recursive so that
grep catalina **/docs/*.java
would look for only java files in a subdirectory somewhere named docs 
with the text catalina in it. How nice would that be!

Then apache and tomcat will decide on supporting this as well...

Daniel Gibby

Tim Funk wrote:

No. You can prefix match or file extension match, but not both at the 
same time.

-Tim

David Erickson wrote:

Hi I would like to do something like:

action

/docs/**.pdf





So that anything in the /docs/ folder AND ANY of its subfolders with the
.pdf extension gets sent to my action servlet.
Is that possible with tomcat 4.1.24?  If not does anybody know the class
that matches those things so I can alter it?
Thanks!

-David 


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


Re: Servlet-Mapping Question, recursive capable?

2004-02-24 Thread Daniel Gibby
Too bad though. I really like ant's recursive matching capabilities. I 
think that eventually a 'rebash' shell will be written that supports ** 
as recursive so that
grep catalina **/docs/*.java
would look for only java files in a subdirectory somewhere named docs 
with the text catalina in it. How nice would that be!

Then apache and tomcat will decide on supporting this as well...

Daniel Gibby

Tim Funk wrote:

No. You can prefix match or file extension match, but not both at the 
same time.

-Tim

David Erickson wrote:

Hi I would like to do something like:

action

/docs/**.pdf





So that anything in the /docs/ folder AND ANY of its subfolders with the
.pdf extension gets sent to my action servlet.
Is that possible with tomcat 4.1.24?  If not does anybody know the class
that matches those things so I can alter it?
Thanks!

-David 


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


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


Re: Servlet-Mapping Question, recursive capable?

2004-02-24 Thread Tim Funk
No. You can prefix match or file extension match, but not both at the same time.

-Tim

David Erickson wrote:

Hi I would like to do something like:

action

/docs/**.pdf





So that anything in the /docs/ folder AND ANY of its subfolders with the
.pdf extension gets sent to my action servlet.
Is that possible with tomcat 4.1.24?  If not does anybody know the class
that matches those things so I can alter it?
Thanks!

-David 


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


Re: servlet-mapping like mod_rewrite?

2003-12-10 Thread David Evans
 req.getRequestDispatcher("path/To/servlet")


On Wed, 2003-12-10 at 10:46, Marten Lehmann wrote:
> Hello,
> 
> > What about using one centralized servlet that parses
> > req.getPathInfo(), sets the language as request attribute
> > and forwards to the real servlet(s) ?
> 
> how is a request-forwarding done?
> 
> Regards
> Marten
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



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



RE: servlet-mapping like mod_rewrite?

2003-12-10 Thread Ralph Einfeldt
Sorry not much time, try searching for request dispatcher and forward

> -Original Message-
> From: Marten Lehmann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 10, 2003 4:46 PM
> To: Tomcat Users List
> Subject: Re: servlet-mapping like mod_rewrite?
> 
> 
> Hello,
> 
> > What about using one centralized servlet that parses
> > req.getPathInfo(), sets the language as request attribute
> > and forwards to the real servlet(s) ?
> 
> how is a request-forwarding done?
> 
> Regards
> Marten
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

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



Re: servlet-mapping like mod_rewrite?

2003-12-10 Thread Marten Lehmann
Hello,

Have a session variable that tracks what language they're using.
I'm not looking for a different solution, but one, that solves my 
question. I definitely cannot do anything else than the /de/ or /en/ thing.

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


Re: servlet-mapping like mod_rewrite?

2003-12-10 Thread Marten Lehmann
Hello,

What about using one centralized servlet that parses
req.getPathInfo(), sets the language as request attribute
and forwards to the real servlet(s) ?
how is a request-forwarding done?

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


RE: servlet-mapping like mod_rewrite?

2003-12-10 Thread Ralph Einfeldt

What about using one centralized servlet that parses
req.getPathInfo(), sets the language as request attribute
and forwards to the real servlet(s) ?

> -Original Message-
> From: Marten Lehmann [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, December 09, 2003 11:26 PM
> To: [EMAIL PROTECTED]
> Subject: servlet-mapping like mod_rewrite?
> 
> 
> through /de/* (german) and /en/* (english). Of course, I 
> don't want to 
> use two servlet-repositories for that. My idea is, that no matter if 
> e.g. /en/helloworld or /de/helloworld is requested, a unique 
> helloworld-servlet creates the response and chooses the language by 
> parsing req.getPathInfo() for /de/ resp. /en/. As it isn't only one 
> centralized servlet, I can't use the /* url-pattern. And I 
> don't want to 
> use a servlet-definition and according /en/??? and  /de/??? 
> url-pattern 
> for every single servlet. How else can I do this?
> 

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



RE: servlet-mapping like mod_rewrite?

2003-12-09 Thread Hart, Justin
Have a session variable that tracks what language they're using.

Justin

>>>
to offer language-depended websites I want to make a webapp available 
through /de/* (german) and /en/* (english). Of course, I don't want to 
use two servlet-repositories for that. My idea is, that no matter if 
e.g. /en/helloworld or /de/helloworld is requested, a unique 
helloworld-servlet creates the response and chooses the language by 
parsing req.getPathInfo() for /de/ resp. /en/. As it isn't only one 
centralized servlet, I can't use the /* url-pattern. And I don't want to 
use a servlet-definition and according /en/??? and  /de/??? url-pattern 
for every single servlet. How else can I do this?

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



RE: servlet-Mapping using Tomcat 4

2003-08-14 Thread Shapira, Yoav

Howdy,

>2. Name of JSP = whoKnows.war

I'll assume you meant name of war file.

>1. The main problem ist, that 'normal call' (/whoKnows/) works fine.
That
>means that I get my index.jsp, and all works the way I wanted to.
>BUT, if I use /whoKnows/foo/bar my java-class of my jsp-Servlet
(defined in
>whoKnows web.xml)
>is directly called (skipping my index.jsp). But I still want that my
>index.jsp is called first.
>May JSP-Page knows what to do with the java-class. Any Idea how I can
>configure this?

You need a filter also mapped to /foo/bar which inspects the request or
session to see if an attribute is present.  That attribute is one that's
placed there by index.jsp.  If the attribute is not present, the filter
will redirect the request to index.jsp.  If the attribute is present,
the filter will let the request proceed.

>2. The default context ist the Name of the JSP in the webapps-dir.
>In this case it is '/whoKnows'. Is there any trick, that I cann change
>this?

Yes, read the  configuration reference in the tomcat docs.

>I know that it is possible to configure an context for every
application in
>tomcats own xml-configuration files. But who is this done, and is there
any
>better possibility (doing this in whoKnows web.xml for example)?

You can include a context.xml with your war file.  Or configure the
context in $CATALINA_HOM/conf/server.xml.  Again, read the 
configuration reference.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet mapping for root directory in a webapp?

2003-08-14 Thread Fredrik Jonson
Following up to myself here... 

On Thu, 7 Aug 2003, Fredrik Jonson wrote:

> I'm trying to get tomcat (from sun's jwsdp1.2) to do a default mapping. 
> 
> I (and a lot of other people, apparently =) have tried:
> 
> 
> MainView
> /
> 

Today I changed it to:

 
 MainView
 /index.html
 

And, as I understand it, tomcat(?) returns that servlet mapping for
requests for the root catalog. Well, it is a kind of workaround, but
since it works well enough I'll just accept that and continue. 

But if anyone know more about the magic behind it all, I'd be very
greatful for a thorough explanation of how and why it works. 

TIA & regards, 
-- 
Fredrik Jonson


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



Re: Servlet mapping for root directory in a webapp?

2003-08-10 Thread Bill Barker
Alternatively, having a zero-length index.html file in your directory,
together with a  should also work.

"Shapira, Yoav" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Howdy,

>Today I changed it to:
>
> 
> MainView
> /index.html
> 
>
>And, as I understand it, tomcat(?) returns that servlet mapping for
>requests for the root catalog. Well, it is a kind of workaround, but
>since it works well enough I'll just accept that and continue.
>
>But if anyone know more about the magic behind it all, I'd be very
>greatful for a thorough explanation of how and why it works.

There's no magic, it's a clearly defined mapping for the url-pattern
according to the laws in the servlet specification, v2.3.  You can raise
the logging level for the Host/Engine to see exactly the pattern
resolution steps.

The Servlet Specification v2.4, which tomcat 5 implements, supports a
servlet as the welcome-file, which is what you are trying to do.

Until then, most people make do with a simple index.html containing a
meta http-equiv refresh directive.

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to
whom it is addressed, and may not be saved, copied, printed, disclosed or
used by anyone else.  If you are not the(an) intended recipient, please
immediately delete this e-mail from your computer system and notify the
sender.  Thank you.




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



RE: Servlet mapping for root directory in a webapp?

2003-08-07 Thread Shapira, Yoav

Howdy,

>Today I changed it to:
>
> 
> MainView
> /index.html
> 
>
>And, as I understand it, tomcat(?) returns that servlet mapping for
>requests for the root catalog. Well, it is a kind of workaround, but
>since it works well enough I'll just accept that and continue.
>
>But if anyone know more about the magic behind it all, I'd be very
>greatful for a thorough explanation of how and why it works.

There's no magic, it's a clearly defined mapping for the url-pattern
according to the laws in the servlet specification, v2.3.  You can raise
the logging level for the Host/Engine to see exactly the pattern
resolution steps.

The Servlet Specification v2.4, which tomcat 5 implements, supports a
servlet as the welcome-file, which is what you are trying to do.

Until then, most people make do with a simple index.html containing a
meta http-equiv refresh directive.

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Servlet mapping problem in Tomcat 4.1.24

2003-07-29 Thread Bodycombe, Andrew
There are 2 ways you can use wildcards in URL mappings:

1. /content/* - maps all URLs in the content directory to your servlet
2. *.vp - maps all URLs with a .vp extension to your servlet

You cannot mix these (/content/*.vp, for example)

The servlet specification discusses this. Look at section 11.2
The spec can be downloaded from the following URL:
http://www.jcp.org/aboutJava/communityprocess/final/jsr053/

Andy

-Original Message-
From: Jan Pekník [mailto:[EMAIL PROTECTED] 
Sent: 28 July 2003 21:39
To: Tomcat Users List
Subject: Servlet mapping problem in Tomcat 4.1.24


Hi,

I need to map servlet to some "virtual" file extension, i.e.
"/content/*.vp".
When I set this in web.xml, and make request "/content/somepage.html.vp",
Tomcat ignores this mapping and servlets is not invoked.
When I change mapping to "/content/*", everything works ok. Where is the
problem?
I'm using Tomcat 4.1.24 on Windows 2000.
Thanks for any help.

-Jan Peknik



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

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



RE: Servlet mapping error

2003-06-27 Thread KKolle

Thanks, I knew it was somthing simple/stupid.  Works now.



   

  "Shapira, Yoav"  

  <[EMAIL PROTECTED]To:   "Tomcat Users List" <[EMAIL 
PROTECTED]>  
  .com>cc: 

               Subject:  RE: Servlet mapping error 

  06/27/2003 12:35 

  PM   

  Please respond to

  "Tomcat Users

  List"

   

   






Howdy,

>Under /webapps/bugtracker/WEB-INF/web.xml, I have the
>following
>snippet of lines:
>
>  LoginServlet
>
>com.bugtracker.servlets.LoginServlet
>
>
>  LoginServlet
>  /servlets/LoginServlet
>
>
>Under /webapps/bugtracker/WEB-INF/classes, I have:
>  /com/bugtracker/servlets/LoginServlet.class
>
>In my login.jsp, I have this line:
>  

The action URL is wrong, should be "/bugtracker/servlets/LoginServlet"

Yoav Shapira



This e-mail, including any attachments, is a confidential business
communication, and may contain information that is confidential, proprietary
and/or privileged.  This e-mail is intended only for the individual(s) to whom
it is addressed, and may not be saved, copied, printed, disclosed or used by
anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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







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



RE: Servlet mapping error

2003-06-27 Thread Shapira, Yoav

Howdy,

>Under /webapps/bugtracker/WEB-INF/web.xml, I have the
>following
>snippet of lines:
>
>  LoginServlet
>
>com.bugtracker.servlets.LoginServlet
>
>
>  LoginServlet
>  /servlets/LoginServlet
>
>
>Under /webapps/bugtracker/WEB-INF/classes, I have:
>  /com/bugtracker/servlets/LoginServlet.class
>
>In my login.jsp, I have this line:
>  

The action URL is wrong, should be "/bugtracker/servlets/LoginServlet"

Yoav Shapira



This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



RE: Servlet mapping error

2003-06-27 Thread Bodycombe, Andrew
Try the following URL: http:///bugtracker/servlets/LoginServlet

Hope this helps,
Andy

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 27 June 2003 18:17
To: [EMAIL PROTECTED]
Subject: Servlet mapping error


I'm trying to map a Servlet URL and then invoke that Servlet in my web app.
When I attempt this, I'm getting the following error in my browser:

[start error]
HTTP Status 404 - /servlets/LoginServlet




type Status report

message /servlets/LoginServlet

description The requested resource (/servlets/LoginServlet) is not
available.





Apache Tomcat/4.1.24
[end error]

Under /webapps/bugtracker/WEB-INF/web.xml, I have the following
snippet of lines:

  LoginServlet

com.bugtracker.servlets.LoginServlet


  LoginServlet
  /servlets/LoginServlet


Under /webapps/bugtracker/WEB-INF/classes, I have:
  /com/bugtracker/servlets/LoginServlet.class

In my login.jsp, I have this line:
  


Can anyone give me suggestions on what I might be doing wrong?  Thanks



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

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



RE: Servlet Mapping with parameters

2003-03-10 Thread Shapira, Yoav

Howdy,
You can access  parameters any time, not just during
initialization.  The same is true for  parameters.

As for including parameters in  elements, that doesn't make
much sense.  URL patterns are interpreted by the container for mapping
purposes using a very specific, well defined algorithm.  You shouldn't
use them for anything except mapping of requests to resources.  You
shouldn't use them to indicate how the resources should function, e.g.
what the resources should do.

Yoav Shapira
Millennium ChemInformatics


>-Original Message-
>From: Greg Speechley [mailto:[EMAIL PROTECTED]
>Sent: Monday, March 10, 2003 1:29 AM
>To: Tomcat User
>Subject: Re: Servlet Mapping with parameters
>
>I was wondering whether it is possible to map parameters to a url
besides
>using  in web.xml because I want it to be during normal
>operation not just when the servlet is initialised eg
>http://server.mycompany.com/something instead of
>http://server.mycompany.com/ServletName?task=2 . I have already played
>around with server.xml and web.xml to make the urls a bit more user
>friendly
>:)
>
>Cheers
>Greg Speechley
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


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



Re: Servlet Mapping with parameters

2003-03-09 Thread Greg Speechley
I was wondering whether it is possible to map parameters to a url besides
using  in web.xml because I want it to be during normal
operation not just when the servlet is initialised eg
http://server.mycompany.com/something instead of
http://server.mycompany.com/ServletName?task=2 . I have already played
around with server.xml and web.xml to make the urls a bit more user friendly
:)

Cheers
Greg Speechley


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



RE: Servlet Mapping Bug?

2003-01-15 Thread Jacob Kjome

Are you sure this is happening when you go directly to Tomcat rather than 
through Apache?  All my mappings in web.xml make no mention of the context 
name and work just fine.

Try you app at:

http://localhost:8080/control/

Then try it at:

http://localhost/control/

If it works in the former case but not in the latter, then the bug is with 
your mod_jk config or the Coyote JK/JK2 connector, not with Tomcat in general.

Jake

At 03:16 PM 1/15/2003 +, you wrote:
This is a bug, as I've now checked the Servlet Specification v2.3:

The key phrase is:
The path used for mapping to a servlet is the request URL from the request
object minus the context path.
ie for my /control/plots/x.jpg request, the context path is /control, so
only /plots/x.jpg should be used to map the servlet.

I guess this bug is probably in the Coyote Connector?

Andy

PS
Here's the full text of the relevant bit from the servlet spec:

SRV.11.1 Use of URL Paths
Upon receipt of a client request, the web container determines the web
application to which to forward it. The web application selected must have
the longest context path that matches the start of the request URL.

The matched part of the URL is the context path when mapping to servlets.
The web container next must locate the servlet to process the request using
the path mapping procedure described below:
The path used for mapping to a servlet is the request URL from the request
object minus the context path. The URL path mapping rules below are used in
order. The first successful match is used with no further matches attempted:

1. The container will try to find an exact match of the path of the request
to the path of the servlet. A successful match selects the servlet.

2. The container will recursively try to match the longest path-prefix: This
is done by stepping down the path tree a directory at a time, using the '/'
character as a path separator. The longest match determines the servlet
selected.

3. If the last segment in the URL path contains an extension (e.g. .jsp),
the servlet
container will try to match a servlet that handles requests for the
extension.
An extension is defined as the part of the last segment after the last '.'
character.

4. If neither of the previous three rules result in a servlet match, the
container will
attempt to serve content appropriate for the resource requested. If a
"default"
servlet is defined for the application, it will be used.
The container must use case-sensitive string comparisons for matching.

Note 1. Previous versions of this specification made use of these mapping
techniques a suggestion rather than a requirement, allowing servlet
containers to each have their different schemes for mapping client requests
to servlets.

> -Original Message-
> From: Andy Eastham [mailto:[EMAIL PROTECTED]]
> Sent: 14 January 2003 22:46
> To: Tomcat Users List
> Subject: Servlet Mapping Bug?
>
>
> Hi,
>
> I've just upgraded from Tomcat 4.0.4b1 and apache 1.3 using warp to Tomcat
> 4.1.18 and Apache 2.0.43 using mod_jk2.
>
> I use a feature of servlet mapping in web.xml, where I map any
> request under
> a particular directory to a single servlet.  My application is mapped from
> Apache under the url "/control/" and I invoke myServlet with any
> request to
> the "plots" subdirectory.  In the old configuration, the relevant
> part of my
> web.xml looked like:
>
> 
> 
> myServlet
> 
> 
> /plots/*
> 
> 
>
> However, in my new setup, I have had to change this to make it work:
>
> 
> 
> myServlet
> 
> 
> /control/plots/*
> 
> 
>
> ie put the full URI in the url-pattern, not just the path relative to the
> Tomcat application root.
>
> This strikes me as less portable - if I change my url mapping from Apache,
> I'll have to edit my web.xml, which wouldn't have been necessary
> before.  Is
> this a bug, or has it really been changed to better comply with
> the Servlet
> spec?
>
> Best regards,
>
> Andy Eastham
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



RE: Servlet Mapping Bug?

2003-01-15 Thread Andy Eastham
Holger,

Thanks for the tip.  I think you're right.

I just noticed that it is behaving diferently to how it was with warp and
webapp.

Cheers,

Andy

> -Original Message-
> From: Stratmann, Holger [mailto:[EMAIL PROTECTED]]
> Sent: 15 January 2003 15:56
> To: 'Tomcat Users List'
> Cc: '[EMAIL PROTECTED]'
> Subject: AW: Servlet Mapping Bug?
>
>
> > > ie put the full URI in the url-pattern, not just the path
> > relative to the
> > > Tomcat application root.
>
> Have you configured the "Tomcat application root"?
>
> I don't mean in Apache, I mean in server.xml?
>
> For each context you configure, you can also specify the "URL-prefix".
>
> default:
> 
> 
>
> 
> 
>
> etc.
> Maybe you could solve your problem by just configuring path="/control"
> here...
> (I don't think it's a bug?)
>
> > -Ursprüngliche Nachricht-
> > Von: Andy Eastham [mailto:[EMAIL PROTECTED]]
> > Gesendet: Mittwoch, 15. Januar 2003 16:17
> > An: Tomcat Users List
> > Betreff: RE: Servlet Mapping Bug?
> >
> >
> > This is a bug, as I've now checked the Servlet Specification v2.3:
> >
> > The key phrase is:
> > The path used for mapping to a servlet is the request URL
> > from the request
> > object minus the context path.
> > ie for my /control/plots/x.jpg request, the context path is
> > /control, so
> > only /plots/x.jpg should be used to map the servlet.
> >
> > I guess this bug is probably in the Coyote Connector?
> >
> > Andy
> >
> > PS
> > Here's the full text of the relevant bit from the servlet spec:
> >
> > SRV.11.1 Use of URL Paths
> > Upon receipt of a client request, the web container determines the web
> > application to which to forward it. The web application
> > selected must have
> > the longest context path that matches the start of the request URL.
> >
> > The matched part of the URL is the context path when mapping
> > to servlets.
> > The web container next must locate the servlet to process the
> > request using
> > the path mapping procedure described below:
> > The path used for mapping to a servlet is the request URL
> > from the request
> > object minus the context path. The URL path mapping rules
> > below are used in
> > order. The first successful match is used with no further
> > matches attempted:
> >
> > 1. The container will try to find an exact match of the path
> > of the request
> > to the path of the servlet. A successful match selects the servlet.
> >
> > 2. The container will recursively try to match the longest
> > path-prefix: This
> > is done by stepping down the path tree a directory at a time,
> > using the '/'
> > character as a path separator. The longest match determines
> > the servlet
> > selected.
> >
> > 3. If the last segment in the URL path contains an extension
> > (e.g. .jsp),
> > the servlet
> > container will try to match a servlet that handles requests for the
> > extension.
> > An extension is defined as the part of the last segment after
> > the last '.'
> > character.
> >
> > 4. If neither of the previous three rules result in a servlet
> > match, the
> > container will
> > attempt to serve content appropriate for the resource requested. If a
> > "default"
> > servlet is defined for the application, it will be used.
> > The container must use case-sensitive string comparisons for matching.
> >
> > Note 1. Previous versions of this specification made use of
> > these mapping
> > techniques a suggestion rather than a requirement, allowing servlet
> > containers to each have their different schemes for mapping
> > client requests
> > to servlets.
> >
> > > -Original Message-
> > > From: Andy Eastham [mailto:[EMAIL PROTECTED]]
> > > Sent: 14 January 2003 22:46
> > > To: Tomcat Users List
> > > Subject: Servlet Mapping Bug?
> > >
> > >
> > > Hi,
> > >
> > > I've just upgraded from Tomcat 4.0.4b1 and apache 1.3 using
> > warp to Tomcat
> > > 4.1.18 and Apache 2.0.43 using mod_jk2.
> > >
> > > I use a feature of servlet mapping in web.xml, where I map any
> > > request under
> > > a particular directory to a single servlet.  My application
> > is mapped from
> > > Apache under the url "/control/&quo

RE: Servlet Mapping Bug?

2003-01-15 Thread Andy Eastham
This is a bug, as I've now checked the Servlet Specification v2.3:

The key phrase is:
The path used for mapping to a servlet is the request URL from the request
object minus the context path.
ie for my /control/plots/x.jpg request, the context path is /control, so
only /plots/x.jpg should be used to map the servlet.

I guess this bug is probably in the Coyote Connector?

Andy

PS
Here's the full text of the relevant bit from the servlet spec:

SRV.11.1 Use of URL Paths
Upon receipt of a client request, the web container determines the web
application to which to forward it. The web application selected must have
the longest context path that matches the start of the request URL.

The matched part of the URL is the context path when mapping to servlets.
The web container next must locate the servlet to process the request using
the path mapping procedure described below:
The path used for mapping to a servlet is the request URL from the request
object minus the context path. The URL path mapping rules below are used in
order. The first successful match is used with no further matches attempted:

1. The container will try to find an exact match of the path of the request
to the path of the servlet. A successful match selects the servlet.

2. The container will recursively try to match the longest path-prefix: This
is done by stepping down the path tree a directory at a time, using the '/'
character as a path separator. The longest match determines the servlet
selected.

3. If the last segment in the URL path contains an extension (e.g. .jsp),
the servlet
container will try to match a servlet that handles requests for the
extension.
An extension is defined as the part of the last segment after the last '.'
character.

4. If neither of the previous three rules result in a servlet match, the
container will
attempt to serve content appropriate for the resource requested. If a
"default"
servlet is defined for the application, it will be used.
The container must use case-sensitive string comparisons for matching.

Note 1. Previous versions of this specification made use of these mapping
techniques a suggestion rather than a requirement, allowing servlet
containers to each have their different schemes for mapping client requests
to servlets.

> -Original Message-
> From: Andy Eastham [mailto:[EMAIL PROTECTED]]
> Sent: 14 January 2003 22:46
> To: Tomcat Users List
> Subject: Servlet Mapping Bug?
>
>
> Hi,
>
> I've just upgraded from Tomcat 4.0.4b1 and apache 1.3 using warp to Tomcat
> 4.1.18 and Apache 2.0.43 using mod_jk2.
>
> I use a feature of servlet mapping in web.xml, where I map any
> request under
> a particular directory to a single servlet.  My application is mapped from
> Apache under the url "/control/" and I invoke myServlet with any
> request to
> the "plots" subdirectory.  In the old configuration, the relevant
> part of my
> web.xml looked like:
>
> 
> 
> myServlet
> 
> 
> /plots/*
> 
> 
>
> However, in my new setup, I have had to change this to make it work:
>
> 
> 
> myServlet
> 
> 
> /control/plots/*
> 
> 
>
> ie put the full URI in the url-pattern, not just the path relative to the
> Tomcat application root.
>
> This strikes me as less portable - if I change my url mapping from Apache,
> I'll have to edit my web.xml, which wouldn't have been necessary
> before.  Is
> this a bug, or has it really been changed to better comply with
> the Servlet
> spec?
>
> Best regards,
>
> Andy Eastham
>
>
>
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 
>
>



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Craig R. McClanahan


On Thu, 9 Jan 2003, Jeffrey Winter wrote:

> Date: Thu, 9 Jan 2003 09:35:09 -0500
> From: Jeffrey Winter <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Re: Servlet Mapping Strategy w/ user-specific URLs
>
>
> > At 01:48 PM 1/8/2003, you wrote:
> > >So you're talking about using the sorts of Filters available as of the
> > >Servlet 2.3 spec?  That actually sounds promising, I'll take a look at
> it.
> >
> > Yep.
>
> Okay, one question about this: in the Filter, I'd parse the url and
> determine
> which servlet should be the target, either the "UserServlet" or
> "ResourceServlet"
> and then create an apporpriate RequestDispatcher.  Then call,
>
> dispather.forward(...);
>
> This would happen instead of calling, say,
>
> chain.doFilter(...);
>
> So basically, this would need to be the last Filter in any FilterChain that
> I may create, because the chain would be broken since I wouldn't be calling
> doFilter() in that Filter.
>
> Does this sound about right or is there something I'm missing?

It's perfectly legal for your Filter to return instead of calling
chain.doFilter(), if you know that the response has already been created.
It sounds like you are on a reasonable path.

Regarding how to create the "appropriate" RequsetDispatcher, there are two
different ways to do that:

  ServletContext.getRequstDispatcher() matches a servlet by path

  ServletContext.getNamedDispatcher() matches a servlet by
  servlet name

You might find the latter one more useful for your use case, since you are
deliberately *not* using request URI mapping to select which servlet to
run.

Craig


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Jeffrey Winter

> Depends upon your point of view.  Mine is different from those I've seen
in
> reply to your inquiry so far.  If I can do something declaratively in
> Apache, I do it.  If I am going to write code, I put do it in Tomcat.
>
> Apache is a world-class web server.  Tomcat is an application
(Servlet/JSP)
> engine.  Tomcat has a relatively weak but effective web server.  Using
> Tomcat as a web server is like street racing with a Mack truck.  On the
> other hand, try towing a motor home with a Lamborghini.

I'm going to try the mod_rewrite approach also and see how far that takes
me.  I like
the idea of declarative rewriting as opposed to compiled code, so I'm just
going to
have to see what feels right.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-09 Thread Jeffrey Winter

> At 01:48 PM 1/8/2003, you wrote:
> >So you're talking about using the sorts of Filters available as of the
> >Servlet 2.3 spec?  That actually sounds promising, I'll take a look at
it.
>
> Yep.

Okay, one question about this: in the Filter, I'd parse the url and
determine
which servlet should be the target, either the "UserServlet" or
"ResourceServlet"
and then create an apporpriate RequestDispatcher.  Then call,

dispather.forward(...);

This would happen instead of calling, say,

chain.doFilter(...);

So basically, this would need to be the last Filter in any FilterChain that
I may create, because the chain would be broken since I wouldn't be calling
doFilter() in that Filter.

Does this sound about right or is there something I'm missing?

Thanks.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Noel J. Bergman

> Is it possible to setup a servlet mapping such that a UserServlet handles
> requests to /user/xxx, but a ResourceServlet handles requests to
> /user/xxx/resource/yyy?

Easy enough to do with mod_rewrite, as you have planned since you have
apache as a front end, or you could write a Servlet Filter.  Which would you
rather do: declare some simple RewriteRules, or write, test and debug a new
Servlet Filter?

> There certainly is some overlap between those services as outlined in the
> Servlet spec, and the functionality provided by Apache itself.  Are there
> any general rules of thumb for when to use the services of Apache vs.
Tomcat
> in these areas? Or at least some good resources that go into these issues?

Depends upon your point of view.  Mine is different from those I've seen in
reply to your inquiry so far.  If I can do something declaratively in
Apache, I do it.  If I am going to write code, I put do it in Tomcat.

Apache is a world-class web server.  Tomcat is an application (Servlet/JSP)
engine.  Tomcat has a relatively weak but effective web server.  Using
Tomcat as a web server is like street racing with a Mack truck.  On the
other hand, try towing a motor home with a Lamborghini.

--- Noel


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Will Hartung
> From: "Jeffrey Winter" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 08, 2003 1:48 PM
> Subject: Re: Servlet Mapping Strategy w/ user-specific URLs


> There certainly is some overlap between those services as outlined in the
> Servlet spec, and the functionality provided by Apache itself.  Are there
> any general rules of thumb for when to use
> the services of Apache vs. Tomcat in these areas? Or at least some good
> resources that go into these issues?

For me, the way to distinguish between Apache and Tomcat should really only
focus on things like access to static content, but this sort of depends on
a) which connector you are using, and b) how that connector works.

First off, though, this experience is from Tomcat 3, we're just getting into
Tomcat 4 and this may be completely irrelevant.

Anyway, the way that we have mod_jk configured for Apache 1.3 against Tomcat
3.x (and I didn't actually do this configuration), Apache has direct maps
into the exploded WAR for Tomcat for static content.

What this seems to mean is that if I request
www.myhost.com/myApp/static.html, Apache is going to serve it straight up
and Tomcat would never even see the request.

This is wonderful for performance. However, if you are using declarative
security within the webapp, then, in theory, this static HTML file IS a
resource that could be controlled by Tomcat for access.

What THAT means is that it's really no longer a static resource, but a
dynamic resource no different from a JSP, and Tomcat itself gets the
pleasure of serving up the file. As soon as Tomcat gets into the picture of
delivering the resource, then the performance benefits of Apache start to
drift away.

What this basically means, is that the more that you use and leverage the
capability of the Servlet container, then less performance benefit that
Apache will give you. (there are, of course, other benefits to Apache, like
virtual hosting and even things like mod_gzip).

As far as access control and things like that, there is a big issue in that
Apache and Tomcat just aren't as integrated as one would like in this
regard. For example, Apache can't use Tomcat to authenticate resources that
Apache directly controls (such as static content or CGIs say), and Tomcat
can't use Apache's authentication (actually, I think it can use Basic and
Digest authentication as the usernames are kept in the Authorization header
which should be included within the request and forwarded to Tomcat, though
I have not tried this). (I don't like to use the word 'can't' in these
contexts because all of these problems can be resolved with just the proper
application of tmie and money...)

Another example is if you use mod_rewrite, for example, Tomcat has no idea
what the original request was, only Apache does.

The point is (as I ramble into a black hole) is that Apache and Tomcat are
loosely coupled, and for most folks, this is just fine and presents no
issues. But it is something to consider when you start relying on Apache
functionality for your Tomcat based app, and vice-a-versa.

So, anyway, focus on each component on what they have to deliver. Apache for
performance, flexibility, and integration and Tomcat for the dynamic aspects
of your application.

Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Justin Ruthenbeck

At 01:48 PM 1/8/2003, you wrote:

So you're talking about using the sorts of Filters available as of the
Servlet 2.3 spec?  That actually sounds promising, I'll take a look at it.


Yep.


One thing that bothers me about my current plan though is that I feel like
I'm not making use of some of the functionality potentially provided by
Apache itself, especially in the area of authentication and access control.

There certainly is some overlap between those services as outlined in the
Servlet spec, and the functionality provided by Apache itself.  Are there
any general rules of thumb for when to use
the services of Apache vs. Tomcat in these areas? Or at least some good
resources that go into these issues?


I've never used Apache for much of anything besides static content serving 
or occasional URL manipulation, so I'm not qualified on the topic.  I would 
say, though, that the vast majority of jsp/servlet applications (and hence 
the vast majority of people on this list) can fill their funtional needs 
efficiently and easily without using Apache's "advanced" services.  I would 
personally rather deal with only Tomcat if I had the choice ... and judging 
from the difficulties people on this list have with the integration of the 
two, I would venture to say that opinion is probably in the majority.

Perhaps someone else has some more complete thoughts for you...

justin



- Original Message -
From: "Justin Ruthenbeck" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 08, 2003 3:40 PM
Subject: Re: Servlet Mapping Strategy w/ user-specific URLs


>
> There's no way to accomplish what you're shooting for using only the
> mappings in the web.xml.  However, you could pretty easily do it through a
> filter running on requests to "/user/*".  If you do this, you could
forward
> any requests that match URI "/user" to your UserServlet and anything that
> matches "/user/*/resource/*" to your ResourceServlet by parsing the URI
> String in your own code.
>
> Hope that helps ... let me know if it's not clear.
>
> justin
>
> At 12:12 PM 1/8/2003, you wrote:
> >I would like to have a url structure of the form:
> >
> > myplace.com/user/xxx/resource/yyy
> >
> >where "user" and "resource"
> >
> >are handled by individual servlets.  I would like users to have the
> >ability to POST
> >there username/password to /user and have it respond with their personal
> >url, e.g.:
> >
> > /user/some-user
> >
> >A "UserServlet" would be responsible to setting up the appropriate
> >authentication,
> >so that they could GET/POST (assuming proper authentication) to
> >
> > /user/some-user/resource
> >
> >Is it possible to setup a servlet mapping such that a UserServlet handles
> >requests to /user/xxx, but a ResourceServlet handles requests to
> >/user/xxx/resource/yyy?
> >
> >I can't think of how to do this and am currently planning on using
mod_rewrite
> >to rewrite the urls as appropriate since I have Apache 2 sitting in front
of
> >Tomcat.
> >
> >Is there perhaps a better way of handling this that I haven't
> >considered?  That
> >is, perhaps taking advantage of some aspect of Apache itself that I
> >haven't thought of?
> >
> >Any help in this regard would be greatly appreciated.
> >
> >- Jeff
> >
>
>
> 
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> [EMAIL PROTECTED]
> Confidential -
> See http://www.nextengine.com/confidentiality.php
> 
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Justin Ruthenbeck
Software Engineer, NextEngine Inc.
[EMAIL PROTECTED]
Confidential -
   See http://www.nextengine.com/confidentiality.php



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Will Hartung
> From: "Justin Ruthenbeck" <[EMAIL PROTECTED]>
> Sent: Wednesday, January 08, 2003 12:40 PM
> Subject: Re: Servlet Mapping Strategy w/ user-specific URLs

> There's no way to accomplish what you're shooting for using only the
> mappings in the web.xml.  However, you could pretty easily do it through a
> filter running on requests to "/user/*".  If you do this, you could
forward
> any requests that match URI "/user" to your UserServlet and anything that
> matches "/user/*/resource/*" to your ResourceServlet by parsing the URI
> String in your own code.

Yeah, Servlet Filters can be considered the "mod_rewrite" of Java Servlets,
if perhaps less easily "configurable", as it requires code.

Also, they're limited compared to mod_rewrite in that Filter more or less
"get in the way" of the request, whereas mod_rewrite really has the
capability of transforming the ultimate destination of the request.

It's still a completely valid technique, and also portable (so your app
could work "without change" on IIS for example) compared to the mod_rewrite
solution, but I can appreciate the light frustration in having to "preempt"
the default processing within the web.xml.

It's also good to understand the distinctions between the two techniques.

Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Jeffrey Winter
So you're talking about using the sorts of Filters available as of the
Servlet 2.3 spec?  That actually sounds promising, I'll take a look at it.

One thing that bothers me about my current plan though is that I feel like
I'm not making use of some of the functionality potentially provided by
Apache itself, especially in the area of authentication and access control.

There certainly is some overlap between those services as outlined in the
Servlet spec, and the functionality provided by Apache itself.  Are there
any general rules of thumb for when to use
the services of Apache vs. Tomcat in these areas? Or at least some good
resources that go into these issues?

Thanks.




- Original Message -
From: "Justin Ruthenbeck" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Wednesday, January 08, 2003 3:40 PM
Subject: Re: Servlet Mapping Strategy w/ user-specific URLs


>
> There's no way to accomplish what you're shooting for using only the
> mappings in the web.xml.  However, you could pretty easily do it through a
> filter running on requests to "/user/*".  If you do this, you could
forward
> any requests that match URI "/user" to your UserServlet and anything that
> matches "/user/*/resource/*" to your ResourceServlet by parsing the URI
> String in your own code.
>
> Hope that helps ... let me know if it's not clear.
>
> justin
>
> At 12:12 PM 1/8/2003, you wrote:
> >I would like to have a url structure of the form:
> >
> > myplace.com/user/xxx/resource/yyy
> >
> >where "user" and "resource"
> >
> >are handled by individual servlets.  I would like users to have the
> >ability to POST
> >there username/password to /user and have it respond with their personal
> >url, e.g.:
> >
> > /user/some-user
> >
> >A "UserServlet" would be responsible to setting up the appropriate
> >authentication,
> >so that they could GET/POST (assuming proper authentication) to
> >
> > /user/some-user/resource
> >
> >Is it possible to setup a servlet mapping such that a UserServlet handles
> >requests to /user/xxx, but a ResourceServlet handles requests to
> >/user/xxx/resource/yyy?
> >
> >I can't think of how to do this and am currently planning on using
mod_rewrite
> >to rewrite the urls as appropriate since I have Apache 2 sitting in front
of
> >Tomcat.
> >
> >Is there perhaps a better way of handling this that I haven't
> >considered?  That
> >is, perhaps taking advantage of some aspect of Apache itself that I
> >haven't thought of?
> >
> >Any help in this regard would be greatly appreciated.
> >
> >- Jeff
> >
>
>
> 
> Justin Ruthenbeck
> Software Engineer, NextEngine Inc.
> [EMAIL PROTECTED]
> Confidential -
> See http://www.nextengine.com/confidentiality.php
> 
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Servlet Mapping Strategy w/ user-specific URLs

2003-01-08 Thread Justin Ruthenbeck

There's no way to accomplish what you're shooting for using only the 
mappings in the web.xml.  However, you could pretty easily do it through a 
filter running on requests to "/user/*".  If you do this, you could forward 
any requests that match URI "/user" to your UserServlet and anything that 
matches "/user/*/resource/*" to your ResourceServlet by parsing the URI 
String in your own code.

Hope that helps ... let me know if it's not clear.

justin

At 12:12 PM 1/8/2003, you wrote:
I would like to have a url structure of the form:

myplace.com/user/xxx/resource/yyy

where "user" and "resource"

are handled by individual servlets.  I would like users to have the 
ability to POST
there username/password to /user and have it respond with their personal
url, e.g.:

/user/some-user

A "UserServlet" would be responsible to setting up the appropriate 
authentication,
so that they could GET/POST (assuming proper authentication) to

/user/some-user/resource

Is it possible to setup a servlet mapping such that a UserServlet handles
requests to /user/xxx, but a ResourceServlet handles requests to
/user/xxx/resource/yyy?

I can't think of how to do this and am currently planning on using mod_rewrite
to rewrite the urls as appropriate since I have Apache 2 sitting in front of
Tomcat.

Is there perhaps a better way of handling this that I haven't 
considered?  That
is, perhaps taking advantage of some aspect of Apache itself that I 
haven't thought of?

Any help in this regard would be greatly appreciated.

- Jeff




Justin Ruthenbeck
Software Engineer, NextEngine Inc.
[EMAIL PROTECTED]
Confidential -
   See http://www.nextengine.com/confidentiality.php



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping to /

2002-11-15 Thread Bill Barker

"Trevor MacPhail" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Craig R. McClanahan wrote:
>
> >On Fri, 15 Nov 2002, Trevor MacPhail wrote:
> >
> >
> >
> >>Date: Fri, 15 Nov 2002 19:17:18 -0800
> >>From: Trevor MacPhail <[EMAIL PROTECTED]>
> >>Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> >>To: Tomcat Users List <[EMAIL PROTECTED]>
> >>Subject: Servlet Mapping to /
> >>
> >>How can I set up a servlet-mapping to map a specific servlet to
> >>http://host:port/ but still have it available that any static file
> >>without a maping can be accessed still?
> >>
> >>I tried the following:
> >>
> >>
> >>HomePage
> >>/
> >>
> >>
> >>but this causes anything that doesnt already have a mapping to be
> >>interpreted as the HomePage servlet. Which means I cant have my servlets
> >>refering to static files such as http://host:port/images/something.jpg.
> >>
> >>What url-pattern should I use to get it to allow only / in the mapping?
> >>
> >>
> >>
> >
> >You don't want to use s servlet mapping for this.  Use a welcome file
> >instead.
> >
> >
>
> Ok, then the question I have now is, how do I set up a welcome-file to
> be a servlet instead of a static file?
>
> I've tried HomePage but that didnt work.
>
> I've also tried index.html combined with:
> 
> HomePage
> /index.html
> 
>
> but that didnt work either.

Well, yes, this only works at the moment in 5.0 & 3.3.2-dev (and the later
needs non-default options set).  My guess is that unless someone wants to
get involved and push this (with patches), this will never be supported on
the 4.x line.  I don't want to sound negative, but the nature of OS projects
is that someone has to care enough to change it, unless it is a clear bug.
In the 2.3 Servlet-Spec (changed in the 2.4 spec, which 5.0 is based on),
this is not a clear bug.

>
> --
> Trevor MacPhail





--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping to /

2002-11-15 Thread Jon Eaves
Trevor MacPhail wrote:

Craig R. McClanahan wrote:



[ big snip ]


Ok, then the question I have now is, how do I set up a welcome-file to 
be a servlet instead of a static file?

You can't.



I've tried HomePage but that didnt work.

I've also tried index.html combined with:

HomePage
/index.html


but that didnt work either.


Try this:

redirect.jsp

and

redirect.jsp contains a single line:



Cheers,
	-- jon

--
Jon Eaves <[EMAIL PROTECTED]>
http://www.eaves.org/jon/


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Servlet Mapping to /

2002-11-15 Thread Trevor MacPhail
Craig R. McClanahan wrote:


On Fri, 15 Nov 2002, Trevor MacPhail wrote:

 

Date: Fri, 15 Nov 2002 19:17:18 -0800
From: Trevor MacPhail <[EMAIL PROTECTED]>
Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
To: Tomcat Users List <[EMAIL PROTECTED]>
Subject: Servlet Mapping to /

How can I set up a servlet-mapping to map a specific servlet to
http://host:port/ but still have it available that any static file
without a maping can be accessed still?

I tried the following:


HomePage
/


but this causes anything that doesnt already have a mapping to be
interpreted as the HomePage servlet. Which means I cant have my servlets
refering to static files such as http://host:port/images/something.jpg.

What url-pattern should I use to get it to allow only / in the mapping?

   


You don't want to use s servlet mapping for this.  Use a welcome file
instead.
 


Ok, then the question I have now is, how do I set up a welcome-file to 
be a servlet instead of a static file?

I've tried HomePage but that didnt work.

I've also tried index.html combined with:

HomePage
/index.html


but that didnt work either.

--
Trevor MacPhail


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 



Re: Servlet Mapping to /

2002-11-15 Thread Craig R. McClanahan
On Fri, 15 Nov 2002, Trevor MacPhail wrote:

> Date: Fri, 15 Nov 2002 19:17:18 -0800
> From: Trevor MacPhail <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: Tomcat Users List <[EMAIL PROTECTED]>
> Subject: Servlet Mapping to /
>
> How can I set up a servlet-mapping to map a specific servlet to
> http://host:port/ but still have it available that any static file
> without a maping can be accessed still?
>
> I tried the following:
>
> 
> HomePage
> /
> 
>
> but this causes anything that doesnt already have a mapping to be
> interpreted as the HomePage servlet. Which means I cant have my servlets
> refering to static files such as http://host:port/images/something.jpg.
>
> What url-pattern should I use to get it to allow only / in the mapping?
>

You don't want to use s servlet mapping for this.  Use a welcome file
instead.

> --
> Trevor MacPhail
>

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping

2002-11-10 Thread Shruti Ahuja, Noida
Thanks. It worked ...

There is another problem i am facing in invoking a servlet named blobserve
as follows -



This servlet is supposed to accept a SQL query as parameter, execute it and
return the result .I get this error when i invoke the servlet .

javax.servlet.ServletException: executeQuery requires a non-NULL SQL
statement
at blobserve.processRequest(blobserve.java:81)
at blobserve.doGet(blobserve.java:128)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)


However if i break up the SQL query in 2 parts and pass 2 parameters , SQL1
& SQL2 which are concatenated in the servlet , it works.



What could be the reason for the above ?

Thanks in advance,
Shruti
-Original Message-
From: Kwok Peng Tuck [mailto:pengtuck@;makmal.com]
Sent: Monday, November 11, 2002 12:06 PM
To: Tomcat Users List
Subject: Re: servlet mapping


Try without the forward slash . So it looks like this:

 




Shruti Ahuja, Noida wrote:

>Hi,
>
>I have deployed a web appplication whose context name is graduate . It has
2
>servlets(named auditor and blobserve) in it placed in the Web-inf/classes
>directory . 
>I have mapped the 2 servlets in web.xml as follows -
>  
>auditor
>auditor
>  
>  
>blobserve
>blobserve
>  
>  
>auditor
>/auditor
>  
>  
>blobserve
>/blobserve
>  
>
>Now, i wish to invoke the auditor servlet in the jsp page as follows -
> 
>The above does not work . When called it removes the context name from the
>URL .
>However , the following works -
>
>What should i change in the web.xml or the jsp page so that i can invoke
the
>servlet without the /servlet clause. 
>
>Pls suggest ..
>
>Thanks
>Shruti.
>
>--
>To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
>For additional commands, e-mail:
<mailto:tomcat-user-help@;jakarta.apache.org>
>
>
>  
>



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

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




Re: servlet mapping

2002-11-10 Thread Kwok Peng Tuck
Try without the forward slash . So it looks like this:

 




Shruti Ahuja, Noida wrote:

Hi,

I have deployed a web appplication whose context name is graduate . It has 2
servlets(named auditor and blobserve) in it placed in the Web-inf/classes
directory . 
I have mapped the 2 servlets in web.xml as follows -
 
   auditor
   auditor
 
 
   blobserve
   blobserve
 
 
   auditor
   /auditor
 
 
   blobserve
   /blobserve
 

Now, i wish to invoke the auditor servlet in the jsp page as follows -
 
The above does not work . When called it removes the context name from the
URL .
However , the following works -

What should i change in the web.xml or the jsp page so that i can invoke the
servlet without the /servlet clause. 

Pls suggest ..

Thanks
Shruti.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

> Should've noticed it the first time around, but all of these above
> four lines should have "worker" instead of "workers".
> 
Cut and paste will do that to you every time (I set the home attr).
Thanks for all the help.
Now I'm going to go back and see how much of my orig config I had to change.
I suspect that I could have kept everything the way it was.
I'll update the list with my findings.

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Turner, John


Yikes, good eye, Milt!  

John

> -Original Message-
> From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 3:26 PM
> To: Tomcat Users List
> Subject: RE: servlet mapping help
> 
> 
> On Tue, 15 Oct 2002, Milt Epstein wrote:
> 
> > On Tue, 15 Oct 2002, Aryeh Katz wrote:
> >
> > > > I would post the relevant section of httpd.conf (not 
> the whole thing,
> > > > please) with the JkMount statements, and the contents of your
> > > > workers.properties file.  Also, which version of Apache 
> and Tomcat you
> > >
> > > httpd.conf (main server, not virt)
> > >
> > > JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
> > > JkLogFile /usr/local/apaservlet/logs/mod_jk.log
> > > JkLogLevel debug
> > > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > > JkMount /examples/servlet/* ajp13
> > >
> > > workers.properties
> > >
> > > workers.tomcat_home=/jakarta-tomcat-4.0.6
> > > workers.java_home=/jdk1.3.1_05
> > > ps=/
> >
> > [Note: These above three lines are unnecessary.  They just define
> > macros/variables used internally in the workers.properties file, but
> > you've deleted the lines where they were being used.]
> >
> > > workers.list=ajp13
> > > workers.ajp13.port=8009
> > > workers.ajp13.host=correct.server.name
> > > workers.ajp13.type=ajp13
> 
> Should've noticed it the first time around, but all of these above
> four lines should have "worker" instead of "workers".
> 
> 
> > > apache = 1.3.27
> > > jakarta = 4.0.6
> >
> > This is different from what you had previously.  So what is/isn't
> > happening now, and what (error) messages are you seeing in the logs?
> >
> 
> Milt Epstein
> Research Programmer
> Integration and Software Engineering (ISE)
> Campus Information Technologies and Educational Services (CITES)
> University of Illinois at Urbana-Champaign (UIUC)
> [EMAIL PROTECTED]
> 
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: servlet mapping help

2002-10-15 Thread Milt Epstein

On Tue, 15 Oct 2002, Milt Epstein wrote:

> On Tue, 15 Oct 2002, Aryeh Katz wrote:
>
> > > I would post the relevant section of httpd.conf (not the whole thing,
> > > please) with the JkMount statements, and the contents of your
> > > workers.properties file.  Also, which version of Apache and Tomcat you
> >
> > httpd.conf (main server, not virt)
> >
> > JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
> > JkLogFile /usr/local/apaservlet/logs/mod_jk.log
> > JkLogLevel debug
> > JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> > JkMount /examples/servlet/* ajp13
> >
> > workers.properties
> >
> > workers.tomcat_home=/jakarta-tomcat-4.0.6
> > workers.java_home=/jdk1.3.1_05
> > ps=/
>
> [Note: These above three lines are unnecessary.  They just define
> macros/variables used internally in the workers.properties file, but
> you've deleted the lines where they were being used.]
>
> > workers.list=ajp13
> > workers.ajp13.port=8009
> > workers.ajp13.host=correct.server.name
> > workers.ajp13.type=ajp13

Should've noticed it the first time around, but all of these above
four lines should have "worker" instead of "workers".


> > apache = 1.3.27
> > jakarta = 4.0.6
>
> This is different from what you had previously.  So what is/isn't
> happening now, and what (error) messages are you seeing in the logs?
>

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

snip
> > workers.list=ajp13
> > workers.ajp13.port=8009
> > workers.ajp13.host=correct.server.name
> > workers.ajp13.type=ajp13
> >
> > apache = 1.3.27
> > jakarta = 4.0.6
> 
> This is different from what you had previously.  So what is/isn't
> happening now, and what (error) messages are you seeing in the logs?

mod_jk.log
[Tue Oct 15 15:07:59 2002]  [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -
> /examples/servlet/
[Tue Oct 15 15:07:59 2002]  [jk_worker.c (132)]: Into 
wc_get_worker_for_name ajp13
[Tue Oct 15 15:07:59 2002]  [jk_worker.c (136)]: 
wc_get_worker_for_name, done did not found a worker

error log
nothing!

access log

192.168.43.222 - - [15/Oct/2002:15:07:59 -0400] "GET 
/examples/servlet/CookieExample HTTP/1.1" 500 608

To my feeble brain, this sounds like apache is trying to render the 
page, instead of forwarding to tomcat, so I get the 500. Tomcat 
SHOULD be able to handle the request (netstat confirms I still have 
an 09 listener).

The only other thing I can think of, is I dl'ed the source for mod_jk 
and built it myself, and I see that it declares itself a beta for the 
version I dl'ed (mod_jk/1.2.1-beta-1). Are there any known issues 
with this mod_jk?

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Milt Epstein

On Tue, 15 Oct 2002, Aryeh Katz wrote:

> > I would post the relevant section of httpd.conf (not the whole thing,
> > please) with the JkMount statements, and the contents of your
> > workers.properties file.  Also, which version of Apache and Tomcat you
>
> httpd.conf (main server, not virt)
>
> JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
> JkLogFile /usr/local/apaservlet/logs/mod_jk.log
> JkLogLevel debug
> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
> JkMount /examples/servlet/* ajp13
>
> workers.properties
>
> workers.tomcat_home=/jakarta-tomcat-4.0.6
> workers.java_home=/jdk1.3.1_05
> ps=/

[Note: These above three lines are unnecessary.  They just define
macros/variables used internally in the workers.properties file, but
you've deleted the lines where they were being used.]

> workers.list=ajp13
> workers.ajp13.port=8009
> workers.ajp13.host=correct.server.name
> workers.ajp13.type=ajp13
>
> apache = 1.3.27
> jakarta = 4.0.6

This is different from what you had previously.  So what is/isn't
happening now, and what (error) messages are you seeing in the logs?

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

> 
> I would post the relevant section of httpd.conf (not the whole thing,
> please) with the JkMount statements, and the contents of your
> workers.properties file.  Also, which version of Apache and Tomcat you

httpd.conf (main server, not virt)

JkWorkersFile /jakarta-tomcat-4.0.6/conf/workers.properties
JkLogFile /usr/local/apaservlet/logs/mod_jk.log
JkLogLevel debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkMount /examples/servlet/* ajp13

workers.properties

workers.tomcat_home=/jakarta-tomcat-4.0.6
workers.java_home=/jdk1.3.1_05
ps=/
workers.list=ajp13
workers.ajp13.port=8009
workers.ajp13.host=correct.server.name
workers.ajp13.type=ajp13

apache = 1.3.27
jakarta = 4.0.6

---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help (could be: mod_jk config help)

2002-10-15 Thread Turner, John


Oops...my bad.  Too many conversations going on at once.  

Just in case I sent someone down the wrong path by accident, this is my
working configuration for the Tomcat examples on localhost:

workers.properties
==
workers.tomcat_home=/usr/local/jakarta-tomcat-4.1.10
workers.java_home=/usr/java/j2sdk1.4.0_01
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13

httpd.conf
==

  LoadModule jk_module /usr/local/apache2/modules/mod_jk.so

JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties"
JkLogFile "/usr/local/tomcat/logs/mod_jk.log"
JkLogLevel emerg

# Static files
Alias /examples "/usr/local/tomcat/webapps/examples"


   Options Indexes FollowSymLinks
   DirectoryIndex index.html index.htm index.jsp


# Deny direct access to WEB-INF and META-INF
#

  AllowOverride None
  deny from all



  AllowOverride None
  deny from all


JkMount /examples/jsp/security/protected/j_security_check  ajp13
JkMount /examples/CompressionTest  ajp13
JkMount /examples/SendMailServlet  ajp13
JkMount /examples/servletToJsp  ajp13
JkMount /examples/snoop  ajp13
JkMount /examples/*.jsp  ajp13
JkMount /examples/servlet/*  ajp13

server.xml
===

 
HTH

John

> -Original Message-
> From: Milt Epstein [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 2:29 PM
> To: Tomcat Users List
> Subject: RE: servlet mapping help
> 
> What do you have where "ajp13" is, and where "some-name" is?  Because
> they need to match.  Because the second argument to JkMount is a
> worker, the worker that should handle requests that match the URL
> pattern given (in the first argument).  And the
> worker.some-name settings define worker "some-name".
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: servlet mapping help

2002-10-15 Thread Milt Epstein

On Tue, 15 Oct 2002, Aryeh Katz wrote:

> > You didn't have to change workers.properties at all.
> >
> snip
> > So, you should have a line like this in httpd.conf:
> >
> > JkMount /examples/servlets/* ajp13
> >
> > And a few lines like this in workers.properties:
> >
> > worker.list=some-name
> > worker.some-name.port=8009
> > worker.some-name.host=your.host.com
> > worker.some-name.type=ajp13
> >
> I believe, I just don't see :-).

What do you have where "ajp13" is, and where "some-name" is?  Because
they need to match.  Because the second argument to JkMount is a
worker, the worker that should handle requests that match the URL
pattern given (in the first argument).  And the
worker.some-name settings define worker "some-name".

> Netstat shows a listener on 8009.
> Connecting to same url port 8080 behaves just fine.
> Only when I do a regular http request do I see problems (http error code 500,
> with the "did not find a worker" message in my jk log file).
>
> Here is my ajp13 snippet from server.xml
>
> port="8009" minProcessors="5" maxProcessors="75"
>acceptCount="10" debug="0"/>

This looks OK -- the main thing is that it's enabled
(i.e. uncommented), and the port matches the port in the
workers.properties file -- the problem probably lies above.
Especially with that "did not find a worker" error message.

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Aryeh Katz

> 
> You didn't have to change workers.properties at all.
> 
snip
> So, you should have a line like this in httpd.conf:
> 
> JkMount /examples/servlets/* ajp13
> 
> And a few lines like this in workers.properties:
> 
> worker.list=some-name
> worker.some-name.port=8009
> worker.some-name.host=your.host.com
> worker.some-name.type=ajp13
> 
I believe, I just don't see :-).
Netstat shows a listener on 8009.
Connecting to same url port 8080 behaves just fine.
Only when I do a regular http request do I see problems (http error code 500, 
with the "did not find a worker" message in my jk log file).

Here is my ajp13 snippet from server.xml



---
Aryeh Katz
VASCO   
www.vasco.com   


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: servlet mapping help

2002-10-15 Thread Turner, John


You didn't have to change workers.properties at all.

It works like this:

1. map request URI, if it fits a JkMount statement, check protocol
2. if protocol = "ajp13" then JK (eg. ajp12 = JServ)
3. if JK look for workers.properties file
4. if found, use connection information to make connection

So, you should have a line like this in httpd.conf:

JkMount /examples/servlets/* ajp13

And a few lines like this in workers.properties:

worker.list=some-name
worker.some-name.port=8009
worker.some-name.host=your.host.com
worker.some-name.type=ajp13

Believe me, it works as Jake posted...many, many people have working
configurations just like that.

John

> -Original Message-
> From: Aryeh Katz [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 15, 2002 1:17 PM
> To: [EMAIL PROTECTED]
> Subject: Re: servlet mapping help
> 
> 
> > Hello Aryeh,
> > 
> > The proper syntax is:
> > 
> > JkMount /examples/servlets/* ajp13
> > 
> > You define the protocol, not a worker after the mount pattern.
> This did not help matters. Even after changing httpd.conf and 
> workers.properties, I get the same behavior.
> Just one question. Can you point me to documentation that says it's
> the protocol, not the worker? The web page
> http://jakarta.apache.org/tomcat/tomcat-4.1-
> doc/jk2/jk/aphowto.html#mod_jk%20Directives seems to imply it's the
> worker, along with the mod_jk comments (lines 660 and 1412 in v 
> 4.0.6), that state it's a worker. Thanks for your help. 
> Aryeh 
> > > Jake
> > >Tuesday, October 15, 2002, 11:03:01 AM, you wrote: > > AK> 
> I'm trying
> to integrate mod_jk and tomcat. > AK> My httpd.conf file has the
> following mapping > > AK> JkMount /examples/servlets/* worker1 > > 
> AK>
> and I see the following in my jk log file (at debug) > > AK> [Tue Oct
> 15 11:52:17 2002]  [jk_uri_worker_map.c (321)]: Into   

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: servlet mapping help

2002-10-15 Thread Aryeh Katz

> Hello Aryeh,
> 
> The proper syntax is:
> 
> JkMount /examples/servlets/* ajp13
> 
> You define the protocol, not a worker after the mount pattern.
This did not help matters. Even after changing httpd.conf and 
workers.properties, I get the same behavior.
Just one question. Can you point me to documentation that says it's
the protocol, not the worker? The web page
http://jakarta.apache.org/tomcat/tomcat-4.1-
doc/jk2/jk/aphowto.html#mod_jk%20Directives seems to imply it's the
worker, along with the mod_jk comments (lines 660 and 1412 in v 
4.0.6), that state it's a worker. Thanks for your help. 
Aryeh 
> > Jake
> >Tuesday, October 15, 2002, 11:03:01 AM, you wrote: > > AK> I'm trying
to integrate mod_jk and tomcat. > AK> My httpd.conf file has the
following mapping > > AK> JkMount /examples/servlets/* worker1 > > 
AK>
and I see the following in my jk log file (at debug) > > AK> [Tue Oct
15 11:52:17 2002]  [jk_uri_worker_map.c (321)]: Into   

> AK> jk_uri_worker_map_t::uri_worker_map_open, match rule AK>
> /examples/servlets/=worker1 was added [Tue Oct 15 11:52:17 2002] 
AK>
> [jk_uri_worker_map.c (408)]: Into AK>
> jk_uri_worker_map_t::uri_worker_map_open, there are 1 rules [Tue 
Oct
> AK> 15 11:52:17 2002]  [jk_uri_worker_map.c (422)]: AK>
> jk_uri_worker_map_t::uri_worker_map_open, done [Tue Oct 15 11:52:20
> AK> 2002]  [jk_uri_worker_map.c (460)]: Into AK>
> jk_uri_worker_map_t::map_uri_to_worker [Tue Oct 15 11:52:20 2002] 
AK>
> [jk_uri_worker_map.c (477)]: Attempting to map URI AK>
> '/examples/servlets/HelloWorldExample' [Tue Oct 15 11:52:20 2002] 
AK>
> [jk_uri_worker_map.c (502)]: 
jk_uri_worker_map_t::map_uri_to_worker,
> AK> Found a context match worker1 -> /examples/servlets/ [Tue Oct 
15
> AK> 11:52:20 2002]  [jk_worker.c (132)]: Into 
wc_get_worker_for_name
> AK> worker1 [Tue Oct 15 11:52:20 2002]  [jk_worker.c (136)]: AK>
> wc_get_worker_for_name, done did not found a worker
> 
> AK> Why is my worker getting lost? Do I have some kind of 
> AK> misconfiguration?

---
Aryeh Katz
VASCO   
www.vasco.com   

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: servlet mapping help

2002-10-15 Thread Jacob Kjome

Hello Aryeh,

The proper syntax is:

JkMount /examples/servlets/* ajp13

You define the protocol, not a worker after the mount pattern.

Jake

Tuesday, October 15, 2002, 11:03:01 AM, you wrote:

AK> I'm trying to integrate mod_jk and tomcat.
AK> My httpd.conf file has the following mapping

AK> JkMount /examples/servlets/* worker1

AK> and I see the following in my jk log file (at debug)

AK> [Tue Oct 15 11:52:17 2002]  [jk_uri_worker_map.c (321)]: Into  
AK> jk_uri_worker_map_t::uri_worker_map_open, match rule
AK> /examples/servlets/=worker1 was added [Tue Oct 15 11:52:17 2002] 
AK> [jk_uri_worker_map.c (408)]: Into
AK> jk_uri_worker_map_t::uri_worker_map_open, there are 1 rules [Tue Oct
AK> 15 11:52:17 2002]  [jk_uri_worker_map.c (422)]:
AK> jk_uri_worker_map_t::uri_worker_map_open, done [Tue Oct 15 11:52:20
AK> 2002]  [jk_uri_worker_map.c (460)]: Into
AK> jk_uri_worker_map_t::map_uri_to_worker [Tue Oct 15 11:52:20 2002] 
AK> [jk_uri_worker_map.c (477)]: Attempting to map URI
AK> '/examples/servlets/HelloWorldExample' [Tue Oct 15 11:52:20 2002] 
AK> [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker,
AK> Found a context match worker1 -> /examples/servlets/ [Tue Oct 15
AK> 11:52:20 2002]  [jk_worker.c (132)]: Into wc_get_worker_for_name
AK> worker1 [Tue Oct 15 11:52:20 2002]  [jk_worker.c (136)]:
AK> wc_get_worker_for_name, done did not found a worker

AK> Why is my worker getting lost? Do I have some kind of 
AK> misconfiguration?

AK> ---
AK> Aryeh Katz
AK> VASCO   
AK> www.vasco.com

AK> --
AK> To unsubscribe, e-mail:   
AK> For additional commands, e-mail: 



-- 
Best regards,
 Jacobmailto:[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: servlet-mapping with *.suffix problem

2002-05-11 Thread Luuk de Vries


- Original Message -
From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Saturday, May 11, 2002 6:15 PM
Subject: Re: servlet-mapping with *.suffix problem


>
>
> On Sat, 11 May 2002, Luuk de Vries wrote:
>
> > Date: Sat, 11 May 2002 17:58:41 +0200
> > From: Luuk de Vries <[EMAIL PROTECTED]>
> > Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: servlet-mapping with *.suffix problem
> >
> > Hi,
> > I have a working application using RedHat
> > Linux6.2+jdk.1.3+Apache+mod_jk+tomcat3 which I migrated to the most
recent
> > RedHat Linux7.2+jdk1.4+Apache+mod_webapp+Tomcat4.0.3.
> > After the usual minor problems with migrations, the application worked
fine
> > again.
> > With the exception of the following detail:
> >
> > In web.xml I do a servlet-mapping with:
> > 
> >   Bestel
> >   /servlet/bestel
> > 
> >
> > And with:
> > 
> >   Bestel
> >   *.slk
> > 
> >
> > The one with *.slk is not working. I get: "Apache Tomcat/4.0.3 - HTTP
Status
> > 404 - /raddertc4/servlet/bestel/statistiek.slk".
> > And in the log it says: java.lang.ClassNotFoundException: bestel
> >
> > When I modify the last mapping to:
> > 
> >   Bestel
> >   /servlet/bestel/statistiek.slk
> > 
> >
> > The results are as they should be.
> >
> > As nothing can be found upon this problem in Google/tomcat-user-archive
and
> > faq, I submit my problem to you.
> >
> > Thanks in advance for any suggestion,
> >
>
> You are running into a subtle but important rule in how servlet mappings
> work -- there is a priority order that they are checked in:
> * Exact match (like your last one)
> * Path match (/foo/bar/*)
> * Extension match (*.foo)
> * Default servlet
>
> Tomcat provides a default mapping for "/servlet/*" to trigger the invoker
> servlet, and assumes that the first path segment after the "/servlet/"
> part is the name or classname of your servlet.  Because path maps are
> checked second, this one is matched before the *.slk mapping.  Thus, it
> looks for a servlet named "bestel" and does not find it.
>
> If you try a ".slk" path that does *not* start with "/servlet/", you'll
> find that it works as you expect.  Alternatively, you can comment out the
> /servlet/* mapping (in $CATALINA_HOME/conf/web.xml) if you don't want the
> invoker -- but this is global to all your webapps.
>
> > Luuk de Vries
>
> Craig
>

Hi,

After carefull interpretation of the above priority order, I implemented the
servlet-mapping:

  Bestel
  /servlet/bestel/*


This works nice and I don't have to modify the conf/web.xml.

Thank you for the explanation,

Luuk de Vries



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: servlet-mapping with *.suffix problem

2002-05-11 Thread Craig R. McClanahan



On Sat, 11 May 2002, Luuk de Vries wrote:

> Date: Sat, 11 May 2002 17:58:41 +0200
> From: Luuk de Vries <[EMAIL PROTECTED]>
> Reply-To: Tomcat Users List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: servlet-mapping with *.suffix problem
>
> Hi,
> I have a working application using RedHat
> Linux6.2+jdk.1.3+Apache+mod_jk+tomcat3 which I migrated to the most recent
> RedHat Linux7.2+jdk1.4+Apache+mod_webapp+Tomcat4.0.3.
> After the usual minor problems with migrations, the application worked fine
> again.
> With the exception of the following detail:
>
> In web.xml I do a servlet-mapping with:
> 
>   Bestel
>   /servlet/bestel
> 
>
> And with:
> 
>   Bestel
>   *.slk
> 
>
> The one with *.slk is not working. I get: "Apache Tomcat/4.0.3 - HTTP Status
> 404 - /raddertc4/servlet/bestel/statistiek.slk".
> And in the log it says: java.lang.ClassNotFoundException: bestel
>
> When I modify the last mapping to:
> 
>   Bestel
>   /servlet/bestel/statistiek.slk
> 
>
> The results are as they should be.
>
> As nothing can be found upon this problem in Google/tomcat-user-archive and
> faq, I submit my problem to you.
>
> Thanks in advance for any suggestion,
>

You are running into a subtle but important rule in how servlet mappings
work -- there is a priority order that they are checked in:
* Exact match (like your last one)
* Path match (/foo/bar/*)
* Extension match (*.foo)
* Default servlet

Tomcat provides a default mapping for "/servlet/*" to trigger the invoker
servlet, and assumes that the first path segment after the "/servlet/"
part is the name or classname of your servlet.  Because path maps are
checked second, this one is matched before the *.slk mapping.  Thus, it
looks for a servlet named "bestel" and does not find it.

If you try a ".slk" path that does *not* start with "/servlet/", you'll
find that it works as you expect.  Alternatively, you can comment out the
/servlet/* mapping (in $CATALINA_HOME/conf/web.xml) if you don't want the
invoker -- but this is global to all your webapps.

> Luuk de Vries

Craig


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




  1   2   >