Hi, The web.xml file looks reasonable. But you have yet to answer the other question, which is how you generate the form tag.
Yoav Shapira http://www.yoavshapira.com >-----Original Message----- >From: Stefan [mailto:[EMAIL PROTECTED] >Sent: Monday, November 22, 2004 10:00 AM >To: Tomcat Users List >Subject: Re: Servlet mapping problem. > >Hi, > >This is my web.xml for the web app: > ><?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" <[EMAIL PROTECTED]> >To: "Tomcat Users List" <[EMAIL PROTECTED]> >Sent: Monday, November 22, 2004 7:39 AM >Subject: Re: Servlet mapping problem. > > >> If you are not using Struts why did you call the login JSP, >> loginResponse.do? >> >> Did you add .do to your web.xml file as a JSP type? Can you post your >> web.xml. >> >> Andoni. >> >> ----- Original Message ----- >> From: "Stefan" <[EMAIL PROTECTED]> >> Newsgroups: gmane.comp.jakarta.tomcat.user >> Sent: Monday, November 22, 2004 5:36 AM >> Subject: Re: Servlet mapping problem. >> >> >> > Hi, >> > >> > I'm not using struts. >> > >> > Stefan >> > >> > www.killersites.com >> > >> > >> > ----- Original Message ----- >> > From: "sven morales" <[EMAIL PROTECTED]> >> > To: "Tomcat Users List" <[EMAIL PROTECTED]> >> > Sent: Monday, November 22, 2004 12:25 AM >> > Subject: Re: Servlet mapping problem. >> > >> > >> > > Can you also post all your struts-config.xml <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 <[EMAIL PROTECTED]> 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" <[EMAIL PROTECTED]> >> > > > To: "Tomcat Users List" >> > > > <[EMAIL PROTECTED]> >> > > > Sent: Sunday, November 21, 2004 9:58 PM >> > > > Subject: Re: Servlet mapping problem. >> > > > >> > > > >> > > > > Can you show us what you type in to your >> > > > browser? >> > > > > >> > > > > --- Stefan <[EMAIL PROTECTED]> wrote: >> > > > > >> > > > > > Hi, >> > > > > > >> > > > > > I first posted this question with the wrong >> > > > subject >> > > > > > heading ... sorry about >> > > > > > the duplicates. >> > > > > > >> > > > > > My question: >> > > > > > >> > > > > > Using Tomcat 5.0.28 standalone on windows XP >> > > > with >> > > > > > JVM 1.4, I get this error >> > > > > > even though I have mapped my servlet in the >> > > > web.xml >> > > > > > file of the web app: >> > > > > > >> > > > > > >> > > > > > HTTP Status 404 - /loginResponse.do >> > > > > > >> > > > > > >> > > > > >> > > > >> > >> >> ------------------------------------------------------------------------ - >- >> > > > -- >> > > > > > ---- >> > > > > > >> > > > > > type Status report >> > > > > > >> > > > > > message /loginResponse.do >> > > > > > >> > > > > > description The requested resource >> > > > > > (/loginResponse.do) is not available. >> > > > > > >> > > > > > >> > > > > > >> > > > > >> > > > >> > >> >> ------------------------------------------------------------------------ - >- >> > > > -- >> > > > > > ---- >> > > > > > >> > > > > > Apache Tomcat/5.0.28 >> > > > > > >> > > > > > >> > > > > > I've placed my webapp folder in Tomcats' webapps >> > > > > > directory and all the jsp >> > > > > > pages run fine as do my POJO's for business >> > > > logic, >> > > > > > any ideas why the servlet >> > > > > > code could be causing problems? >> > > > > > >> > > > > > The servlet mappings: >> > > > > > >> > > > > > >> > > > > > code: >> > > > > > >> > > > > >> > > > >> > >> >> ------------------------------------------------------------------------ - >- >> > > > -- >> > > > > > -- >> > > > > > >> > > > > > <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" <[EMAIL PROTECTED]> >> > > > > > To: "'Tomcat Users List'" >> > > > > > <[EMAIL PROTECTED]> >> > > > > > Sent: Sunday, November 21, 2004 12:10 PM >> > > > > > Subject: RE: CGI Again...Servlet.service() for >> > > > > > servlet cgi threw exception >> > > > > > >> > > > > > >> > > > > > > I'll look into this but I need a bit more >> > > > info: >> > > > > > > >> > > > > > > 1. What servlet mapping did you specify in >> > > > > > web.xml? >> > > > > > > 2. What URL are you requesting? >> > > > > > > >> > > > > > > Mark >> > > > > > > >> > > > > > > > -----Original Message----- >> > > > > > > > From: Sergey Kamshilin >> > > > > > [mailto:[EMAIL PROTECTED] >> > > > > > > > Sent: Saturday, November 20, 2004 12:00 AM >> > > > > > > > To: [EMAIL PROTECTED] >> > > > > > > > Subject: CGI Again...Servlet.service() for >> > > > > > servlet cgi threw exception >> > > > > > > > >> > > > > > > > Sorry guys, I gave up digging into it and >> > > > > > haven't seen such >> > > > > > > > problems in >> > > > > > > > archives... >> > > > > > > > >> > > > > > > > Tomcat 4.1.31 on Solaris. >> > > > > > > > >> > > > > > > > I enabled cgi scripting: >> > > > > > > > changes in web.xml: >> > > > > > > > ------ >> > > > > > > > <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: [EMAIL PROTECTED] >> > > For additional commands, e-mail: [EMAIL PROTECTED] >> > > >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
