You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Stefan <st...@killersites.com> on 2004/11/21 18:55:48 UTC

Servlet mapping problem.

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:
----------------------------------------------------------------------------
--

  <servlet> <servlet-name>loginResponse</servlet-name>
<servlet-class>com._ABC.authenticateAdmin</servlet-class> <init-param>
<param-name>adminPassword</param-name> <param-value>xxx</param-value>
</init-param> </servlet> <servlet-mapping>
<servlet-name>loginResponse</servlet-name>
<url-pattern>/loginResponse.do</url-pattern> </servlet-mapping>
----------------------------------------------------------------------------
--



It's my first time using Tomcat, been a Resin user for years ... any ideas?

Thanks,

Stef



----- Original Message ----- 
From: "Mark Thomas" <ma...@apache.org>
To: "'Tomcat Users List'" <to...@jakarta.apache.org>
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:skamshil@convedia.com]
> > Sent: Saturday, November 20, 2004 12:00 AM
> > To: tomcat-user@jakarta.apache.org
> > 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:
> > ------
> >     <servlet>
> >         <servlet-name>cgi</servlet-name>
> >
> > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> >         <init-param>
> >           <param-name>debug</param-name>
> >           <param-value>6</param-value>
> >         </init-param>
> >         <init-param>
> >           <param-name>cgiPathPrefix</param-name>
> >           <param-value>/WEB-INF/cgi-bin/</param-value>
> >         </init-param>
> >         <load-on-startup>5</load-on-startup>
> >     </servlet>
> > ------
> > 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: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


[OT] Re: Servlet mapping problem.

Posted by Ben Souther <bs...@fwdco.com>.
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" <bs...@fwdco.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> 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" <bs...@fwdco.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > 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:
> > > > >
> > > > > <Context path="" docBase="${catalina.home}/webapps/the_context"
> > > > > reloadable="true"></Context>
> > > > >
> > > > > Of course, my web app is sitting in the 'webapps' directory in
> Tomcat.
> > > > >
> > > > > Any ideas?
> > > > >
> > > > > Stefan
> > > > >
> > > > > www.killersites.com
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Ben Souther" <bs...@fwdco.com>
> > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > > Subject: Re: Servlet mapping problem.
> > > > >
> > > > >
> > > > > > Why don't you just use a relative link?:
> > > > > > <form action="loginResponse.do" method="post">
> > > > > >
> > > > > > 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:
> > > > > > >
> > > > > > > <form action="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:
> > > > > > >
> > > > > > > <servlet-mapping>
> > > > > > >   <servlet-name>loginResponse</servlet-name>
> > > > > > >   <url-pattern>/loginResponse.do</url-pattern>
> > > > > > >  </servlet-mapping>
> > > > > > >
> > > > > > >
> > > > > > > Does this shed any light on what is going on?
> > > > > > >
> > > > > > >
> > > > > > > Stefan
> > > > > > >
> > > > > > > www.killersites.com
> > > > > > >
> > > > > > >
> > > > > > > ----- Original Message ----- 
> > > > > > > From: "Stefan" <st...@killersites.com>
> > > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > > 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:
> > > > > > > >
> > > > > > > > <form action="/context_name/loginResponse.do" method="post">
> > > > > > > >
> > > > > > > > name: <input type="text" name="adminPassword">
> > > > > > > >
> > > > > > > > <input type="submit">
> > > > > > > >
> > > > > > > > </form>
> > > > > > > >
> > > > > > > > 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" <ak...@yahoo.com>
> > > > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > > > 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 <st...@killersites.com> 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:
> > > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> > --------------------------------------------------------------------------
> > > > > > > > --
> > > > > > > > > > --
> > > > > > > > > >
> > > > > > > > > >   <servlet>
> > > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > > >
> > > > > > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > > > > > <init-param>
> > > > > > > > > > <param-name>adminPassword</param-name>
> > > > > > > > > > <param-value>xxx</param-value>
> > > > > > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > > > > > </servlet-mapping>
> > > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > >
> > --------------------------------------------------------------------------
> > > > > > > > --
> > > > > > > > > > --
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > > > > > for years ... any ideas?
> > > > > > > > > >
> > > > > > > > > > Thanks,
> > > > > > > > > >
> > > > > > > > > > Stef
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ----- Original Message ----- 
> > > > > > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > > > > > To: "'Tomcat Users List'"
> > > > > > > > > > <to...@jakarta.apache.org>
> > > > > > > > > > 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:skamshil@convedia.com]
> > > > > > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > > > > > 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:
> > > > > > > > > > > > ------
> > > > > > > > > > > >     <servlet>
> > > > > > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > >
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > > > > > >         <init-param>
> > > > > > > > > > > >           <param-name>debug</param-name>
> > > > > > > > > > > >           <param-value>6</param-value>
> > > > > > > > > > > >         </init-param>
> > > > > > > > > > > >         <init-param>
> > > > > > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > > > > > >
> > > > > > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > > > > > >         </init-param>
> > > > > > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > > > > > >     </servlet>
> > > > > > > > > > > > ------
> > > > > > > > > > > > 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:
> > > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > __________________________________
> > > > > > > > > Do you Yahoo!?
> > > > > > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > > > > > http://my.yahoo.com
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
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" <bs...@fwdco.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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" <bs...@fwdco.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > 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:
> > > >
> > > > <Context path="" docBase="${catalina.home}/webapps/the_context"
> > > > reloadable="true"></Context>
> > > >
> > > > Of course, my web app is sitting in the 'webapps' directory in
Tomcat.
> > > >
> > > > Any ideas?
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Ben Souther" <bs...@fwdco.com>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > > Why don't you just use a relative link?:
> > > > > <form action="loginResponse.do" method="post">
> > > > >
> > > > > 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:
> > > > > >
> > > > > > <form action="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:
> > > > > >
> > > > > > <servlet-mapping>
> > > > > >   <servlet-name>loginResponse</servlet-name>
> > > > > >   <url-pattern>/loginResponse.do</url-pattern>
> > > > > >  </servlet-mapping>
> > > > > >
> > > > > >
> > > > > > Does this shed any light on what is going on?
> > > > > >
> > > > > >
> > > > > > Stefan
> > > > > >
> > > > > > www.killersites.com
> > > > > >
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Stefan" <st...@killersites.com>
> > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > 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:
> > > > > > >
> > > > > > > <form action="/context_name/loginResponse.do" method="post">
> > > > > > >
> > > > > > > name: <input type="text" name="adminPassword">
> > > > > > >
> > > > > > > <input type="submit">
> > > > > > >
> > > > > > > </form>
> > > > > > >
> > > > > > > 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" <ak...@yahoo.com>
> > > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > > 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 <st...@killersites.com> 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:
> > > > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > > > --
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > >   <servlet>
> > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > >
> > > > > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > > > > <init-param>
> > > > > > > > > <param-name>adminPassword</param-name>
> > > > > > > > > <param-value>xxx</param-value>
> > > > > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > > > > </servlet-mapping>
> > > > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > > > --
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > > > > for years ... any ideas?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > > Stef
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ----- Original Message ----- 
> > > > > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > > > > To: "'Tomcat Users List'"
> > > > > > > > > <to...@jakarta.apache.org>
> > > > > > > > > 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:skamshil@convedia.com]
> > > > > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > > > > 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:
> > > > > > > > > > > ------
> > > > > > > > > > >     <servlet>
> > > > > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > >
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > > > > >         <init-param>
> > > > > > > > > > >           <param-name>debug</param-name>
> > > > > > > > > > >           <param-value>6</param-value>
> > > > > > > > > > >         </init-param>
> > > > > > > > > > >         <init-param>
> > > > > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > > > > >
> > > > > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > > > > >         </init-param>
> > > > > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > > > > >     </servlet>
> > > > > > > > > > > ------
> > > > > > > > > > > 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:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > __________________________________
> > > > > > > > Do you Yahoo!?
> > > > > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > > > > http://my.yahoo.com
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
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" <bs...@fwdco.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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" <bs...@fwdco.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > 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:
> > > >
> > > > <Context path="" docBase="${catalina.home}/webapps/the_context"
> > > > reloadable="true"></Context>
> > > >
> > > > Of course, my web app is sitting in the 'webapps' directory in
Tomcat.
> > > >
> > > > Any ideas?
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Ben Souther" <bs...@fwdco.com>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > Sent: Monday, November 22, 2004 10:19 AM
> > > > Subject: Re: Servlet mapping problem.
> > > >
> > > >
> > > > > Why don't you just use a relative link?:
> > > > > <form action="loginResponse.do" method="post">
> > > > >
> > > > > 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:
> > > > > >
> > > > > > <form action="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:
> > > > > >
> > > > > > <servlet-mapping>
> > > > > >   <servlet-name>loginResponse</servlet-name>
> > > > > >   <url-pattern>/loginResponse.do</url-pattern>
> > > > > >  </servlet-mapping>
> > > > > >
> > > > > >
> > > > > > Does this shed any light on what is going on?
> > > > > >
> > > > > >
> > > > > > Stefan
> > > > > >
> > > > > > www.killersites.com
> > > > > >
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Stefan" <st...@killersites.com>
> > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > 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:
> > > > > > >
> > > > > > > <form action="/context_name/loginResponse.do" method="post">
> > > > > > >
> > > > > > > name: <input type="text" name="adminPassword">
> > > > > > >
> > > > > > > <input type="submit">
> > > > > > >
> > > > > > > </form>
> > > > > > >
> > > > > > > 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" <ak...@yahoo.com>
> > > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > > 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 <st...@killersites.com> 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:
> > > > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > > > --
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > >   <servlet>
> > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > >
> > > > > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > > > > <init-param>
> > > > > > > > > <param-name>adminPassword</param-name>
> > > > > > > > > <param-value>xxx</param-value>
> > > > > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > > > > </servlet-mapping>
> > > > > > > > >
> > > > > > >
> > > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > > > --
> > > > > > > > > --
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > > > > for years ... any ideas?
> > > > > > > > >
> > > > > > > > > Thanks,
> > > > > > > > >
> > > > > > > > > Stef
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ----- Original Message ----- 
> > > > > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > > > > To: "'Tomcat Users List'"
> > > > > > > > > <to...@jakarta.apache.org>
> > > > > > > > > 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:skamshil@convedia.com]
> > > > > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > > > > 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:
> > > > > > > > > > > ------
> > > > > > > > > > >     <servlet>
> > > > > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > >
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > > > > >         <init-param>
> > > > > > > > > > >           <param-name>debug</param-name>
> > > > > > > > > > >           <param-value>6</param-value>
> > > > > > > > > > >         </init-param>
> > > > > > > > > > >         <init-param>
> > > > > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > > > > >
> > > > > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > > > > >         </init-param>
> > > > > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > > > > >     </servlet>
> > > > > > > > > > > ------
> > > > > > > > > > > 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:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > __________________________________
> > > > > > > > Do you Yahoo!?
> > > > > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > > > > http://my.yahoo.com
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Ben Souther <bs...@fwdco.com>.
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" <bs...@fwdco.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> 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:
> > >
> > > <Context path="" docBase="${catalina.home}/webapps/the_context"
> > > reloadable="true"></Context>
> > >
> > > Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> > >
> > > Any ideas?
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Ben Souther" <bs...@fwdco.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > Sent: Monday, November 22, 2004 10:19 AM
> > > Subject: Re: Servlet mapping problem.
> > >
> > >
> > > > Why don't you just use a relative link?:
> > > > <form action="loginResponse.do" method="post">
> > > >
> > > > 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:
> > > > >
> > > > > <form action="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:
> > > > >
> > > > > <servlet-mapping>
> > > > >   <servlet-name>loginResponse</servlet-name>
> > > > >   <url-pattern>/loginResponse.do</url-pattern>
> > > > >  </servlet-mapping>
> > > > >
> > > > >
> > > > > Does this shed any light on what is going on?
> > > > >
> > > > >
> > > > > Stefan
> > > > >
> > > > > www.killersites.com
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Stefan" <st...@killersites.com>
> > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > 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:
> > > > > >
> > > > > > <form action="/context_name/loginResponse.do" method="post">
> > > > > >
> > > > > > name: <input type="text" name="adminPassword">
> > > > > >
> > > > > > <input type="submit">
> > > > > >
> > > > > > </form>
> > > > > >
> > > > > > 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" <ak...@yahoo.com>
> > > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > > 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 <st...@killersites.com> 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:
> > > > > > > >
> > > > > >
> > > > >
> > >
> > --------------------------------------------------------------------------
> > > > > > --
> > > > > > > > --
> > > > > > > >
> > > > > > > >   <servlet>
> > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > >
> > > > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > > > <init-param>
> > > > > > > > <param-name>adminPassword</param-name>
> > > > > > > > <param-value>xxx</param-value>
> > > > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > > > </servlet-mapping>
> > > > > > > >
> > > > > >
> > > > >
> > >
> > --------------------------------------------------------------------------
> > > > > > --
> > > > > > > > --
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > > > for years ... any ideas?
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > Stef
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ----- Original Message ----- 
> > > > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > > > To: "'Tomcat Users List'"
> > > > > > > > <to...@jakarta.apache.org>
> > > > > > > > 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:skamshil@convedia.com]
> > > > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > > > 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:
> > > > > > > > > > ------
> > > > > > > > > >     <servlet>
> > > > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > >
> > > > > > >
> > > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > > > >         <init-param>
> > > > > > > > > >           <param-name>debug</param-name>
> > > > > > > > > >           <param-value>6</param-value>
> > > > > > > > > >         </init-param>
> > > > > > > > > >         <init-param>
> > > > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > > > >
> > > > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > > > >         </init-param>
> > > > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > > > >     </servlet>
> > > > > > > > > > ------
> > > > > > > > > > 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:
> > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > > For additional commands, e-mail:
> > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > __________________________________
> > > > > > > Do you Yahoo!?
> > > > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > > > http://my.yahoo.com
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
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" <bs...@fwdco.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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:
> >
> > <Context path="" docBase="${catalina.home}/webapps/the_context"
> > reloadable="true"></Context>
> >
> > Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> >
> > Any ideas?
> >
> > Stefan
> >
> > www.killersites.com
> >
> >
> > ----- Original Message ----- 
> > From: "Ben Souther" <bs...@fwdco.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Monday, November 22, 2004 10:19 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > > Why don't you just use a relative link?:
> > > <form action="loginResponse.do" method="post">
> > >
> > > 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:
> > > >
> > > > <form action="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:
> > > >
> > > > <servlet-mapping>
> > > >   <servlet-name>loginResponse</servlet-name>
> > > >   <url-pattern>/loginResponse.do</url-pattern>
> > > >  </servlet-mapping>
> > > >
> > > >
> > > > Does this shed any light on what is going on?
> > > >
> > > >
> > > > Stefan
> > > >
> > > > www.killersites.com
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Stefan" <st...@killersites.com>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > 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:
> > > > >
> > > > > <form action="/context_name/loginResponse.do" method="post">
> > > > >
> > > > > name: <input type="text" name="adminPassword">
> > > > >
> > > > > <input type="submit">
> > > > >
> > > > > </form>
> > > > >
> > > > > 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" <ak...@yahoo.com>
> > > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > > 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 <st...@killersites.com> 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:
> > > > > > >
> > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > --
> > > > > > > --
> > > > > > >
> > > > > > >   <servlet>
> > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > >
> > > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > > <init-param>
> > > > > > > <param-name>adminPassword</param-name>
> > > > > > > <param-value>xxx</param-value>
> > > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > > </servlet-mapping>
> > > > > > >
> > > > >
> > > >
> >
> --------------------------------------------------------------------------
> > > > > --
> > > > > > > --
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > > for years ... any ideas?
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Stef
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ----- Original Message ----- 
> > > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > > To: "'Tomcat Users List'"
> > > > > > > <to...@jakarta.apache.org>
> > > > > > > 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:skamshil@convedia.com]
> > > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > > 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:
> > > > > > > > > ------
> > > > > > > > >     <servlet>
> > > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > > >
> > > > > > > > >
> > > > > > >
> > > > > >
> > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > > >         <init-param>
> > > > > > > > >           <param-name>debug</param-name>
> > > > > > > > >           <param-value>6</param-value>
> > > > > > > > >         </init-param>
> > > > > > > > >         <init-param>
> > > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > > >
> > > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > > >         </init-param>
> > > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > > >     </servlet>
> > > > > > > > > ------
> > > > > > > > > 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:
> > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > __________________________________
> > > > > > Do you Yahoo!?
> > > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > > http://my.yahoo.com
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
tomcat-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Ben Souther <bs...@fwdco.com>.
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:
> 
> <Context path="" docBase="${catalina.home}/webapps/the_context"
> reloadable="true"></Context>
> 
> Of course, my web app is sitting in the 'webapps' directory in Tomcat.
> 
> Any ideas?
> 
> Stefan
> 
> www.killersites.com
> 
> 
> ----- Original Message ----- 
> From: "Ben Souther" <bs...@fwdco.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, November 22, 2004 10:19 AM
> Subject: Re: Servlet mapping problem.
> 
> 
> > Why don't you just use a relative link?:
> > <form action="loginResponse.do" method="post">
> >
> > 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:
> > >
> > > <form action="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:
> > >
> > > <servlet-mapping>
> > >   <servlet-name>loginResponse</servlet-name>
> > >   <url-pattern>/loginResponse.do</url-pattern>
> > >  </servlet-mapping>
> > >
> > >
> > > Does this shed any light on what is going on?
> > >
> > >
> > > Stefan
> > >
> > > www.killersites.com
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Stefan" <st...@killersites.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > 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:
> > > >
> > > > <form action="/context_name/loginResponse.do" method="post">
> > > >
> > > > name: <input type="text" name="adminPassword">
> > > >
> > > > <input type="submit">
> > > >
> > > > </form>
> > > >
> > > > 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" <ak...@yahoo.com>
> > > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > > 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 <st...@killersites.com> 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:
> > > > > >
> > > >
> > >
> > --------------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > >
> > > > > >   <servlet>
> > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > >
> > > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > <init-param>
> > > > > > <param-name>adminPassword</param-name>
> > > > > > <param-value>xxx</param-value>
> > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > </servlet-mapping>
> > > > > >
> > > >
> > >
> > --------------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > >
> > > > > >
> > > > > >
> > > > > > It's my first time using Tomcat, been a Resin user
> > > > > > for years ... any ideas?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Stef
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > To: "'Tomcat Users List'"
> > > > > > <to...@jakarta.apache.org>
> > > > > > 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:skamshil@convedia.com]
> > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > 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:
> > > > > > > > ------
> > > > > > > >     <servlet>
> > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > >         <init-param>
> > > > > > > >           <param-name>debug</param-name>
> > > > > > > >           <param-value>6</param-value>
> > > > > > > >         </init-param>
> > > > > > > >         <init-param>
> > > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > > >
> > > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > > >         </init-param>
> > > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > > >     </servlet>
> > > > > > > > ------
> > > > > > > > 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:
> > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > > For additional commands, e-mail:
> > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
> > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > > tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > > > > > tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > __________________________________
> > > > > Do you Yahoo!?
> > > > > Meet the all-new My Yahoo! - Try it today!
> > > > > http://my.yahoo.com
> > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
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:

<Context path="" docBase="${catalina.home}/webapps/the_context"
reloadable="true"></Context>

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

Any ideas?

Stefan

www.killersites.com


----- Original Message ----- 
From: "Ben Souther" <bs...@fwdco.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, November 22, 2004 10:19 AM
Subject: Re: Servlet mapping problem.


> Why don't you just use a relative link?:
> <form action="loginResponse.do" method="post">
>
> 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:
> >
> > <form action="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:
> >
> > <servlet-mapping>
> >   <servlet-name>loginResponse</servlet-name>
> >   <url-pattern>/loginResponse.do</url-pattern>
> >  </servlet-mapping>
> >
> >
> > Does this shed any light on what is going on?
> >
> >
> > Stefan
> >
> > www.killersites.com
> >
> >
> > ----- Original Message ----- 
> > From: "Stefan" <st...@killersites.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > 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:
> > >
> > > <form action="/context_name/loginResponse.do" method="post">
> > >
> > > name: <input type="text" name="adminPassword">
> > >
> > > <input type="submit">
> > >
> > > </form>
> > >
> > > 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" <ak...@yahoo.com>
> > > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > > 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 <st...@killersites.com> 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:
> > > > >
> > >
> >
> --------------------------------------------------------------------------
> > > --
> > > > > --
> > > > >
> > > > >   <servlet>
> > > > > <servlet-name>loginResponse</servlet-name>
> > > > >
> > > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > <init-param>
> > > > > <param-name>adminPassword</param-name>
> > > > > <param-value>xxx</param-value>
> > > > > </init-param> </servlet> <servlet-mapping>
> > > > > <servlet-name>loginResponse</servlet-name>
> > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > </servlet-mapping>
> > > > >
> > >
> >
> --------------------------------------------------------------------------
> > > --
> > > > > --
> > > > >
> > > > >
> > > > >
> > > > > It's my first time using Tomcat, been a Resin user
> > > > > for years ... any ideas?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Stef
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > To: "'Tomcat Users List'"
> > > > > <to...@jakarta.apache.org>
> > > > > 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:skamshil@convedia.com]
> > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > 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:
> > > > > > > ------
> > > > > > >     <servlet>
> > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > >
> > > > > > >
> > > > >
> > > >
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > >         <init-param>
> > > > > > >           <param-name>debug</param-name>
> > > > > > >           <param-value>6</param-value>
> > > > > > >         </init-param>
> > > > > > >         <init-param>
> > > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > > >
> > > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > > >         </init-param>
> > > > > > >         <load-on-startup>5</load-on-startup>
> > > > > > >     </servlet>
> > > > > > > ------
> > > > > > > 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:
> > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > tomcat-user-help@jakarta.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > > > > tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > > tomcat-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Meet the all-new My Yahoo! - Try it today!
> > > > http://my.yahoo.com
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Ben Souther <bs...@fwdco.com>.
Why don't you just use a relative link?:
<form action="loginResponse.do" method="post">

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:
> 
> <form action="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:
> 
> <servlet-mapping>
>   <servlet-name>loginResponse</servlet-name>
>   <url-pattern>/loginResponse.do</url-pattern>
>  </servlet-mapping>
> 
> 
> Does this shed any light on what is going on?
> 
> 
> Stefan
> 
> www.killersites.com
> 
> 
> ----- Original Message ----- 
> From: "Stefan" <st...@killersites.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> 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:
> >
> > <form action="/context_name/loginResponse.do" method="post">
> >
> > name: <input type="text" name="adminPassword">
> >
> > <input type="submit">
> >
> > </form>
> >
> > 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" <ak...@yahoo.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > 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 <st...@killersites.com> 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:
> > > >
> >
> > --------------------------------------------------------------------------
> > --
> > > > --
> > > >
> > > >   <servlet>
> > > > <servlet-name>loginResponse</servlet-name>
> > > >
> > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > <init-param>
> > > > <param-name>adminPassword</param-name>
> > > > <param-value>xxx</param-value>
> > > > </init-param> </servlet> <servlet-mapping>
> > > > <servlet-name>loginResponse</servlet-name>
> > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > </servlet-mapping>
> > > >
> >
> > --------------------------------------------------------------------------
> > --
> > > > --
> > > >
> > > >
> > > >
> > > > It's my first time using Tomcat, been a Resin user
> > > > for years ... any ideas?
> > > >
> > > > Thanks,
> > > >
> > > > Stef
> > > >
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Mark Thomas" <ma...@apache.org>
> > > > To: "'Tomcat Users List'"
> > > > <to...@jakarta.apache.org>
> > > > 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:skamshil@convedia.com]
> > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > 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:
> > > > > > ------
> > > > > >     <servlet>
> > > > > >         <servlet-name>cgi</servlet-name>
> > > > > >
> > > > > >
> > > >
> > > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > >         <init-param>
> > > > > >           <param-name>debug</param-name>
> > > > > >           <param-value>6</param-value>
> > > > > >         </init-param>
> > > > > >         <init-param>
> > > > > >           <param-name>cgiPathPrefix</param-name>
> > > > > >
> > > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > > >         </init-param>
> > > > > >         <load-on-startup>5</load-on-startup>
> > > > > >     </servlet>
> > > > > > ------
> > > > > > 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:
> > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > > > tomcat-user-help@jakarta.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > > tomcat-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > >
> > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > > tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Meet the all-new My Yahoo! - Try it today!
> > > http://my.yahoo.com
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
Hi,

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

<form action="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:

<servlet-mapping>
  <servlet-name>loginResponse</servlet-name>
  <url-pattern>/loginResponse.do</url-pattern>
 </servlet-mapping>


Does this shed any light on what is going on?


Stefan

www.killersites.com


----- Original Message ----- 
From: "Stefan" <st...@killersites.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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:
>
> <form action="/context_name/loginResponse.do" method="post">
>
> name: <input type="text" name="adminPassword">
>
> <input type="submit">
>
> </form>
>
> 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" <ak...@yahoo.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> 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 <st...@killersites.com> 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:
> > >
>
> --------------------------------------------------------------------------
> --
> > > --
> > >
> > >   <servlet>
> > > <servlet-name>loginResponse</servlet-name>
> > >
> > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > <init-param>
> > > <param-name>adminPassword</param-name>
> > > <param-value>xxx</param-value>
> > > </init-param> </servlet> <servlet-mapping>
> > > <servlet-name>loginResponse</servlet-name>
> > > <url-pattern>/loginResponse.do</url-pattern>
> > > </servlet-mapping>
> > >
>
> --------------------------------------------------------------------------
> --
> > > --
> > >
> > >
> > >
> > > It's my first time using Tomcat, been a Resin user
> > > for years ... any ideas?
> > >
> > > Thanks,
> > >
> > > Stef
> > >
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Mark Thomas" <ma...@apache.org>
> > > To: "'Tomcat Users List'"
> > > <to...@jakarta.apache.org>
> > > 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:skamshil@convedia.com]
> > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > To: tomcat-user@jakarta.apache.org
> > > > > 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:
> > > > > ------
> > > > >     <servlet>
> > > > >         <servlet-name>cgi</servlet-name>
> > > > >
> > > > >
> > >
> > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > >         <init-param>
> > > > >           <param-name>debug</param-name>
> > > > >           <param-value>6</param-value>
> > > > >         </init-param>
> > > > >         <init-param>
> > > > >           <param-name>cgiPathPrefix</param-name>
> > > > >
> > > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > > >         </init-param>
> > > > >         <load-on-startup>5</load-on-startup>
> > > > >     </servlet>
> > > > > ------
> > > > > 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:
> > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail:
> > > tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > > tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Meet the all-new My Yahoo! - Try it today!
> > http://my.yahoo.com
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
Hi,

This is my web.xml for the web app:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
 <welcome-file-list>index.jsp</welcome-file-list>

 <filter>
  <filter-name>authentication filter</filter-name>
  <filter-class>com._XYZ.authenticateAdminFilter</filter-class>
 </filter>

 <filter-mapping>
  <filter-name>authentication filter</filter-name>
  <url-pattern>/admin/*</url-pattern>
 </filter-mapping>

 <servlet>
  <servlet-name>loginResponse</servlet-name>
  <servlet-class>com._XYZ.authenticateAdmin</servlet-class>

  <init-param>
   <param-name>testPassword</param-name>
   <param-value>xxx</param-value>
  </init-param>
 </servlet>

 <servlet-mapping>
  <servlet-name>loginResponse</servlet-name>
  <url-pattern>/loginResponse.do</url-pattern>
 </servlet-mapping>

</web-app>

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

Stefan

www.killersites.com


----- Original Message ----- 
From: "Andoni" <an...@eurokom.ie>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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" <st...@killersites.com>
> 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" <ak...@yahoo.com>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Monday, November 22, 2004 12:25 AM
> > Subject: Re: Servlet mapping problem.
> >
> >
> > >   Can you also post all your struts-config.xml <action
> > >  ..> ? I was looking for something that may be
> > > <forward>ing it to login.jsp.  This line you have in
> > > your form,  <form
> > > action="/context_name/loginResponse.do"  points to
> > > context_name/loginResponse.do  so show this <action>
> > > line of your struts-config.xml
> > >
> > > --- Stefan <st...@killersites.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > I am actually using a form to post to the target
> > > > servlet:
> > > >
> > > > <form action="/context_name/loginResponse.do"
> > > > method="post">
> > > >
> > > > name: <input type="text" name="adminPassword">
> > > >
> > > > <input type="submit">
> > > >
> > > > </form>
> > > >
> > > > 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" <ak...@yahoo.com>
> > > > To: "Tomcat Users List"
> > > > <to...@jakarta.apache.org>
> > > > 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 <st...@killersites.com> 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:
> > > > > >
> > > > >
> > > >
> >
>
> --------------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > >
> > > > > >   <servlet>
> > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > >
> > > > >
> > > >
> > > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > > <init-param>
> > > > > > <param-name>adminPassword</param-name>
> > > > > > <param-value>xxx</param-value>
> > > > > > </init-param> </servlet> <servlet-mapping>
> > > > > > <servlet-name>loginResponse</servlet-name>
> > > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > > </servlet-mapping>
> > > > > >
> > > > >
> > > >
> >
>
> --------------------------------------------------------------------------
> > > > --
> > > > > > --
> > > > > >
> > > > > >
> > > > > >
> > > > > > It's my first time using Tomcat, been a Resin
> > > > user
> > > > > > for years ... any ideas?
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Stef
> > > > > >
> > > > > >
> > > > > >
> > > > > > ----- Original Message ----- 
> > > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > > To: "'Tomcat Users List'"
> > > > > > <to...@jakarta.apache.org>
> > > > > > 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:skamshil@convedia.com]
> > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > > 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:
> > > > > > > > ------
> > > > > > > >     <servlet>
> > > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > >
> > > >
> > > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > > >         <init-param>
> > > > > > > >           <param-name>debug</param-name>
> > > > > > > >           <param-value>6</param-value>
> > > > > > > >         </init-param>
> > > > > > > >         <init-param>
> > > >
> > > === message truncated ===
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > The all-new My Yahoo! - Get yours free!
> > > http://my.yahoo.com
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by Andoni <an...@eurokom.ie>.
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" <st...@killersites.com>
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" <ak...@yahoo.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Monday, November 22, 2004 12:25 AM
> Subject: Re: Servlet mapping problem.
>
>
> >   Can you also post all your struts-config.xml <action
> >  ..> ? I was looking for something that may be
> > <forward>ing it to login.jsp.  This line you have in
> > your form,  <form
> > action="/context_name/loginResponse.do"  points to
> > context_name/loginResponse.do  so show this <action>
> > line of your struts-config.xml
> >
> > --- Stefan <st...@killersites.com> wrote:
> >
> > > Hi,
> > >
> > > I am actually using a form to post to the target
> > > servlet:
> > >
> > > <form action="/context_name/loginResponse.do"
> > > method="post">
> > >
> > > name: <input type="text" name="adminPassword">
> > >
> > > <input type="submit">
> > >
> > > </form>
> > >
> > > 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" <ak...@yahoo.com>
> > > To: "Tomcat Users List"
> > > <to...@jakarta.apache.org>
> > > 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 <st...@killersites.com> 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:
> > > > >
> > > >
> > >
>
> --------------------------------------------------------------------------
> > > --
> > > > > --
> > > > >
> > > > >   <servlet>
> > > > > <servlet-name>loginResponse</servlet-name>
> > > > >
> > > >
> > >
> > <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > > <init-param>
> > > > > <param-name>adminPassword</param-name>
> > > > > <param-value>xxx</param-value>
> > > > > </init-param> </servlet> <servlet-mapping>
> > > > > <servlet-name>loginResponse</servlet-name>
> > > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > > </servlet-mapping>
> > > > >
> > > >
> > >
>
> --------------------------------------------------------------------------
> > > --
> > > > > --
> > > > >
> > > > >
> > > > >
> > > > > It's my first time using Tomcat, been a Resin
> > > user
> > > > > for years ... any ideas?
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Stef
> > > > >
> > > > >
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: "Mark Thomas" <ma...@apache.org>
> > > > > To: "'Tomcat Users List'"
> > > > > <to...@jakarta.apache.org>
> > > > > 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:skamshil@convedia.com]
> > > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > > 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:
> > > > > > > ------
> > > > > > >     <servlet>
> > > > > > >         <servlet-name>cgi</servlet-name>
> > > > > > >
> > > > > > >
> > > > >
> > > >
> > >
> > <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > > >         <init-param>
> > > > > > >           <param-name>debug</param-name>
> > > > > > >           <param-value>6</param-value>
> > > > > > >         </init-param>
> > > > > > >         <init-param>
> > >
> > === message truncated ===
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > The all-new My Yahoo! - Get yours free!
> > http://my.yahoo.com
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
Hi,

I'm not using struts.

Stefan

www.killersites.com


----- Original Message ----- 
From: "sven morales" <ak...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Monday, November 22, 2004 12:25 AM
Subject: Re: Servlet mapping problem.


>   Can you also post all your struts-config.xml <action
>  ..> ? I was looking for something that may be
> <forward>ing it to login.jsp.  This line you have in
> your form,  <form
> action="/context_name/loginResponse.do"  points to
> context_name/loginResponse.do  so show this <action>
> line of your struts-config.xml
>
> --- Stefan <st...@killersites.com> wrote:
>
> > Hi,
> >
> > I am actually using a form to post to the target
> > servlet:
> >
> > <form action="/context_name/loginResponse.do"
> > method="post">
> >
> > name: <input type="text" name="adminPassword">
> >
> > <input type="submit">
> >
> > </form>
> >
> > 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" <ak...@yahoo.com>
> > To: "Tomcat Users List"
> > <to...@jakarta.apache.org>
> > 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 <st...@killersites.com> 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:
> > > >
> > >
> >
> --------------------------------------------------------------------------
> > --
> > > > --
> > > >
> > > >   <servlet>
> > > > <servlet-name>loginResponse</servlet-name>
> > > >
> > >
> >
> <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > > <init-param>
> > > > <param-name>adminPassword</param-name>
> > > > <param-value>xxx</param-value>
> > > > </init-param> </servlet> <servlet-mapping>
> > > > <servlet-name>loginResponse</servlet-name>
> > > > <url-pattern>/loginResponse.do</url-pattern>
> > > > </servlet-mapping>
> > > >
> > >
> >
> --------------------------------------------------------------------------
> > --
> > > > --
> > > >
> > > >
> > > >
> > > > It's my first time using Tomcat, been a Resin
> > user
> > > > for years ... any ideas?
> > > >
> > > > Thanks,
> > > >
> > > > Stef
> > > >
> > > >
> > > >
> > > > ----- Original Message ----- 
> > > > From: "Mark Thomas" <ma...@apache.org>
> > > > To: "'Tomcat Users List'"
> > > > <to...@jakarta.apache.org>
> > > > 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:skamshil@convedia.com]
> > > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > > To: tomcat-user@jakarta.apache.org
> > > > > > 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:
> > > > > > ------
> > > > > >     <servlet>
> > > > > >         <servlet-name>cgi</servlet-name>
> > > > > >
> > > > > >
> > > >
> > >
> >
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > > >         <init-param>
> > > > > >           <param-name>debug</param-name>
> > > > > >           <param-value>6</param-value>
> > > > > >         </init-param>
> > > > > >         <init-param>
> >
> === message truncated ===
>
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - Get yours free!
> http://my.yahoo.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by sven morales <ak...@yahoo.com>.
  Can you also post all your struts-config.xml <action
 ..> ? I was looking for something that may be
<forward>ing it to login.jsp.  This line you have in
your form,  <form
action="/context_name/loginResponse.do"  points to
context_name/loginResponse.do  so show this <action>
line of your struts-config.xml

--- Stefan <st...@killersites.com> wrote:

> Hi,
> 
> I am actually using a form to post to the target
> servlet:
> 
> <form action="/context_name/loginResponse.do"
> method="post">
> 
> name: <input type="text" name="adminPassword">
> 
> <input type="submit">
> 
> </form>
> 
> 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" <ak...@yahoo.com>
> To: "Tomcat Users List"
> <to...@jakarta.apache.org>
> 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 <st...@killersites.com> 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:
> > >
> >
>
--------------------------------------------------------------------------
> --
> > > --
> > >
> > >   <servlet>
> > > <servlet-name>loginResponse</servlet-name>
> > >
> >
>
<servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > > <init-param>
> > > <param-name>adminPassword</param-name>
> > > <param-value>xxx</param-value>
> > > </init-param> </servlet> <servlet-mapping>
> > > <servlet-name>loginResponse</servlet-name>
> > > <url-pattern>/loginResponse.do</url-pattern>
> > > </servlet-mapping>
> > >
> >
>
--------------------------------------------------------------------------
> --
> > > --
> > >
> > >
> > >
> > > It's my first time using Tomcat, been a Resin
> user
> > > for years ... any ideas?
> > >
> > > Thanks,
> > >
> > > Stef
> > >
> > >
> > >
> > > ----- Original Message ----- 
> > > From: "Mark Thomas" <ma...@apache.org>
> > > To: "'Tomcat Users List'"
> > > <to...@jakarta.apache.org>
> > > 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:skamshil@convedia.com]
> > > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > > To: tomcat-user@jakarta.apache.org
> > > > > 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:
> > > > > ------
> > > > >     <servlet>
> > > > >         <servlet-name>cgi</servlet-name>
> > > > >
> > > > >
> > >
> >
>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > > >         <init-param>
> > > > >           <param-name>debug</param-name>
> > > > >           <param-value>6</param-value>
> > > > >         </init-param>
> > > > >         <init-param>
> 
=== message truncated ===



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


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


Re: Servlet mapping problem.

Posted by Stefan <st...@killersites.com>.
Hi,

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

<form action="/context_name/loginResponse.do" method="post">

name: <input type="text" name="adminPassword">

<input type="submit">

</form>

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" <ak...@yahoo.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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 <st...@killersites.com> 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:
> >
> --------------------------------------------------------------------------
--
> > --
> >
> >   <servlet>
> > <servlet-name>loginResponse</servlet-name>
> >
> <servlet-class>com._ABC.authenticateAdmin</servlet-class>
> > <init-param>
> > <param-name>adminPassword</param-name>
> > <param-value>xxx</param-value>
> > </init-param> </servlet> <servlet-mapping>
> > <servlet-name>loginResponse</servlet-name>
> > <url-pattern>/loginResponse.do</url-pattern>
> > </servlet-mapping>
> >
> --------------------------------------------------------------------------
--
> > --
> >
> >
> >
> > It's my first time using Tomcat, been a Resin user
> > for years ... any ideas?
> >
> > Thanks,
> >
> > Stef
> >
> >
> >
> > ----- Original Message ----- 
> > From: "Mark Thomas" <ma...@apache.org>
> > To: "'Tomcat Users List'"
> > <to...@jakarta.apache.org>
> > 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:skamshil@convedia.com]
> > > > Sent: Saturday, November 20, 2004 12:00 AM
> > > > To: tomcat-user@jakarta.apache.org
> > > > 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:
> > > > ------
> > > >     <servlet>
> > > >         <servlet-name>cgi</servlet-name>
> > > >
> > > >
> >
> <servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > > >         <init-param>
> > > >           <param-name>debug</param-name>
> > > >           <param-value>6</param-value>
> > > >         </init-param>
> > > >         <init-param>
> > > >           <param-name>cgiPathPrefix</param-name>
> > > >
> > <param-value>/WEB-INF/cgi-bin/</param-value>
> > > >         </init-param>
> > > >         <load-on-startup>5</load-on-startup>
> > > >     </servlet>
> > > > ------
> > > > 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:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> >
> >
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Meet the all-new My Yahoo! - Try it today!
> http://my.yahoo.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>


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


Re: Servlet mapping problem.

Posted by sven morales <ak...@yahoo.com>.
   Can you show us what you type in to your browser?

--- Stefan <st...@killersites.com> 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:
>
----------------------------------------------------------------------------
> --
> 
>   <servlet>
> <servlet-name>loginResponse</servlet-name>
>
<servlet-class>com._ABC.authenticateAdmin</servlet-class>
> <init-param>
> <param-name>adminPassword</param-name>
> <param-value>xxx</param-value>
> </init-param> </servlet> <servlet-mapping>
> <servlet-name>loginResponse</servlet-name>
> <url-pattern>/loginResponse.do</url-pattern>
> </servlet-mapping>
>
----------------------------------------------------------------------------
> --
> 
> 
> 
> It's my first time using Tomcat, been a Resin user
> for years ... any ideas?
> 
> Thanks,
> 
> Stef
> 
> 
> 
> ----- Original Message ----- 
> From: "Mark Thomas" <ma...@apache.org>
> To: "'Tomcat Users List'"
> <to...@jakarta.apache.org>
> 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:skamshil@convedia.com]
> > > Sent: Saturday, November 20, 2004 12:00 AM
> > > To: tomcat-user@jakarta.apache.org
> > > 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:
> > > ------
> > >     <servlet>
> > >         <servlet-name>cgi</servlet-name>
> > >
> > >
>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
> > >         <init-param>
> > >           <param-name>debug</param-name>
> > >           <param-value>6</param-value>
> > >         </init-param>
> > >         <init-param>
> > >           <param-name>cgiPathPrefix</param-name>
> > >          
> <param-value>/WEB-INF/cgi-bin/</param-value>
> > >         </init-param>
> > >         <load-on-startup>5</load-on-startup>
> > >     </servlet>
> > > ------
> > > 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:
> tomcat-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> > >
> > >
> >
> >
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> >
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



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


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