Re: Servlet mapping - url pattern with *
flower [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Let's consider situation like this: We have got some servlets responsible for genereting galery page. We want group galery pages by use common part in uri (/galery/): http://x.com/galery/galery_id/firstpage.html http://x.com/galery/galery_id/secondpage.html firstpage.html is generated by servlet1 , secondpage.html by servlet2. So we must url-pattern like this: /galery/*/firstpage.html and /galery/*/secondpage.html but this url-pattern doesn't work. question: why ? ( I use version 5.5.9 ) Some people, with I was talking about this, said that patterns like this was work with previously version and that version 5.5.9 is crazy ;] I've got a vague recollection that some some such Tomcat-specific extension was proposed on the dev list. Can't remember if it was ever implemented (and to which version), and I'm much to lazy to look it up :). However, the 5.5.9 behavior is in strict compilance with the Servlet spec (and, hence anything but crazy). Is any way to obtain behaviour like above with latest version ? Simplest is with a Filter that does something like: RequestDispatcher rd = null; if(request.getRequestURI().endsWith(/firstpage.html) { rd = getServletContext().getNamedDispatcher(servlet1); } else if(request.getRequestURI().endsWith(/secondpage.html); rd = getServletContext().getNamedDispatcher(servlet2); } if(rd != null) { rd.forward(request, response); } Greatings flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping - url pattern with *
Bill Barker wrote: flower [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hello, Let's consider situation like this: We have got some servlets responsible for genereting galery page. We want group galery pages by use common part in uri (/galery/): http://x.com/galery/galery_id/firstpage.html http://x.com/galery/galery_id/secondpage.html firstpage.html is generated by servlet1 , secondpage.html by servlet2. So we must url-pattern like this: /galery/*/firstpage.html and /galery/*/secondpage.html but this url-pattern doesn't work. question: why ? ( I use version 5.5.9 ) Some people, with I was talking about this, said that patterns like this was work with previously version and that version 5.5.9 is crazy ;] I've got a vague recollection that some some such Tomcat-specific extension was proposed on the dev list. Can't remember if it was ever implemented (and to which version), and I'm much to lazy to look it up :). However, the 5.5.9 behavior is in strict compilance with the Servlet spec (and, hence anything but crazy). mhm, when some time ago I was reading Servlet spec, I noticed that. Is any way to obtain behaviour like above with latest version ? Simplest is with a Filter that does something like: RequestDispatcher rd = null; if(request.getRequestURI().endsWith(/firstpage.html) { rd = getServletContext().getNamedDispatcher(servlet1); } else if(request.getRequestURI().endsWith(/secondpage.html); rd = getServletContext().getNamedDispatcher(servlet2); } if(rd != null) { rd.forward(request, response); } thx for example :) I was thinking about somethings like this ... but my lazy force me to looking buildin solution :) thx and greetings flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet mapping - url pattern with *
Hello, Let's consider situation like this: We have got some servlets responsible for genereting galery page. We want group galery pages by use common part in uri (/galery/): http://x.com/galery/galery_id/firstpage.html http://x.com/galery/galery_id/secondpage.html firstpage.html is generated by servlet1 , secondpage.html by servlet2. So we must url-pattern like this: /galery/*/firstpage.html and /galery/*/secondpage.html but this url-pattern doesn't work. question: why ? ( I use version 5.5.9 ) Some people, with I was talking about this, said that patterns like this was work with previously version and that version 5.5.9 is crazy ;] Is any way to obtain behaviour like above with latest version ? Greatings flow - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping and url
If you create a file in the root of the context (any file, could be an empty file, it just needs to show up in a directory listing) then map your servlet to the same URL you would use to reference the file, then add the file to the welcome-file-list and it will work. Tomcat will not forward to a welcome file unless it shows up in the directory. But once you map the servlet to the same URL, the servlet will intercept the request. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Saturday, July 02, 2005 9:25 AM To: Tomcat Users List Subject: Re: servlet mapping and url Hi, I don't think there is any restriction to mapping a servlet to a welcome page: servlet servlet-nameMyServlet/servlet-name servlet-classcom.company.app.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/myServlet/url-pattern /servlet-mapping welcome-file-list welcome-file/myServlet/welcome-file /welcome-file-list Also, I'm not as sure, put I think just mapping the servlet to / will do the trick as well. Both are easy enough to test though, give it a shot and post back your results for the archives. Frank s s wrote: i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet mapping and url
This trick isn't necessary in Tomcat 5.x and servlet spec 2.4. Welcome files as listed in the web.xml are each appended to the remote user's request and the result is processed until it resolves to a servlet or file. --David Geiglein, Gary wrote: If you create a file in the root of the context (any file, could be an empty file, it just needs to show up in a directory listing) then map your servlet to the same URL you would use to reference the file, then add the file to the welcome-file-list and it will work. Tomcat will not forward to a welcome file unless it shows up in the directory. But once you map the servlet to the same URL, the servlet will intercept the request. -Original Message- From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] Sent: Saturday, July 02, 2005 9:25 AM To: Tomcat Users List Subject: Re: servlet mapping and url Hi, I don't think there is any restriction to mapping a servlet to a welcome page: servlet servlet-nameMyServlet/servlet-name servlet-classcom.company.app.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/myServlet/url-pattern /servlet-mapping welcome-file-list welcome-file/myServlet/welcome-file /welcome-file-list Also, I'm not as sure, put I think just mapping the servlet to / will do the trick as well. Both are easy enough to test though, give it a shot and post back your results for the archives. Frank s s wrote: i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet mapping and url
i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone.
Re: servlet mapping and url
you can configure your web.xml file and make index.jsp file as an welcome file using, welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list now, create index.jsp file which will simply forward the request to your servlet! Rgds, Hardik --- s s [EMAIL PROTECTED] wrote: i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet mapping and url
Hi, I don't think there is any restriction to mapping a servlet to a welcome page: servlet servlet-nameMyServlet/servlet-name servlet-classcom.company.app.MyServlet/servlet-class /servlet servlet-mapping servlet-nameMyServlet/servlet-name url-pattern/myServlet/url-pattern /servlet-mapping welcome-file-list welcome-file/myServlet/welcome-file /welcome-file-list Also, I'm not as sure, put I think just mapping the servlet to / will do the trick as well. Both are easy enough to test though, give it a shot and post back your results for the archives. Frank s s wrote: i want to invoke a servlet using url like http://localhost:8080 only i have done it using http://localhost:8080/index.html where index.html is a servlet. Is it possible to load this servlet as a default just like a default web page. The point is i want a servlet to recieve a request when url http://localhost:8080 is referenced i.e without the servlet name. is it possible? - Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] wildcard servlet mapping also catching jsps
Hi Guys, Having a real ball ache with a requirement. We want to handle any URL with a Spring controller (servlet for those not into Spring). Therefore http://ourserver/wacky/url http://ourserver/something We want coming to our controller. Why? Because we have fancy page lookup and redirect services that the servlet should use to send out the resultant JSP or redirect. We run IIS - JK - Tomcat. To achieve getting arbitrary URLs into our controller we have 1. Mapping in JK's conf, i.e /*=ajp13 to route everything to the ajp13 tomcat worker. 2. Mapping in application web.xml for the controller servlet with mapping /* (everything!) 3. The Spring controller too needs a mapping itself /* but that's not really important I think. So we make one of those requests. And sure enough it gets to our controller servlet. We're happy. Until what happens next. The controller, sends back a JSP view, probably via request forwarding or whatever. However, the web.xml /* mapping to the controller picks up the JSP request/forward whatever, and so the JSP is never run as we're in a loop. Why oh why can't servlet-mapping elements allow for exclusions I don't know. Perhaps someone out there has an amazing idea that will ease the pain here :) Looking forward to solutions if indeed there are any. All the best, Allistair PS: I tried an ugly hack by adding the Tomcat JSP Servlet to my application web.xml and mapping *.jsp to it - did not work. FONT SIZE=1 FACE=VERDANA,ARIAL COLOR=BLUE --- QAS Ltd. Registered in England: No 2582055 Registered in Australia: No 082 851 474 --- /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Apache-Tomcat Servlet Mapping Issues
System: Solaris SunOS 5.9 Apache: 2.0.52 Tomcat: 4.1.31 Mod JK: 1.2.6 The problem: Apache/mod_jk cannot resolve servlet URL mappings When Tomcat is running stand-alone, it can resolve servlet mappings without any problems; so that a page with this form definition: FORM name=login method=POST action=loginhandler correctly invokes the com.company.LoginHandler servlet (which suggests there's nothing syntactically wrong with the servlet and servlet-mapping entries in web.xml); When Tomcat stand-alone is turned off and Apache is turned on, that same page always throws a 404 error for site/loginhandler; these are the error messages in mod_jk.log: [Wed Jun 22 09:04:08 2005] [mod_jk.c (2313)]: mod_jk::jk_translate, check alias_dir: /usr/apache/tomcat/webapps [Wed Jun 22 09:04:08 2005] [mod_jk.c (2337)]: mod_jk::jk_translate, AutoAlias child_dir: loginhandler [Wed Jun 22 09:04:08 2005] [mod_jk.c (2363)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/apache/tomcat/webapps/aiwosc/loginhandler [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/aiwosc/loginhandler' [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (577)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match What terribly simple configuration error have I made here? These are the web.xml entries for this servlet: servlet servlet-nameloginhandler/servlet-name servlet-classcom.company.aiwosc.LoginHandler/servlet-class /servlet servlet-mapping servlet-nameloginhandler/servlet-name url-pattern/loginhandler/url-pattern /servlet-mapping This is the workers.properties file: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=server.org worker.ajp13.type=ajp13 This is the app section from mod_jk.conf: server.org:/aiwosc # Static files Alias /aiwosc /var/apache/tomcat/webapps/aiwosc Directory /var/apache/tomcat/webapps/aiwosc Options Indexes FollowSymLinks DirectoryIndex index.html /Directory # Deny direct access to WEB-INF and META-INF # Location /aiwosc/WEB-INF/* AllowOverride None deny from all /Location Location /aiwosc/META-INF/* AllowOverride None deny from all /Location JkMount /aiwosc/addtitleservlet ajp13 JkMount /aiwosc/submittitleservlet ajp13 JkMount /aiwosc/transfertitleservlet ajp13 JkMount /aiwosc/saveoscservlet ajp13 JkMount /aiwosc/reordercastservlet ajp13 JkMount /aiwosc/loginhandler ajp13 JkMount /aiwosc/editcategoryservlet ajp13 JkMount /aiwosc/edittitleservlet ajp13 JkMount /aiwosc/addaddendumservlet ajp13 JkMount /aiwosc/*.jsp ajp13 JkMount /aiwosc/addcategoryservlet ajp13 This is the Context entry for the app in server.xml: !-- Oscars OSC Context -- Context path=/aiwosc docBase=aiwosc debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=aiwosc_log. suffix=.txt timestamp=true/ Resource name=jdbc/oscars auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/oscars parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@gtsora2.gtsgraphics.com:1521:ACAD/value /parameter parameter nameusername/name valueIMPC_ADMIN/value /parameter parameter namepassword/name valuePIRANHA/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context And these are the mod_jk load/configuration entries from httpd.conf: IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule Include /usr/apache/tomcat/conf/auto/mod_jk.conf JkWorkersFile /usr/apache/tomcat/conf/workers.properties JkLogFile /usr/apache/logs/mod_jk.log JkLogLevel debug JkLogStampFormat [%a %b %d %H:%M:%S %Y] JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories JkRequestLogFormat %w %V %T JkAutoAlias /usr/apache/tomcat/webapps JkMount /*.jsp ajp13 JkMount /*/servlet/ ajp13 -- David Rickard Software Engineer TechBooks/GTS Your Single Source Solution! Los Angeles CA * York, PA * Boston,MA * New Delhi, India Visit
Re: Apache-Tomcat Servlet Mapping Issues
Hi David: An alternate to using mod_JK is to proxy http (or https) request to the Tomcat from Apache. i.e: ProxyPass /path http://localhost:port/path ProxyPassReverse /path http://localhost/path There are valid reasons for using mod_JK - above just an alternate suggestion if you can do without mod_JK regards, Hari Mailvaganam On 6/22/05, David Rickard [EMAIL PROTECTED] wrote: System: Solaris SunOS 5.9 Apache: 2.0.52 Tomcat: 4.1.31 Mod JK: 1.2.6 The problem: Apache/mod_jk cannot resolve servlet URL mappings When Tomcat is running stand-alone, it can resolve servlet mappings without any problems; so that a page with this form definition: FORM name=login method=POST action=loginhandler correctly invokes the com.company.LoginHandler servlet (which suggests there's nothing syntactically wrong with the servlet and servlet-mapping entries in web.xml); When Tomcat stand-alone is turned off and Apache is turned on, that same page always throws a 404 error for site/loginhandler; these are the error messages in mod_jk.log: [Wed Jun 22 09:04:08 2005] [mod_jk.c (2313)]: mod_jk::jk_translate, check alias_dir: /usr/apache/tomcat/webapps [Wed Jun 22 09:04:08 2005] [mod_jk.c (2337)]: mod_jk::jk_translate, AutoAlias child_dir: loginhandler [Wed Jun 22 09:04:08 2005] [mod_jk.c (2363)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/apache/tomcat/webapps/aiwosc/loginhandler [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/aiwosc/loginhandler' [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (577)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match What terribly simple configuration error have I made here? These are the web.xml entries for this servlet: servlet servlet-nameloginhandler/servlet-name servlet-classcom.company.aiwosc.LoginHandler/servlet-class /servlet servlet-mapping servlet-nameloginhandler/servlet-name url-pattern/loginhandler/url-pattern /servlet-mapping This is the workers.properties file: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=server.org worker.ajp13.type=ajp13 This is the app section from mod_jk.conf: server.org:/aiwosc # Static files Alias /aiwosc /var/apache/tomcat/webapps/aiwosc Directory /var/apache/tomcat/webapps/aiwosc Options Indexes FollowSymLinks DirectoryIndex index.html /Directory # Deny direct access to WEB-INF and META-INF # Location /aiwosc/WEB-INF/* AllowOverride None deny from all /Location Location /aiwosc/META-INF/* AllowOverride None deny from all /Location JkMount /aiwosc/addtitleservlet ajp13 JkMount /aiwosc/submittitleservlet ajp13 JkMount /aiwosc/transfertitleservlet ajp13 JkMount /aiwosc/saveoscservlet ajp13 JkMount /aiwosc/reordercastservlet ajp13 JkMount /aiwosc/loginhandler ajp13 JkMount /aiwosc/editcategoryservlet ajp13 JkMount /aiwosc/edittitleservlet ajp13 JkMount /aiwosc/addaddendumservlet ajp13 JkMount /aiwosc/*.jsp ajp13 JkMount /aiwosc/addcategoryservlet ajp13 This is the Context entry for the app in server.xml: !-- Oscars OSC Context -- Context path=/aiwosc docBase=aiwosc debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=aiwosc_log. suffix=.txt timestamp=true/ Resource name=jdbc/oscars auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/oscars parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/value /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@gtsora2.gtsgraphics.com:1521:ACAD/value /parameter parameter nameusername/name valueIMPC_ADMIN/value /parameter parameter namepassword/name valuePIRANHA/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context And these are the mod_jk load/configuration entries from httpd.conf: IfModule !mod_jk.c
Re: Apache-Tomcat Servlet Mapping Issues
Hi, As you test, can you load a servlet through apache httpd? Such as http://www.xyz.com/testservlet You should make a simple servlet that just has the doGet method to test. -Steve O. System: Solaris SunOS 5.9 Apache: 2.0.52 Tomcat: 4.1.31 Mod JK: 1.2.6 The problem: Apache/mod_jk cannot resolve servlet URL mappings When Tomcat is running stand-alone, it can resolve servlet mappings without any problems; so that a page with this form definition: FORM name=login method=POST action=loginhandler correctly invokes the com.company.LoginHandler servlet (which suggests there's nothing syntactically wrong with the servlet and servlet-mapping entries in web.xml); When Tomcat stand-alone is turned off and Apache is turned on, that same page always throws a 404 error for site/loginhandler; these are the error messages in mod_jk.log: [Wed Jun 22 09:04:08 2005] [mod_jk.c (2313)]: mod_jk::jk_translate, check alias_dir: /usr/apache/tomcat/webapps [Wed Jun 22 09:04:08 2005] [mod_jk.c (2337)]: mod_jk::jk_translate, AutoAlias child_dir: loginhandler [Wed Jun 22 09:04:08 2005] [mod_jk.c (2363)]: mod_jk::jk_translate, AutoAlias OK for file: /usr/apache/tomcat/webapps/aiwosc/loginhandler [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (445)]: Into jk_uri_worker_map_t::map_uri_to_worker [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (459)]: Attempting to map URI '/aiwosc/loginhandler' [Wed Jun 22 09:04:08 2005] [jk_uri_worker_map.c (577)]: jk_uri_worker_map_t::map_uri_to_worker, done without a match What terribly simple configuration error have I made here? These are the web.xml entries for this servlet: servlet servlet-nameloginhandler/servlet-name servlet-classcom.company.aiwosc.LoginHandler/servlet-class /servlet servlet-mapping servlet-nameloginhandler/servlet-name url-pattern/loginhandler/url-pattern /servlet-mapping This is the workers.properties file: worker.list=ajp13 worker.ajp13.port=8009 worker.ajp13.host=server.org worker.ajp13.type=ajp13 This is the app section from mod_jk.conf: server.org:/aiwosc # Static files Alias /aiwosc /var/apache/tomcat/webapps/aiwosc Directory /var/apache/tomcat/webapps/aiwosc Options Indexes FollowSymLinks DirectoryIndex index.html /Directory # Deny direct access to WEB-INF and META-INF # Location /aiwosc/WEB-INF/* AllowOverride None deny from all /Location Location /aiwosc/META-INF/* AllowOverride None deny from all /Location JkMount /aiwosc/addtitleservlet ajp13 JkMount /aiwosc/submittitleservlet ajp13 JkMount /aiwosc/transfertitleservlet ajp13 JkMount /aiwosc/saveoscservlet ajp13 JkMount /aiwosc/reordercastservlet ajp13 JkMount /aiwosc/loginhandler ajp13 JkMount /aiwosc/editcategoryservlet ajp13 JkMount /aiwosc/edittitleservlet ajp13 JkMount /aiwosc/addaddendumservlet ajp13 JkMount /aiwosc/*.jsp ajp13 JkMount /aiwosc/addcategoryservlet ajp13 This is the Context entry for the app in server.xml: !-- Oscars OSC Context -- Context path=/aiwosc docBase=aiwosc debug=5 reloadable=true crossContext=true Logger className=org.apache.catalina.logger.FileLogger prefix=aiwosc_log. suffix=.txt timestamp=true/ Resource name=jdbc/oscars auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/oscars parameter namefactory/name valueorg.apache.commons.dbcp.BasicDataSourceFactory/va lue /parameter parameter namedriverClassName/name valueoracle.jdbc.driver.OracleDriver/value /parameter parameter nameurl/name valuejdbc:oracle:thin:@gtsora2.gtsgraphics.com:1521:ACA D/value /parameter parameter nameusername/name valueIMPC_ADMIN/value /parameter parameter namepassword/name valuePIRANHA/value /parameter parameter namemaxActive/name value20/value /parameter parameter namemaxIdle/name value10/value /parameter parameter namemaxWait/name value-1/value /parameter /ResourceParams /Context And these are the mod_jk load/configuration entries from httpd.conf: IfModule !mod_jk.c LoadModule jk_module modules/mod_jk.so /IfModule Include /usr/apache/tomcat/conf/auto/mod_jk.conf JkWorkersFile /usr/apache/tomcat/conf
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 forwarding 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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
RE: Servlet mapping problem.
Hi, message /loginResponse.do description The requested resource (/loginResponse.do) is not available. It seems the context_name part of your form element is blank, missing, or wrong, since the page is asking for /loginResponse.do and not /whatever/loginResponse.do. Accordingly, how do you generate this form element? I assume you don't have the webapp's name hard-coded. To answer your question in general, Tomcat's servlet mapping behavior is extremely well-tested, and has been for years. I'd be surprised if this issue was NOT caused by a configuration or coding mistake in your webapp. That said, Tomcat is not as lax in permitting developer conveniences as some other containers. Finally, a small note: please start a new thread for a new issue, don't reply to a different message and change the subject. It screws up the archives. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
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-listindex.jsp/welcome-file-list filter filter-nameauthentication filter/filter-name filter-classcom._XYZ.authenticateAdminFilter/filter-class /filter filter-mapping filter-nameauthentication filter/filter-name url-pattern/admin/*/url-pattern /filter-mapping servlet servlet-nameloginResponse/servlet-name servlet-classcom._XYZ.authenticateAdmin/servlet-class init-param param-nametestPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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 forwarding 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet
RE: Servlet mapping problem.
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-listindex.jsp/welcome-file-list filter filter-nameauthentication filter/filter-name filter-classcom._XYZ.authenticateAdminFilter/filter-class /filter filter-mapping filter-nameauthentication filter/filter-name url-pattern/admin/*/url-pattern /filter-mapping servlet servlet-nameloginResponse/servlet-name servlet-classcom._XYZ.authenticateAdmin/servlet-class init-param param-nametestPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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 forwarding 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
Re: Servlet mapping problem.
Hi, my form code: form action=/the_context/loginResponse.do method=post name: input type=text name=adminPassword input type=submit /form To naswer your questions: Q. Accordingly, how do you generate this form element? A. I'm not sure what you mean, it's just a hard-coded HTML form. Q. I assume you don't have the webapp's name hard-coded A. Hard-coded where? In the forms' action attribute? If so, is that a problem? Thanks, Stefan www.killersites.com - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 9:03 AM Subject: RE: Servlet mapping problem. Hi, message /loginResponse.do description The requested resource (/loginResponse.do) is not available. It seems the context_name part of your form element is blank, missing, or wrong, since the page is asking for /loginResponse.do and not /whatever/loginResponse.do. Accordingly, how do you generate this form element? I assume you don't have the webapp's name hard-coded. To answer your question in general, Tomcat's servlet mapping behavior is extremely well-tested, and has been for years. I'd be surprised if this issue was NOT caused by a configuration or coding mistake in your webapp. That said, Tomcat is not as lax in permitting developer conveniences as some other containers. Finally, a small note: please start a new thread for a new issue, don't reply to a different message and change the subject. It screws up the archives. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value/WEB-INF/cgi-bin//param-value /init-param load-on-startup5/load-on-startup /servlet -- renamed servlets-cgi.jar The script
RE: Servlet mapping problem.
Hi, form action=/the_context/loginResponse.do method=post name: input type=text name=adminPassword input type=submit /form I meant the server-side code, not the HTML output. Q. Accordingly, how do you generate this form element? A. I'm not sure what you mean, it's just a hard-coded HTML form. It shouldn't be. Try a relative URL instead. Q. I assume you don't have the webapp's name hard-coded A. Hard-coded where? In the forms' action attribute? If so, is that a problem? It's poor design that limits your portability and presents a possible problem if your server configuration doesn't match your hard-coded value. For example, if could be that Tomcat is deploying your webapp at a different path, then you would get a 404... Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name
Re: Servlet mapping problem.
The HTML form is actually in a static page, I'm not generating the form via a servlet. I've actually began this with a relative URL, I've just been trying different things to see if I could figure out how to get this to work. I agree with your comments regarding the portability, I've just been trying anything now to get this to work... With that being said and having shown you my web.xml et cetera, can you see what I am doing wrong? Thanks, Stefan www.killersites.com - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:12 AM Subject: RE: Servlet mapping problem. Hi, form action=/the_context/loginResponse.do method=post name: input type=text name=adminPassword input type=submit /form I meant the server-side code, not the HTML output. Q. Accordingly, how do you generate this form element? A. I'm not sure what you mean, it's just a hard-coded HTML form. It shouldn't be. Try a relative URL instead. Q. I assume you don't have the webapp's name hard-coded A. Hard-coded where? In the forms' action attribute? If so, is that a problem? It's poor design that limits your portability and presents a possible problem if your server configuration doesn't match your hard-coded value. For example, if could be that Tomcat is deploying your webapp at a different path, then you would get a 404... Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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
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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/servlet-name url-pattern/loginResponse.do/url-pattern /servlet-mapping
Re: Servlet mapping problem.
Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
RE: Servlet mapping problem.
Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... /snip I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. And we tend to be not too impressed with people who omit details from their emails and hard-code absolute context paths, but nonetheless good luck and have fun ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
Re: Servlet mapping problem.
Ha ha ha ha ha I wasn't meant as an insult, but the truth cannot be ignored ... You have to ask yourself a question when you take the exact same code and drop it into Resin and in 1 minute it works fine, whereas with Tomcat, after an hour or two of poking around, it still doesn't work ... Thanks for your help. Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:34 AM Subject: RE: Servlet mapping problem. Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... /snip I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. And we tend to be not too impressed with people who omit details from their emails and hard-code absolute context paths, but nonetheless good luck and have fun ;) Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
RE: Servlet mapping problem.
Hi, The problem is that you've messed up your configuration. You created context.xml and you created your static HTML page. One says path= and the other asks for path=/context_name. It's a beginner's mistake that's trivial to correct, and it's your mistake, not Tomcat's fault. You don't even need a context.xml file: you could have simply created a directory for your app under webapps, and put your files there, and voila: i.e. you didn't need to do ANY server configuration to get this running. But since you chose to have a context.xml file, it's up to you to learn how to use it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:54 AM To: Tomcat Users List Subject: Re: Servlet mapping problem. Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
Re: Servlet mapping problem.
Ben, I just dropped in your SimpleServlet war file and got this error: HTTP Status 404 - /SimpleServlet/test type Status report message /SimpleServlet/test description The requested resource (/SimpleServlet/test) is not available. Well at least we know it is something with the server config and not the web apps themselves ... where to go now ... Would it make a difference with this version of Tomcat if it's installed in the 'Program Files' directory - that is to say, could it be some physical path issue? Thanks, Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
Re: Servlet mapping problem.
Yoav, As I stated in a previous post - I actually included the context name in the context.xml file, I just omitted it in my email. Beyond that, I initially did not include a context.xml file - but it did not work, so I figured I'd give it a go. But if you noticed in my last post, I just dropped in Bens war file and it is not working either ... seems to be some container issue and not a web app issue ... Yes, you're right, I am just starting out (again) with Tomcat. First time I've looked at it in years ... Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:58 AM Subject: RE: Servlet mapping problem. Hi, The problem is that you've messed up your configuration. You created context.xml and you created your static HTML page. One says path= and the other asks for path=/context_name. It's a beginner's mistake that's trivial to correct, and it's your mistake, not Tomcat's fault. You don't even need a context.xml file: you could have simply created a directory for your app under webapps, and put your files there, and voila: i.e. you didn't need to do ANY server configuration to get this running. But since you chose to have a context.xml file, it's up to you to learn how to use it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:54 AM To: Tomcat Users List Subject: Re: Servlet mapping problem. Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/servlet-name url-pattern/loginResponse.do/url-pattern /servlet-mapping Does this shed any light on what is going on? Stefan www.killersites.com
[OT] Re: Servlet mapping problem.
I've added the [OT] because those examples are not a Tomcat issue. SimpleServlet (as the name implies) is the most basic example you can create. It has worked for everyone else who has tried it. Try again, with a fresh Tomcat install. Don't configure anything. On Mon, 2004-11-22 at 12:00, Stefan wrote: Ben, I just dropped in your SimpleServlet war file and got this error: HTTP Status 404 - /SimpleServlet/test type Status report message /SimpleServlet/test description The requested resource (/SimpleServlet/test) is not available. Well at least we know it is something with the server config and not the web apps themselves ... where to go now ... Would it make a difference with this version of Tomcat if it's installed in the 'Program Files' directory - that is to say, could it be some physical path issue? Thanks, Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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-nameloginResponse/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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Sunday, November 21, 2004 10:31 PM Subject: Re: Servlet mapping problem. Hi, I am actually using a form to post to the target servlet: 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
RE: Servlet mapping problem.
Hi, Do you get any errors in your log on startup? Are you running Tomcat as a Windows service, or from the command line? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:06 PM To: Tomcat Users List Subject: Re: Servlet mapping problem. Yoav, As I stated in a previous post - I actually included the context name in the context.xml file, I just omitted it in my email. Beyond that, I initially did not include a context.xml file - but it did not work, so I figured I'd give it a go. But if you noticed in my last post, I just dropped in Bens war file and it is not working either ... seems to be some container issue and not a web app issue ... Yes, you're right, I am just starting out (again) with Tomcat. First time I've looked at it in years ... Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:58 AM Subject: RE: Servlet mapping problem. Hi, The problem is that you've messed up your configuration. You created context.xml and you created your static HTML page. One says path= and the other asks for path=/context_name. It's a beginner's mistake that's trivial to correct, and it's your mistake, not Tomcat's fault. You don't even need a context.xml file: you could have simply created a directory for your app under webapps, and put your files there, and voila: i.e. you didn't need to do ANY server configuration to get this running. But since you chose to have a context.xml file, it's up to you to learn how to use it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:54 AM To: Tomcat Users List Subject: Re: Servlet mapping problem. Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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
[OT] Re: Servlet mapping problem.
Yoav and Ben, After a fresh install of Tomcat, everything seems to be working fine. Many thanks for your extra patience with my fumbling about! Best regards, Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:12 PM Subject: RE: Servlet mapping problem. Hi, Do you get any errors in your log on startup? Are you running Tomcat as a Windows service, or from the command line? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:06 PM To: Tomcat Users List Subject: Re: Servlet mapping problem. Yoav, As I stated in a previous post - I actually included the context name in the context.xml file, I just omitted it in my email. Beyond that, I initially did not include a context.xml file - but it did not work, so I figured I'd give it a go. But if you noticed in my last post, I just dropped in Bens war file and it is not working either ... seems to be some container issue and not a web app issue ... Yes, you're right, I am just starting out (again) with Tomcat. First time I've looked at it in years ... Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:58 AM Subject: RE: Servlet mapping problem. Hi, The problem is that you've messed up your configuration. You created context.xml and you created your static HTML page. One says path= and the other asks for path=/context_name. It's a beginner's mistake that's trivial to correct, and it's your mistake, not Tomcat's fault. You don't even need a context.xml file: you could have simply created a directory for your app under webapps, and put your files there, and voila: i.e. you didn't need to do ANY server configuration to get this running. But since you chose to have a context.xml file, it's up to you to learn how to use it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:54 AM To: Tomcat Users List Subject: Re: Servlet mapping problem. Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re: Servlet mapping problem. Why don't you just use a relative link?: 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
Re: [OT] Re: Servlet mapping problem.
Glad to see you're up and running. On Mon, 2004-11-22 at 13:20, Stefan wrote: Yoav and Ben, After a fresh install of Tomcat, everything seems to be working fine. Many thanks for your extra patience with my fumbling about! Best regards, Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:12 PM Subject: RE: Servlet mapping problem. Hi, Do you get any errors in your log on startup? Are you running Tomcat as a Windows service, or from the command line? Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 12:06 PM To: Tomcat Users List Subject: Re: Servlet mapping problem. Yoav, As I stated in a previous post - I actually included the context name in the context.xml file, I just omitted it in my email. Beyond that, I initially did not include a context.xml file - but it did not work, so I figured I'd give it a go. But if you noticed in my last post, I just dropped in Bens war file and it is not working either ... seems to be some container issue and not a web app issue ... Yes, you're right, I am just starting out (again) with Tomcat. First time I've looked at it in years ... Stefan - Original Message - From: Shapira, Yoav [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:58 AM Subject: RE: Servlet mapping problem. Hi, The problem is that you've messed up your configuration. You created context.xml and you created your static HTML page. One says path= and the other asks for path=/context_name. It's a beginner's mistake that's trivial to correct, and it's your mistake, not Tomcat's fault. You don't even need a context.xml file: you could have simply created a directory for your app under webapps, and put your files there, and voila: i.e. you didn't need to do ANY server configuration to get this running. But since you chose to have a context.xml file, it's up to you to learn how to use it. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Stefan [mailto:[EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:54 AM To: Tomcat Users List Subject: Re: Servlet mapping problem. Thanks Ben - I'll give it a go .. the client may insist still on Tomcat, anyway it bugs me that I can't get it to work! Thanks. Stefan www.killersites.com www.how-to-build-websites.com www.secretsites.com www.csstutorial.net www.websitereviews.org www.websitetemplates.name - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 11:41 AM Subject: Re: Servlet mapping problem. If you're interested, I've got some simple apps all WARed up on my site. http://simple.souther.us. Try dropping one of those wars in your webapps directory. If they work (which they will if you have an out of the box installation of Tomcat), you can compare them with your app to see what's different. Good-luck. On Mon, 2004-11-22 at 11:29, Stefan wrote: Hi, I actually put the context reference in the context tag ... just something I omitted in the email. But alas, it still does not work ... :( I'm actually going to see if I can get the client to use Resin (for some reason, everything works fine is Resin ... out of the box), frankly at this point I'm not too impressed the Tomcat. Thanks Ben. Stefan - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:40 AM Subject: Re: Servlet mapping problem. In your context tag, your specifying: path= but in your url you're using: http://127.0.0.1/the_context/loginResponse.do; ^^^ Either put: path=/the_context in your context tag or don't specify it in your url. loginResponse.do On Mon, 2004-11-22 at 10:31, Stefan wrote: Hi Ben, I've used a relative link - same problem ... Could this be a problem having to do with setting up the context? What I did to do this, was drop an xml file with my web apps name in the folder: conf\Catalina\localhost In the xml file (contexName.xml) I have this entry: 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 [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, November 22, 2004 10:19 AM Subject: Re
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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value/WEB-INF/cgi-bin//param-value /init-param load-on-startup5/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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem.
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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value/WEB-INF/cgi-bin//param-value /init-param load-on-startup5/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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Meet the all-new My Yahoo! - Try it today! http://my.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL
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 [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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/param-value /init-param init-param param-namecgiPathPrefix/param-name param-value/WEB-INF/cgi-bin//param-value /init-param load-on-startup5/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
Re: Servlet mapping problem.
Can you also post all your struts-config.xml action .. ? I was looking for something that may be forwarding 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/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]
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 forwarding 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-nameloginResponse/servlet-name servlet-classcom._ABC.authenticateAdmin/servlet-class init-param param-nameadminPassword/param-name param-valuexxx/param-value /init-param /servlet servlet-mapping servlet-nameloginResponse/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-namecgi/servlet-name servlet-classorg.apache.catalina.servlets.CGIServlet/servlet-class init-param param-namedebug/param-name param-value6/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
RE: Multiple Servlet Mapping Problem
Hi, It's possible and permitted. Their url-patterns must be distinct. In Tomcat's implementation, each servlet declaration in web.xml corresponds to one instance of the servlet class in the JVM. Yoav Shapira http://www.yoavshapira.com -Original Message- From: Dana Cordes [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 10, 2004 5:37 PM To: [EMAIL PROTECTED] Subject: Multiple Servlet Mapping Problem Is it possible to have two separate servlets, with separate configurations pointing to the same class? Here's my situation, I have a servlet class that has several init-parameters. I want to have a second instance of that same servlet running with different parameters. But it doesn't seem to be working properly. Here's an excerpt from my web.xml: servlet servlet-nameMasterControl/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand1/param-value /init-param /servlet servlet servlet-nameMasterControlURA/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand2/param-value /init-param /servlet servlet-mapping servlet-nameMasterControl/servlet-name url-pattern/aop/url-pattern /servlet-mapping servlet-mapping servlet-nameMasterControlURA/servlet-name url-pattern/ura/url-pattern /servlet-mapping What I see is both mapping running, but only displaying the config from the first servlet definition. Is there something special that I have to do to get this running correctly? Is it even possible? -Dana Cordes - 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]
Multiple Servlet Mapping Problem
Is it possible to have two separate servlets, with separate configurations pointing to the same class? Here's my situation, I have a servlet class that has several init-parameters. I want to have a second instance of that same servlet running with different parameters. But it doesn't seem to be working properly. Here's an excerpt from my web.xml: servlet servlet-nameMasterControl/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand1/param-value /init-param /servlet servlet servlet-nameMasterControlURA/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand2/param-value /init-param /servlet servlet-mapping servlet-nameMasterControl/servlet-name url-pattern/aop/url-pattern /servlet-mapping servlet-mapping servlet-nameMasterControlURA/servlet-name url-pattern/ura/url-pattern /servlet-mapping What I see is both mapping running, but only displaying the config from the first servlet definition. Is there something special that I have to do to get this running correctly? Is it even possible? -Dana Cordes - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple Servlet Mapping Problem
Interesting. I had a quick browse of the servlet spec and it doesn't seem to say either that you can or cannot do this. However these guys seems to reckon it works on TC: http://archives.java.sun.com/cgi-bin/wa?A2=ind0103L=servlet-interestF=S=; P=50479 If it is possible, your config looks fine to me. -Original Message- From: Dana Cordes [mailto:[EMAIL PROTECTED] Sent: Wednesday 10 November 2004 22:37 To: [EMAIL PROTECTED] Subject: Multiple Servlet Mapping Problem Is it possible to have two separate servlets, with separate configurations pointing to the same class? Here's my situation, I have a servlet class that has several init-parameters. I want to have a second instance of that same servlet running with different parameters. But it doesn't seem to be working properly. Here's an excerpt from my web.xml: servlet servlet-nameMasterControl/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand1/param-value /init-param /servlet servlet servlet-nameMasterControlURA/servlet-name servlet-classcom.foo.bar.core.MasterControl/servlet-class init-param param-nameCONTROL_PARAMETER_NAME/param-name param-valuecommand2/param-value /init-param /servlet servlet-mapping servlet-nameMasterControl/servlet-name url-pattern/aop/url-pattern /servlet-mapping servlet-mapping servlet-nameMasterControlURA/servlet-name url-pattern/ura/url-pattern /servlet-mapping What I see is both mapping running, but only displaying the config from the first servlet definition. Is there something special that I have to do to get this running correctly? Is it even possible? -Dana Cordes - 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]
Servlet mapping problem
Hi all, I am writing an application which have to serve content based on the hostname it is requested. Different hosts will be set to same ROOT directory. There wont be any content at the ROOT. Everything will be on subdirectories. I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. This is an example of what I need. Directory structure. Host name ROOT/sites/one.com - one.com ROOT/sites/two.comtwo.com ROOT/sites/three.com three.com A request to one.com should go to /sites/one.com . A request to two.com should go to /sites/two.com . How to make it. Thanks in advance Anto Paul -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem
Anto Paul wrote: Hi all, I am writing an application which have to serve content based on the hostname it is requested. Different hosts will be set to same ROOT directory. There wont be any content at the ROOT. Everything will be on subdirectories. I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. This is an example of what I need. Directory structure. Host name ROOT/sites/one.com - one.com ROOT/sites/two.comtwo.com ROOT/sites/three.com three.com A request to one.com should go to /sites/one.com . A request to two.com should go to /sites/two.com . How to make it. Thanks in advance Anto Paul Hello, Anto, I don't have enough information to tell what your problem is. Are you using ActionForwards to go to these areas? What servlet with a mapping as / are you talking about? Remember this is a Struts list. If you have everything mapped to your servlet in your web.xml, then, of course, everything is going to go to your servlet. I suspect this is what you have done. Why do you have a servlet with a mapping as / ? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem
Hi there, I posted this to Tomcat User List. I didnt posted this to Struts. Although the application is using Struts it is not specific to Struts. rgds Anto Paul On Wed, 29 Sep 2004 00:59:53 -0700, Michael McGrady [EMAIL PROTECTED] wrote: Anto Paul wrote: Hi all, I am writing an application which have to serve content based on the hostname it is requested. Different hosts will be set to same ROOT directory. There wont be any content at the ROOT. Everything will be on subdirectories. I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. This is an example of what I need. Directory structure. Host name ROOT/sites/one.com - one.com ROOT/sites/two.comtwo.com ROOT/sites/three.com three.com A request to one.com should go to /sites/one.com . A request to two.com should go to /sites/two.com . How to make it. Thanks in advance Anto Paul Hello, Anto, I don't have enough information to tell what your problem is. Are you using ActionForwards to go to these areas? What servlet with a mapping as / are you talking about? Remember this is a Struts list. If you have everything mapped to your servlet in your web.xml, then, of course, everything is going to go to your servlet. I suspect this is what you have done. Why do you have a servlet with a mapping as / ? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Servlet mapping problem
Hi I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. You cannot map a single url. Tomcat only maps prefixes. So, you cannot map / with tomcat. (Resin can, but this is another story.) Here is a workaround: Map /root as a servlet and define root as world welcome-file (see docs). Depending on the tomcat version in use, you need to create a empty file named root. Remember this is a Struts list. Nope. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Re: AW: Servlet mapping problem
I cant grasp what you said. I am using Tomcat 4.1.x. I searched in Google for world welcome-file and could'nt find anything on it. Are you talking about welcome-file-list ?. rgds Anto Paul On Wed, 29 Sep 2004 11:43:33 +0200, Steffen Heil [EMAIL PROTECTED] wrote: Hi I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. You cannot map a single url. Tomcat only maps prefixes. So, you cannot map / with tomcat. (Resin can, but this is another story.) Here is a workaround: Map /root as a servlet and define root as world welcome-file (see docs). Depending on the tomcat version in use, you need to create a empty file named root. Remember this is a Struts list. Nope. Regards, Steffen -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet mapping problem
Hi, You cannot map a single url. Tomcat only maps prefixes. So, you cannot map Really? Where did this nugget come from? ;) I nearly choked on my (otherwise fabulous) croissant. Your assertion above is wrong. Tomcat implements servlet mapping exactly as required by the Servlet Specification (SRV 11). That includes path, extension, and default mappings. That also includes specific handling of the / mapping (which is valid and is used in Tomcat all the time, usually without the user being aware of it). Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: AW: Servlet mapping problem
Hi I cant grasp what you said. I am using Tomcat 4.1.x. I searched in Google for world welcome-file and could'nt find anything on it. Are you talking about welcome-file-list ?. Yes. It's entry is welcome-file. welcome-file-list welcome-fileroot/welcome-file /welcome-file-list If someone accesses /, tomcat will search for /root and will find the empty file. Then it will start to process that file, but since /root is mapped, your servlet is called. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
AW: Servlet mapping problem
Hi You cannot map a single url. Tomcat only maps prefixes. Really? Where did this nugget come from? ;) I nearly choked on my (otherwise fabulous) croissant. Your assertion above is wrong. Tomcat implements servlet mapping exactly as required by the Servlet Specification (SRV 11). That includes path, extension, and default mappings. That also includes specific handling of the / mapping (which is valid and is used in Tomcat all the time, usually without the user being aware of it). Okay, I am sorry, my sentence may be wrong, I agree. However, I am sure about the fact, that you cannot map a single url such as /. (Yes, you can define a mapping of /, but that maps to EVERY request, NOT to the root url only.) Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
RE: Servlet mapping problem
Hi, However, I am sure about the fact, that you cannot map a single url such as /. (Yes, you can define a mapping of /, but that maps to EVERY request, NOT to the root url only.) No. You're mistaking the default configuration for something that's hard-coded. Out of the box, / is mapped to Tomcat's DefaultServlet, which handles static content. This is routine for other containers as well and is not a particular Tomcat trick. Per the servlet spec, / is the default mapping also, so anything that's not matched by other mappings will end up there. So, here's one way to change things: - Explicitly map the things you want handled by Tomcat's DefaultServlet to it, e.g. servlet-nameDefaultServlet/servlet-nameurl-pattern*.html/url-patt ern. Same for *.htm, *.gif, *.jpg, *.png, etc. - Map any servlet of your choice to URL pattern /. - Ensure that rest of your app has no unmapped pages, i.e. ones that'll propagate to /. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AW: Servlet mapping problem
Hi No. You're mistaking the default configuration for something that's hard-coded. Out of the box, / is mapped to Tomcat's DefaultServlet, which handles static content. This is routine for other containers as well and is not a particular Tomcat trick. No, I did understand this. However, I think the original poster wanted to archieve, what I had to do once: To KEEP the default servlet mapping for all my html, js and css files and additionally have a servlet that get's ONLY called for the domain root /. This works as I described, with the trick of using welcome file and (at least for some older versions) an empty file. There is direct no way to map /. In the sense of what I want to archieve, not in the sense of the specification, that / means default. Regards, Steffen smime.p7s Description: S/MIME cryptographic signature
Re: Servlet mapping problem
What if I use a filter ?. I will map it like this filter-mapping filter-nameMappingFilter/filter-name url-pattern//url-pattern /filter-mapping filter-mapping filter-nameMappingFilter/filter-name url-pattern/*/url-pattern /filter-mapping In filter I forward to the path substituted with the directory. With servlet I failed to achieve what I want. I am sceptical about using a forward in a filter. This filter is the only filter that exists in the application. Even if another filter is added it can be put as he last filter in web.xml. Please comment on this. rgds Anto Paul On Wed, 29 Sep 2004 09:04:32 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, However, I am sure about the fact, that you cannot map a single url such as /. (Yes, you can define a mapping of /, but that maps to EVERY request, NOT to the root url only.) No. You're mistaking the default configuration for something that's hard-coded. Out of the box, / is mapped to Tomcat's DefaultServlet, which handles static content. This is routine for other containers as well and is not a particular Tomcat trick. Per the servlet spec, / is the default mapping also, so anything that's not matched by other mappings will end up there. So, here's one way to change things: - Explicitly map the things you want handled by Tomcat's DefaultServlet to it, e.g. servlet-nameDefaultServlet/servlet-nameurl-pattern*.html/url-patt ern. Same for *.htm, *.gif, *.jpg, *.png, etc. - Map any servlet of your choice to URL pattern /. - Ensure that rest of your app has no unmapped pages, i.e. ones that'll propagate to /. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Servlet mapping problem
Hi, You can do forwards from a filter if you want, as well as sendRedirects. It's a valid use for them. Just be careful to only forward/redirect the appropriate requests, e.g. if something is requesting a gif or HTML you probably don't want to do anything, just pass it through. Yoav Shapira Millennium Research Informatics -Original Message- From: Anto Paul [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 29, 2004 10:06 AM To: Tomcat Users List Subject: Re: Servlet mapping problem What if I use a filter ?. I will map it like this filter-mapping filter-nameMappingFilter/filter-name url-pattern//url-pattern /filter-mapping filter-mapping filter-nameMappingFilter/filter-name url-pattern/*/url-pattern /filter-mapping In filter I forward to the path substituted with the directory. With servlet I failed to achieve what I want. I am sceptical about using a forward in a filter. This filter is the only filter that exists in the application. Even if another filter is added it can be put as he last filter in web.xml. Please comment on this. rgds Anto Paul On Wed, 29 Sep 2004 09:04:32 -0400, Shapira, Yoav [EMAIL PROTECTED] wrote: Hi, However, I am sure about the fact, that you cannot map a single url such as /. (Yes, you can define a mapping of /, but that maps to EVERY request, NOT to the root url only.) No. You're mistaking the default configuration for something that's hard-coded. Out of the box, / is mapped to Tomcat's DefaultServlet, which handles static content. This is routine for other containers as well and is not a particular Tomcat trick. Per the servlet spec, / is the default mapping also, so anything that's not matched by other mappings will end up there. So, here's one way to change things: - Explicitly map the things you want handled by Tomcat's DefaultServlet to it, e.g. servlet-nameDefaultServlet/servlet-nameurl-pattern*.html/url-patt ern. Same for *.htm, *.gif, *.jpg, *.png, etc. - Map any servlet of your choice to URL pattern /. - Ensure that rest of your app has no unmapped pages, i.e. ones that'll propagate to /. Yoav This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To strive,to seek,to find and not to yield - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet mapping problem
Anto Paul wrote: Hi there, I posted this to Tomcat User List. I didnt posted this to Struts. Although the application is using Struts it is not specific to Struts. rgds Anto Paul On Wed, 29 Sep 2004 00:59:53 -0700, Michael McGrady [EMAIL PROTECTED] wrote: Anto Paul wrote: Hi all, I am writing an application which have to serve content based on the hostname it is requested. Different hosts will be set to same ROOT directory. There wont be any content at the ROOT. Everything will be on subdirectories. I wrote a servlet with mapping as / . But when it is forwarded to subdirectory it is coming to same servlet and executing in a loop. This is an example of what I need. Directory structure. Host name ROOT/sites/one.com - one.com ROOT/sites/two.comtwo.com ROOT/sites/three.com three.com A request to one.com should go to /sites/one.com . A request to two.com should go to /sites/two.com . How to make it. Thanks in advance Anto Paul Hello, Anto, I don't have enough information to tell what your problem is. Are you using ActionForwards to go to these areas? What servlet with a mapping as / are you talking about? Remember this is a Struts list. If you have everything mapped to your servlet in your web.xml, then, of course, everything is going to go to your servlet. I suspect this is what you have done. Why do you have a servlet with a mapping as / ? Michael McGrady - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Oops, my bad. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet-mapping required??? Tomcat 5 upgrade problem...
Hi, I'm using Struts with Tomcat, and am upgrading to Tomcat 5. It appears that it won't recognize any of my servlets, though, which I could previously call though ...[webapp]/servlet/servletname. I managed to call them by adding a servlet-mapping to eliminate the /servlet/ bit, but this is an existing app and I don't want to change everything to that degree. Can't I still use /servlet/ ? What am I missing? cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet-mapping required??? Tomcat 5 upgrade problem...
Hi, See http://jakarta.apache.org/tomcat/faq/misc.html#invoker. You should have always had servlet-mappings. Yoav Shapira Millennium Research Informatics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 1:52 PM To: Tomcat Users List Subject: servlet-mapping required??? Tomcat 5 upgrade problem... Hi, I'm using Struts with Tomcat, and am upgrading to Tomcat 5. It appears that it won't recognize any of my servlets, though, which I could previously call though ...[webapp]/servlet/servletname. I managed to call them by adding a servlet-mapping to eliminate the /servlet/ bit, but this is an existing app and I don't want to change everything to that degree. Can't I still use /servlet/ ? What am I missing? cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet-mapping required??? Tomcat 5 upgrade problem...
You need to enable the invoker servlet in your web.xml. This is not recommended for production but it should work just as you expect. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 03 August 2004 18:52 To: Tomcat Users List Subject: servlet-mapping required??? Tomcat 5 upgrade problem... Hi, I'm using Struts with Tomcat, and am upgrading to Tomcat 5. It appears that it won't recognize any of my servlets, though, which I could previously call though ...[webapp]/servlet/servletname. I managed to call them by adding a servlet-mapping to eliminate the /servlet/ bit, but this is an existing app and I don't want to change everything to that degree. Can't I still use /servlet/ ? What am I missing? cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any opinions expressed in this E-mail may be those of the individual and not necessarily the company. This E-mail and any files transmitted with it are confidential and solely for the use of the intended recipient. If you are not the intended recipient or the person responsible for delivering to the intended recipient, be advised that you have received this E-mail in error and that any use or copying is strictly prohibited. If you have received this E-mail in error please notify the beCogent postmaster at [EMAIL PROTECTED] Unless expressly stated, opinions in this email are those of the individual sender and not beCogent Ltd. You must take full responsibility for virus checking this email and any attachments. Please note that the content of this email or any of its attachments may contain data that falls within the scope of the Data Protection Acts and that you must ensure that any handling or processing of such data by you is fully compliant with the terms and provisions of the Data Protection Act 1984 and 1998. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet-mapping required??? Tomcat 5 upgrade problem...
Sorry for the traffic - I solved it myself. Obviously, you have to uncomment both the invoker servlet, AND the invoker mapping. cheers, David - Forwarded by David Hay/Lex/Lexmark on 08/03/2004 01:56 PM - |-+ | | David Hay| | || | | 08/03/2004 01:51 | | | PM | | || |-+ | | | | To: Tomcat Users List [EMAIL PROTECTED] | | cc: | | Subject: servlet-mapping required??? Tomcat 5 upgrade problem...(Document link: David Hay) | | Hi, I'm using Struts with Tomcat, and am upgrading to Tomcat 5. It appears that it won't recognize any of my servlets, though, which I could previously call though ...[webapp]/servlet/servletname. I managed to call them by adding a servlet-mapping to eliminate the /servlet/ bit, but this is an existing app and I don't want to change everything to that degree. Can't I still use /servlet/ ? What am I missing? cheers, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
About servlet-mapping
Hi, I place member.jsp in my webapp root folder, which is TOMCAT_HOME -- webapp --myWebApp/ and part of web.xml : servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping part of struts-config.xml: action-mappings action path=/Index type=com.kiss.web.news.actions.Index unknown=false validate=true forward name=member path=/Member.jsp redirect=false contextRelative=false / /action /action-mappings I call http://localhost:8080/Index.do and member.jsp is shown but when I change the url-pattern*.do/url-pattern to url-pattern/*/url-pattern then I call http://localhost:8080/Index Index has been called with this error msg: Invalid path /Member.jsp was requested How can I fix it? I don't want to type some .do or .action sort of thing in my url, I type want the url like : http://localhost:8080/Index with no extension Any help? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About servlet-mapping
keep the original mapping, but also add it to your welcome file list On Sun, 11 Jul 2004 04:45:49 +0800, Koon Yue Lam [EMAIL PROTECTED] wrote: Hi, I place member.jsp in my webapp root folder, which is TOMCAT_HOME -- webapp --myWebApp/ and part of web.xml : servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping part of struts-config.xml: action-mappings action path=/Index type=com.kiss.web.news.actions.Index unknown=false validate=true forward name=member path=/Member.jsp redirect=false contextRelative=false / /action /action-mappings I call http://localhost:8080/Index.do and member.jsp is shown but when I change the url-pattern*.do/url-pattern to url-pattern/*/url-pattern then I call http://localhost:8080/Index Index has been called with this error msg: Invalid path /Member.jsp was requested How can I fix it? I don't want to type some .do or .action sort of thing in my url, I type want the url like : http://localhost:8080/Index with no extension Any help? Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin (1755) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: About servlet-mapping
Hi Jarl ! sorry, I still don't get what u mean I try to place welcome-file-list welcome-file/Member.jsp/welcome-file /welcome-file-list in web.xml and keep the mapping as : servlet-mapping servlet-nameaction/servlet-name url-pattern/*/url-pattern /servlet-mapping but I still got the Invalid path /Member.jsp was requested error message... can u please help me a little deeper? I want to use the URL like: http://localhost:8080/Index rather than: http://localhost:8080/Index.do any help will be appreciated Regards - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cannot get servlet mapping working under 3.3
You might try adding the JservConfig ... element to your server.xml, documented here: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#JservConfig You will likely need a current version of the mod_jserv connector. The Windows binary can be found here: http://archive.apache.org/dist/jakarta/tomcat-3/bin/win32/i386/ For a different OS, you will have to build it. The bulk of the information for mod_jserv may be found here: http://jakarta.apache.org/tomcat/tomcat-3.3-doc/tomcat-apache-howto.html It has been a long time since I did much with mod_jserv, and then, only on Windows. HTH. Cheers, Larry -Original Message- From: Christoph P. Kukulies [mailto:[EMAIL PROTECTED] Sent: Monday, April 05, 2004 11:19 AM To: Tomcat Users List Subject: Re: cannot get servlet mapping working under 3.3 On Mon, Apr 05, 2004 at 11:41:56AM +0200, Christoph P. Kukulies wrote: Investigating further I come to the conclusion that my problem may be related to the invoker servlet. Doesn't tomcat 3.3 have a central web.xml any longer? Sorry, I know that talking about tomcat 5.x is more interesting than talking about yesterdays. :-) Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de Could it be that I need mod_jserv.so from the tomcat native directory? How does one build that? Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot get servlet mapping working under 3.3
On Sun, Apr 04, 2004 at 10:04:12PM +0200, Schalk wrote: I would suggest you upgrade to Tomcat 5.0+ and mod_jk Yes, I could but then I have another Servlet API and other headaches with my classes possibly not working any longer or having deprecated APIs. Nobody here who can tell what the problem is with 3.3 and apache in my case? I'm very close to have them both running. Just a little piece seems to be missing. How can I verify the apache tomcat connector is working? Were there problems with aliasing/mapping? Can only believe that I'm missing something in server.xml or httpd.conf/jserv.conf. Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de :: Subject: cannot get servlet mapping working under 3.3 :: :: I'm reconvalescing from a disc crash where lots of my existing :: tomcat 3.1/apache 1.3.26 installation had crashed and I :: reinstalled tomcat 3.3 with apache-1.3.27 now such that :: the examples work when I connect to the server at port 8080. :: But this is tomcat. Trying to connect to apache via the jserv :: modules doesn't seem to work. :: :: logs/stderr.log looks ok. :: :: I have included apache/jserv/jserv.conf at the end of httpd.conf :: :: :: jserv.conf: :: :: ### :: :: :: ### :: :: # Note: this file should be appended or included into your httpd.conf :: :: # Tell Apache on win32 to load the Apache JServ communication module :: #LoadModule jserv_module modules/ApacheModuleJServ.dll :: :: # Tell Apache on Unix to load the Apache JServ communication module :: # For shared object builds only!!! :: LoadModule jserv_module /usr/local/libexec/apache/mod_jserv.so :: :: IfModule mod_jserv.c :: :: # Whether Apache must start Apache JServ or not (On=Manual Off=Autostart) :: # Syntax: ApJServManual [on/off] :: # Default: Off :: ApJServManual Off :: :: # Properties filename for Apache JServ in Automatic Mode. :: # In manual mode this directive is ignored :: # Syntax: ApJServProperties [filename] :: # Default: ./conf/jserv.properties :: ApJServProperties /usr/local/etc/apache/jserv/jserv.properties :: :: # Log file for this module operation relative to Apache root directory. :: # Set the name of the trace/log file. To avoid possible confusion about :: # the location of this file, an absolute pathname is recommended. :: # :: # This log file is different than the log file that is in the :: # jserv.properties file. This is the log file for the C portion of Apache :: # JServ. :: # :: # On Unix, this file must have write permissions by the owner of the JVM :: # process. In other words, if you are running Apache JServ in manual mode :: # and Apache is running as user nobody, then the file must have its :: # permissions set so that that user can write to it. :: # Syntax: ApJServLogFile [filename] :: # Default: ./logs/mod_jserv.log :: # Note: when set to DISABLED, the log will be redirected to Apache error log :: ApJServLogFile /var/log/mod_jserv.log :: :: # Log Level for this module :: # Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|emerg] :: # Default: info(unless compiled w/ JSERV_DEBUG, in which case it's debug) :: ApJServLogLevel debug :: :: # Protocol used by this host to connect to Apache JServ :: # (see documentation for more details on available protocols) :: # Syntax: ApJServDefaultProtocol [name] :: # Default: ajpv12 :: ApJServDefaultProtocol ajpv12 :: :: # Default host on which Apache JServ is running :: # Syntax: ApJServDefaultHost [hostname] :: # Default: localhost :: #ApJServDefaultHost java.apache.org :: :: # Default port that Apache JServ is listening to :: # Syntax: ApJServDefaultPort [number] :: # Default: protocol-dependant (for ajpv12 protocol this is 8007) :: ApJServDefaultPort 8007 :: :: # The amount of time to give to the JVM to start up as well :: # as the amount of time to wait to ping the JVM to see if it :: # is alive. Slow or heavily loaded machines might want to :: # increase this value. :: # Default: 10 seconds :: # ApJServVMTimeout 10 :: :: # Passes parameter and value to specified protocol. :: # Syntax: ApJServProtocolParameter [name] [parameter] [value] :: # Default: NONE :: # Note: Currently no protocols handle this. Introduced for future protocols. :: :: # Apache JServ secret key file relative to Apache root directory. :: # Syntax: ApJServSecretKey [filename] :: # Default: ./conf/jserv.secret.key :: # Warning: if authentication is DISABLED, everyone on this machine (not just :: # this module) may connect to your servlet engine and execute servlet :: # bypassing web server restrictions. See the documentation for more information :: #ApJServSecretKey /usr/local/etc/apache/jserv/jserv.secret.key :: ApJServSecretKey DISABLED :: :: # Mount point for Servlet zones
Re: cannot get servlet mapping working under 3.3
I found the following in tomcat.conf in the 3.3 distribution: ## Context mapping - you need to deploy # ( copy or ln -s ) the context into htdocs ## # ApJservMount /CONTEXT/servlet /root # Location /CONTEXT/WEB-INF/ # AllowOverride None # deny from all # /Location What would that mean? Do I have to ln -s /usr/local/jakarta-tomcat3.3/webapps/servlets /usr/local/www/data (or whatever the document root is)? I found a /usr/local/www/servlets in the directory of my crshaed disk but cannot determin any longer whether this is a soft link, a directory or whatever or if this is only a relict of some experimenting. -- Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot get servlet mapping working under 3.3
Investigating further I come to the conclusion that my problem may be related to the invoker servlet. Doesn't tomcat 3.3 have a central web.xml any longer? Sorry, I know that talking about tomcat 5.x is more interesting than talking about yesterdays. :-) Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de On Mon, Apr 05, 2004 at 10:28:28AM +0200, Christoph P. Kukulies wrote: I found the following in tomcat.conf in the 3.3 distribution: ## Context mapping - you need to deploy # ( copy or ln -s ) the context into htdocs ## # ApJservMount /CONTEXT/servlet /root # Location /CONTEXT/WEB-INF/ # AllowOverride None # deny from all # /Location What would that mean? Do I have to ln -s /usr/local/jakarta-tomcat3.3/webapps/servlets /usr/local/www/data (or whatever the document root is)? I found a /usr/local/www/servlets in the directory of my crshaed disk but cannot determin any longer whether this is a soft link, a directory or whatever or if this is only a relict of some experimenting. -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cannot get servlet mapping working under 3.3
On Mon, Apr 05, 2004 at 11:41:56AM +0200, Christoph P. Kukulies wrote: Investigating further I come to the conclusion that my problem may be related to the invoker servlet. Doesn't tomcat 3.3 have a central web.xml any longer? Sorry, I know that talking about tomcat 5.x is more interesting than talking about yesterdays. :-) Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de Could it be that I need mod_jserv.so from the tomcat native directory? How does one build that? Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cannot get servlet mapping working under 3.3
I'm reconvalescing from a disc crash where lots of my existing tomcat 3.1/apache 1.3.26 installation had crashed and I reinstalled tomcat 3.3 with apache-1.3.27 now such that the examples work when I connect to the server at port 8080. But this is tomcat. Trying to connect to apache via the jserv modules doesn't seem to work. logs/stderr.log looks ok. I have included apache/jserv/jserv.conf at the end of httpd.conf jserv.conf: ### ### # Note: this file should be appended or included into your httpd.conf # Tell Apache on win32 to load the Apache JServ communication module #LoadModule jserv_module modules/ApacheModuleJServ.dll # Tell Apache on Unix to load the Apache JServ communication module # For shared object builds only!!! LoadModule jserv_module /usr/local/libexec/apache/mod_jserv.so IfModule mod_jserv.c # Whether Apache must start Apache JServ or not (On=Manual Off=Autostart) # Syntax: ApJServManual [on/off] # Default: Off ApJServManual Off # Properties filename for Apache JServ in Automatic Mode. # In manual mode this directive is ignored # Syntax: ApJServProperties [filename] # Default: ./conf/jserv.properties ApJServProperties /usr/local/etc/apache/jserv/jserv.properties # Log file for this module operation relative to Apache root directory. # Set the name of the trace/log file. To avoid possible confusion about # the location of this file, an absolute pathname is recommended. # # This log file is different than the log file that is in the # jserv.properties file. This is the log file for the C portion of Apache # JServ. # # On Unix, this file must have write permissions by the owner of the JVM # process. In other words, if you are running Apache JServ in manual mode # and Apache is running as user nobody, then the file must have its # permissions set so that that user can write to it. # Syntax: ApJServLogFile [filename] # Default: ./logs/mod_jserv.log # Note: when set to DISABLED, the log will be redirected to Apache error log ApJServLogFile /var/log/mod_jserv.log # Log Level for this module # Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|emerg] # Default: info(unless compiled w/ JSERV_DEBUG, in which case it's debug) ApJServLogLevel debug # Protocol used by this host to connect to Apache JServ # (see documentation for more details on available protocols) # Syntax: ApJServDefaultProtocol [name] # Default: ajpv12 ApJServDefaultProtocol ajpv12 # Default host on which Apache JServ is running # Syntax: ApJServDefaultHost [hostname] # Default: localhost #ApJServDefaultHost java.apache.org # Default port that Apache JServ is listening to # Syntax: ApJServDefaultPort [number] # Default: protocol-dependant (for ajpv12 protocol this is 8007) ApJServDefaultPort 8007 # The amount of time to give to the JVM to start up as well # as the amount of time to wait to ping the JVM to see if it # is alive. Slow or heavily loaded machines might want to # increase this value. # Default: 10 seconds # ApJServVMTimeout 10 # Passes parameter and value to specified protocol. # Syntax: ApJServProtocolParameter [name] [parameter] [value] # Default: NONE # Note: Currently no protocols handle this. Introduced for future protocols. # Apache JServ secret key file relative to Apache root directory. # Syntax: ApJServSecretKey [filename] # Default: ./conf/jserv.secret.key # Warning: if authentication is DISABLED, everyone on this machine (not just # this module) may connect to your servlet engine and execute servlet # bypassing web server restrictions. See the documentation for more information #ApJServSecretKey /usr/local/etc/apache/jserv/jserv.secret.key ApJServSecretKey DISABLED # Mount point for Servlet zones # (see documentation for more information on servlet zones) # Syntax: ApJServMount [name] [jserv-url] # Default: NONE # Note: [name] is the name of the Apache URI path to mount jserv-url on # [jserv-url] is something like protocol://host:port/zone # If protocol, host or port are not specified, the values from # ApJServDefaultProtocol, ApJServDefaultHost or ApJServDefaultPort # will be used. # If zone is not specified, the zone name will be the first subdirectory of # the called servlet. # Example: ApJServMount /servlets /myServlets # if user requests http://host/servlets/TestServlet; # the servlet TestServlet in zone myServlets on default host # thru default protocol on defaul port will be requested # Example: ApJServMount /servlets ajpv12://localhost:8007 # if user requests http://host/servlets/myServlets/TestServlet; # the servlet TestServlet in zone myServlets will be requested # Example: ApJServMount /servlets ajpv12://jserv.mydomain.com:15643/myServlets # if user requests http://host/servlets/TestServlet; the servlet # TestServlet in zone myServlets on host jserv.mydomain.com using # ajpv12
RE: cannot get servlet mapping working under 3.3
I would suggest you upgrade to Tomcat 5.0+ and mod_jk Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: C. Kukulies [mailto:[EMAIL PROTECTED] :: Sent: Sunday, April 04, 2004 9:55 PM :: To: [EMAIL PROTECTED] :: Subject: cannot get servlet mapping working under 3.3 :: :: I'm reconvalescing from a disc crash where lots of my existing :: tomcat 3.1/apache 1.3.26 installation had crashed and I :: reinstalled tomcat 3.3 with apache-1.3.27 now such that :: the examples work when I connect to the server at port 8080. :: But this is tomcat. Trying to connect to apache via the jserv :: modules doesn't seem to work. :: :: logs/stderr.log looks ok. :: :: I have included apache/jserv/jserv.conf at the end of httpd.conf :: :: :: jserv.conf: :: :: ### :: :: :: ### :: :: # Note: this file should be appended or included into your httpd.conf :: :: # Tell Apache on win32 to load the Apache JServ communication module :: #LoadModule jserv_module modules/ApacheModuleJServ.dll :: :: # Tell Apache on Unix to load the Apache JServ communication module :: # For shared object builds only!!! :: LoadModule jserv_module /usr/local/libexec/apache/mod_jserv.so :: :: IfModule mod_jserv.c :: :: # Whether Apache must start Apache JServ or not (On=Manual Off=Autostart) :: # Syntax: ApJServManual [on/off] :: # Default: Off :: ApJServManual Off :: :: # Properties filename for Apache JServ in Automatic Mode. :: # In manual mode this directive is ignored :: # Syntax: ApJServProperties [filename] :: # Default: ./conf/jserv.properties :: ApJServProperties /usr/local/etc/apache/jserv/jserv.properties :: :: # Log file for this module operation relative to Apache root directory. :: # Set the name of the trace/log file. To avoid possible confusion about :: # the location of this file, an absolute pathname is recommended. :: # :: # This log file is different than the log file that is in the :: # jserv.properties file. This is the log file for the C portion of Apache :: # JServ. :: # :: # On Unix, this file must have write permissions by the owner of the JVM :: # process. In other words, if you are running Apache JServ in manual mode :: # and Apache is running as user nobody, then the file must have its :: # permissions set so that that user can write to it. :: # Syntax: ApJServLogFile [filename] :: # Default: ./logs/mod_jserv.log :: # Note: when set to DISABLED, the log will be redirected to Apache error log :: ApJServLogFile /var/log/mod_jserv.log :: :: # Log Level for this module :: # Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|emerg] :: # Default: info(unless compiled w/ JSERV_DEBUG, in which case it's debug) :: ApJServLogLevel debug :: :: # Protocol used by this host to connect to Apache JServ :: # (see documentation for more details on available protocols) :: # Syntax: ApJServDefaultProtocol [name] :: # Default: ajpv12 :: ApJServDefaultProtocol ajpv12 :: :: # Default host on which Apache JServ is running :: # Syntax: ApJServDefaultHost [hostname] :: # Default: localhost :: #ApJServDefaultHost java.apache.org :: :: # Default port that Apache JServ is listening to :: # Syntax: ApJServDefaultPort [number] :: # Default: protocol-dependant (for ajpv12 protocol this is 8007) :: ApJServDefaultPort 8007 :: :: # The amount of time to give to the JVM to start up as well :: # as the amount of time to wait to ping the JVM to see if it :: # is alive. Slow or heavily loaded machines might want to :: # increase this value. :: # Default: 10 seconds :: # ApJServVMTimeout 10 :: :: # Passes parameter and value to specified protocol. :: # Syntax: ApJServProtocolParameter [name] [parameter] [value] :: # Default: NONE :: # Note: Currently no protocols handle this. Introduced for future protocols. :: :: # Apache JServ secret key file relative to Apache root directory. :: # Syntax: ApJServSecretKey [filename] :: # Default: ./conf/jserv.secret.key :: # Warning: if authentication is DISABLED, everyone on this machine (not just :: # this module) may connect to your servlet engine and execute servlet :: # bypassing web server restrictions. See the documentation for more information :: #ApJServSecretKey /usr/local/etc/apache/jserv/jserv.secret.key :: ApJServSecretKey DISABLED :: :: # Mount point for Servlet zones :: # (see documentation
RE: cannot get servlet mapping working under 3.3
As far as I know Jserv has been deprecated or is no longer in development and has migrated over to mod_jk, open to correction though. Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Development.Multimedia.Branding emotionalize.conceptualize.visualize.realize Tel: +27125468436 Fax: +27125468436 email:[EMAIL PROTECTED] web: www.volume4.com This message contains information that is considered to be sensitive or confidential and may not be forwarded or disclosed to any other party without the permission of the sender. If you received this message in error, please notify me immediately so that I can correct and delete the original email. Thank you. :: -Original Message- :: From: Schalk [mailto:[EMAIL PROTECTED] :: Sent: Sunday, April 04, 2004 10:04 PM :: To: 'Tomcat Users List' :: Subject: RE: cannot get servlet mapping working under 3.3 :: :: I would suggest you upgrade to Tomcat 5.0+ and mod_jk :: :: Kind Regards :: Schalk Neethling :: Web Developer.Designer.Programmer.President :: Volume4.Development.Multimedia.Branding :: emotionalize.conceptualize.visualize.realize :: Tel: +27125468436 :: Fax: +27125468436 :: email:[EMAIL PROTECTED] :: web: www.volume4.com :: :: This message contains information that is considered to be sensitive or :: confidential and may not be forwarded or disclosed to any other party :: without the permission of the sender. If you received this message in error, :: please notify me immediately so that I can correct and delete the original :: email. Thank you. :: :: :: -Original Message- :: :: From: C. Kukulies [mailto:[EMAIL PROTECTED] :: :: Sent: Sunday, April 04, 2004 9:55 PM :: :: To: [EMAIL PROTECTED] :: :: Subject: cannot get servlet mapping working under 3.3 :: :: :: :: I'm reconvalescing from a disc crash where lots of my existing :: :: tomcat 3.1/apache 1.3.26 installation had crashed and I :: :: reinstalled tomcat 3.3 with apache-1.3.27 now such that :: :: the examples work when I connect to the server at port 8080. :: :: But this is tomcat. Trying to connect to apache via the jserv :: :: modules doesn't seem to work. :: :: :: :: logs/stderr.log looks ok. :: :: :: :: I have included apache/jserv/jserv.conf at the end of httpd.conf :: :: :: :: :: :: jserv.conf: :: :: :: :: :: ### :: :: :: :: :: :: :: ### :: :: :: :: # Note: this file should be appended or included into your httpd.conf :: :: :: :: # Tell Apache on win32 to load the Apache JServ communication module :: :: #LoadModule jserv_module modules/ApacheModuleJServ.dll :: :: :: :: # Tell Apache on Unix to load the Apache JServ communication module :: :: # For shared object builds only!!! :: :: LoadModule jserv_module /usr/local/libexec/apache/mod_jserv.so :: :: :: :: IfModule mod_jserv.c :: :: :: :: # Whether Apache must start Apache JServ or not (On=Manual Off=Autostart) :: :: # Syntax: ApJServManual [on/off] :: :: # Default: Off :: :: ApJServManual Off :: :: :: :: # Properties filename for Apache JServ in Automatic Mode. :: :: # In manual mode this directive is ignored :: :: # Syntax: ApJServProperties [filename] :: :: # Default: ./conf/jserv.properties :: :: ApJServProperties /usr/local/etc/apache/jserv/jserv.properties :: :: :: :: # Log file for this module operation relative to Apache root directory. :: :: # Set the name of the trace/log file. To avoid possible confusion about :: :: # the location of this file, an absolute pathname is recommended. :: :: # :: :: # This log file is different than the log file that is in the :: :: # jserv.properties file. This is the log file for the C portion of Apache :: :: # JServ. :: :: # :: :: # On Unix, this file must have write permissions by the owner of the JVM :: :: # process. In other words, if you are running Apache JServ in manual mode :: :: # and Apache is running as user nobody, then the file must have its :: :: # permissions set so that that user can write to it. :: :: # Syntax: ApJServLogFile [filename] :: :: # Default: ./logs/mod_jserv.log :: :: # Note: when set to DISABLED, the log will be redirected to Apache :: error log :: :: ApJServLogFile /var/log/mod_jserv.log :: :: :: :: # Log Level for this module :: :: # Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|emerg] :: :: # Default: info(unless compiled w/ JSERV_DEBUG, in which case it's :: debug) :: :: ApJServLogLevel debug :: :: :: :: # Protocol used by this host to connect to Apache JServ :: :: # (see documentation for more details on available protocols) :: :: # Syntax: ApJServDefaultProtocol [name] :: :: # Default: ajpv12 :: :: ApJServDefaultProtocol ajpv12 :: :: :: :: # Default host on which Apache JServ is running :: :: # Syntax: ApJServDefaultHost [hostname] :: :: # Default: localhost :: :: #ApJServDefaultHost java.apache.org :: :: :: :: # Default port that Apache JServ
Re: Servlet-Mapping Question, recursive capable?
The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
I'm just predicting the future, and I think eventually the ** convention will be adopted in many systems and specs. I'm kinda going off topic, so sorry. dangby Tim Funk wrote: The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
another servlet-mapping question,.............
Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping Anybody can help me ?? Thanx in advance !! Andrew - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another servlet-mapping question,.............
Andres Ledesma wrote: Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet I don't know how it works in your local tomcat installation, but I think the servelt../servlet pair should the servlet-mapping../servlet-mapping pair. Best Bao .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: another servlet-mapping question,.............
Does the tomcat runs for sample programs or admin on hosting server. -Original Message- From: BAO RuiXian [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 10:22 AM To: Tomcat Users List Subject: Re: another servlet-mapping question,. Andres Ledesma wrote: Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet I don't know how it works in your local tomcat installation, but I think the servelt../servlet pair should the servlet-mapping../servlet-mapping pair. Best Bao .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another servlet-mapping question,.............
Andrew, First what strikes me is that you say you are getting this error. Usually with mapping issues, you get a resource not found. Can you browse anything else on the hosting server? Try putting just a static page up and see if you can get to it. With mapping, a gotcha trick is the invoker. Do you have the invoker uncommented in your main web.xml or your app's web.xml? If you do in the main web.xml, the app will work on your machine and not on the hosing server. Are you trying to access the servlet from the URL? One other catch, are you referring to any of your servlets from jsp or html pages? If so, are you using the form of ./validate_user. With the mapping that you have, you need all your references to be in this form or the app will fail when on the hosting server. One last thing you can do to ensure it is a mapping issue, AS A TEST you can enable the invoker in your web.xml and then deploy to the server host. If it then runs, then your problem is in the mappings or references to the servlets as noted above. Doug www.parsonstechnical.com - Original Message - From: Andres Ledesma [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 9:41 AM Subject: another servlet-mapping question,. Hi everybody, I got several servlets mapped on the web.xml file that works pretty fine on my local tomcat installation, but when uploaded to the hosting server, I get a 400 Server Statuts Error, it complains the path to the server does not exist !!! My web.xml for the servlets is like this code ... servlet servlet-namevalidate_user/servlet-name servlet-classcom.bs.crm.validateUser/servlet-class /servlet .. servlet-mapping servlet-namevalidate_user/servlet-name url-pattern/validate_user/url-pattern /servlet-mapping Anybody can help me ?? Thanx in advance !! Andrew - 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]
servlet mapping problem
Hi. I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: 1) a classes directory containing HelloWorldExample.class 2) a web.xml file containing: ?xml version=1.0 encoding=ISO-8859-1? !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 display-nameServlet Example/display-name description Servlet Example /description servlet servlet-nameHelloWorldExample/servlet-name servlet-classHelloWorldExample/servlet-class /servlet servlet-mapping servlet-nameHelloWorldExample/servlet-name url-pattern/servlet/HelloWorldExample/url-pattern /servlet-mapping /web-app -- If I try to go to: http://localhost:8080/mywebapps/servlet/HelloWorldExample I get that the requested resource is not available. Please help. Thanks, Jason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Howdy, I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: Make sure you understand that one context = one webapp. If you want the test webapp to available, make test.xml more like Context path=/test docBase=/cs/home/jas/webapps/test / And then go to http://yourhost:yourport/test to access your webapp. If you have multiple webapps under /cs/home/jas/webapps and want tomcat to recognize them all, define /cs/home/jas/webapps as the appBase directory for a Host. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet mapping problem
Jason Keltz wrote: Hi. I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context block should be in conf/server.xml file. Best Bao Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: 1) a classes directory containing HelloWorldExample.class 2) a web.xml file containing: ?xml version=1.0 encoding=ISO-8859-1? !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 display-nameServlet Example/display-name description Servlet Example /description servlet servlet-nameHelloWorldExample/servlet-name servlet-classHelloWorldExample/servlet-class /servlet servlet-mapping servlet-nameHelloWorldExample/servlet-name url-pattern/servlet/HelloWorldExample/url-pattern /servlet-mapping /web-app -- If I try to go to: http://localhost:8080/mywebapps/servlet/HelloWorldExample I get that the requested resource is not available. Please help. Thanks, Jason. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Howdy, Context block should be in conf/server.xml file. It doesn't have to be, and with tomcat 5 that's actually discouraged. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Thanks, Yoav. Using localhost:8080/test works if the docBase in the context is defined to include test. However, as you suggested, I'm trying to create a directory with multiple webapps, and I want to have multiple directories like this. For example: /cs/home/jas/webapps1/app1 /cs/home/jas/webapps1/app2 /cs/home/jas/webapps2/app3 /cs/home/jas/webapps3/app4 /cs/home/jas/webapps3/app5 I would prefer not to have to define each context/webapp individually, and I would like new webapps to automatically be deployed if placed in any of these repositories. You say that I can define appBase for the host. Right now, in server.xml, I see: Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false If I want multiple appBase directories for this host, can I define multiple host lines, changing the appBase directive for each one? Would this mean that I now do not have to add any context lines for the applications to work? Thanks so much for your help ... Jason. On Wed, 25 Feb 2004, Shapira, Yoav wrote: Howdy, I am very troubled over a servlet mapping problem, and I am hoping that someone can make a suggestion. I have added a context in conf/Catalina/localhost/test.xml as follows: Context path=/mywebapps docBase=/cs/home/jas/webapps reloadable=true autoDeploy=true/Context In /cs/home/jas/webapps/test, I have a directory test with a WEB-INF directory containing: Make sure you understand that one context = one webapp. If you want the test webapp to available, make test.xml more like Context path=/test docBase=/cs/home/jas/webapps/test / And then go to http://yourhost:yourport/test to access your webapp. If you have multiple webapps under /cs/home/jas/webapps and want tomcat to recognize them all, define /cs/home/jas/webapps as the appBase directory for a Host. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet mapping problem
Howdy, Host name=localhost debug=0 appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false If I want multiple appBase directories for this host, can I define multiple host lines, changing the appBase directive for each one? Each host has one appBase directory. You can either change localhost or define another Host (you can have as many as you want). The appBase is either absolute (/cs/...) or relative to $CATALINA_HOME. Would this mean that I now do not have to add any context lines for the applications to work? Yes, by default, thanks to the Automatic Application Deployment. Read these: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/host.html#Automat ic%20Application%20Deployment Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
I hope they hurry up and do it... it's not that big of a change and it would make life much easier.. for that matter it really annoys me how when your extension mapping, say *.do for struts, the servlet strips what you extension mapped off when it sends it to the servlet. IE if you matched /actions/blah.do with a *.do mapping, struts only gets /actions/blah to match by.. -David - Original Message - From: Daniel Gibby [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Wednesday, February 25, 2004 6:54 AM Subject: Re: Servlet-Mapping Question, recursive capable? I'm just predicting the future, and I think eventually the ** convention will be adopted in many systems and specs. I'm kinda going off topic, so sorry. dangby Tim Funk wrote: The mapping rules are dictated by the servlet spec. Its not tomcat specific. -Tim Daniel Gibby wrote: Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Servlet-Mapping Question, recursive capable?
Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Servlet-Mapping Question, recursive capable?
Too bad though. I really like ant's recursive matching capabilities. I think that eventually a 'rebash' shell will be written that supports ** as recursive so that grep catalina **/docs/*.java would look for only java files in a subdirectory somewhere named docs with the text catalina in it. How nice would that be! Then apache and tomcat will decide on supporting this as well... Daniel Gibby Tim Funk wrote: No. You can prefix match or file extension match, but not both at the same time. -Tim David Erickson wrote: Hi I would like to do something like: servlet-mapping servlet-nameaction/servlet-name url-pattern/docs/**.pdf/url-pattern /servlet-mapping So that anything in the /docs/ folder AND ANY of its subfolders with the .pdf extension gets sent to my action servlet. Is that possible with tomcat 4.1.24? If not does anybody know the class that matches those things so I can alter it? Thanks! -David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Default servlet mapping not working in Tomcat 5.0.16?
I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Default servlet mapping not working in Tomcat 5.0.16?
Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default servlet mapping not working in Tomcat 5.0.16?
In version 5x you could also set a servlet to be your welcome file. On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote: Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default servlet mapping not working in Tomcat 5.0.16?
Hmmm, I just tried it by adding the following to my web.xml file but it's still just printing out the directory listing. welcome-file-list welcome-file/servlet/myservlet/welcome-file /welcome-file-list I have it working with a index.jsp with a redirect, so, I guess I'll just stick with that... Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:31 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? In version 5x you could also set a servlet to be your welcome file. On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote: Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default servlet mapping not working in Tomcat 5.0.16?
The welcome file list actually has to point to a servlet mapping. Here is mine. It works. 2296 2297 servlet-mapping 2298 servlet-nameHrpServlet/servlet-name 2299 url-pattern/HRP/url-pattern 2300 /servlet-mapping 2301 2302 2303 welcome-file-list id=WelcomeFileList_1 2304 welcome-fileHRP/welcome-file 2305/welcome-file-list 2306 /web-app On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote: Hmmm, I just tried it by adding the following to my web.xml file but it's still just printing out the directory listing. welcome-file-list welcome-file/servlet/myservlet/welcome-file /welcome-file-list I have it working with a index.jsp with a redirect, so, I guess I'll just stick with that... Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:31 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? In version 5x you could also set a servlet to be your welcome file. On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote: Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - 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] -- Ben Souther F.W. Davison Company, Inc. - 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Default servlet mapping not working in Tomcat 5.0.16?
OK, yeah, I just noticed that when I removed the leading /, it worked. Is this documented somewhere? I was going by what it says in the Servlet 2.4 spec, and I didn't see that mentioned in there. Since I need to protect the resource using a security-constraint, so, I think I'm better off just using a redirect. Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 3:01 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? The welcome file list actually has to point to a servlet mapping. Here is mine. It works. 2296 2297 servlet-mapping 2298 servlet-nameHrpServlet/servlet-name 2299 url-pattern/HRP/url-pattern 2300 /servlet-mapping 2301 2302 2303 welcome-file-list id=WelcomeFileList_1 2304 welcome-fileHRP/welcome-file 2305/welcome-file-list 2306 /web-app On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote: Hmmm, I just tried it by adding the following to my web.xml file but it's still just printing out the directory listing. welcome-file-list welcome-file/servlet/myservlet/welcome-file /welcome-file-list I have it working with a index.jsp with a redirect, so, I guess I'll just stick with that... Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:31 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? In version 5x you could also set a servlet to be your welcome file. On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote: Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - 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] -- Ben Souther F.W. Davison Company, Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail
Re: Default servlet mapping not working in Tomcat 5.0.16?
I haven't seen any documentation for this yet (but I haven't read much lately). Someone mentioned on this list a while back. Good-Luck -Ben On Friday 12 December 2003 04:02 pm, Jonathan Eric Miller wrote: OK, yeah, I just noticed that when I removed the leading /, it worked. Is this documented somewhere? I was going by what it says in the Servlet 2.4 spec, and I didn't see that mentioned in there. Since I need to protect the resource using a security-constraint, so, I think I'm better off just using a redirect. Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 3:01 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? The welcome file list actually has to point to a servlet mapping. Here is mine. It works. 2296 2297 servlet-mapping 2298 servlet-nameHrpServlet/servlet-name 2299 url-pattern/HRP/url-pattern 2300 /servlet-mapping 2301 2302 2303 welcome-file-list id=WelcomeFileList_1 2304 welcome-fileHRP/welcome-file 2305/welcome-file-list 2306 /web-app On Friday 12 December 2003 03:35 pm, Jonathan Eric Miller wrote: Hmmm, I just tried it by adding the following to my web.xml file but it's still just printing out the directory listing. welcome-file-list welcome-file/servlet/myservlet/welcome-file /welcome-file-list I have it working with a index.jsp with a redirect, so, I guess I'll just stick with that... Thanks, Jon - Original Message - From: Ben Souther [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:31 PM Subject: Re: Default servlet mapping not working in Tomcat 5.0.16? In version 5x you could also set a servlet to be your welcome file. On Friday 12 December 2003 01:45 pm, Shapira, Yoav wrote: Howdy, The / mapping is taken by default servlet in the default tomcat configuration. If you map a servlet to /, you have to: 1. Remove the default servlet mapping from conf/web.xml. 2. Make sure you handle static content (this is what the default servlet handles, among other duties). As for directory listings, read the FAQ. Yoav Shapira Millennium ChemInformatics -Original Message- From: Jonathan Eric Miller [mailto:[EMAIL PROTECTED] Sent: Friday, December 12, 2003 1:23 PM To: Tomcat User List Subject: Default servlet mapping not working in Tomcat 5.0.16? I'm using Tomcat 5.0.16 and I'm trying to make it so that if a user enters a path like, http://myserver/myapp it runs a default servlet for that path. According the the Servlet 2.4 spec, you can do this by mapping / to a servlet. However, for me, it's just printing out a directory listing of the /myapp directory when I try it (on a side note, how do you globally disable directory browsing?). I'm using a web.xml similar to the following. ?xml version=1.0 encoding=ISO-8859-1? web-app xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee web-app_2_4.xsd version=2.4 servlet servlet-namemyservlet/servlet-name servlet-classmypackage.MyServlet/servlet-class /servlet servlet-mapping servlet-namemyservlet/servlet-name url-pattern//url-pattern url-pattern/servlet/myservlet/url-pattern url-pattern/servlet/myservlet/*/url-pattern /servlet-mapping Also, I have something similar to the following in my server.xml. Context path=/myapp docBase=myapp debug=0 reloadable=true Any ideas? I can do what I want to do using an index.jsp with a redirect, but, I would like to avoid having it do a redirect if possible. Jon - 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
RE: servlet-mapping like mod_rewrite?
What about using one centralized servlet that parses req.getPathInfo(), sets the language as request attribute and forwards to the real servlet(s) ? -Original Message- From: Marten Lehmann [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 09, 2003 11:26 PM To: [EMAIL PROTECTED] Subject: servlet-mapping like mod_rewrite? through /de/* (german) and /en/* (english). Of course, I don't want to use two servlet-repositories for that. My idea is, that no matter if e.g. /en/helloworld or /de/helloworld is requested, a unique helloworld-servlet creates the response and chooses the language by parsing req.getPathInfo() for /de/ resp. /en/. As it isn't only one centralized servlet, I can't use the /* url-pattern. And I don't want to use a servlet-definition and according /en/??? and /de/??? url-pattern for every single servlet. How else can I do this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet-mapping like mod_rewrite?
Hello, What about using one centralized servlet that parses req.getPathInfo(), sets the language as request attribute and forwards to the real servlet(s) ? how is a request-forwarding done? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet-mapping like mod_rewrite?
Hello, Have a session variable that tracks what language they're using. I'm not looking for a different solution, but one, that solves my question. I definitely cannot do anything else than the /de/ or /en/ thing. Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: servlet-mapping like mod_rewrite?
Sorry not much time, try searching for request dispatcher and forward -Original Message- From: Marten Lehmann [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 10, 2003 4:46 PM To: Tomcat Users List Subject: Re: servlet-mapping like mod_rewrite? Hello, What about using one centralized servlet that parses req.getPathInfo(), sets the language as request attribute and forwards to the real servlet(s) ? how is a request-forwarding done? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet-mapping like mod_rewrite?
req.getRequestDispatcher(path/To/servlet) On Wed, 2003-12-10 at 10:46, Marten Lehmann wrote: Hello, What about using one centralized servlet that parses req.getPathInfo(), sets the language as request attribute and forwards to the real servlet(s) ? how is a request-forwarding done? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet-mapping like mod_rewrite?
Hello, to offer language-depended websites I want to make a webapp available through /de/* (german) and /en/* (english). Of course, I don't want to use two servlet-repositories for that. My idea is, that no matter if e.g. /en/helloworld or /de/helloworld is requested, a unique helloworld-servlet creates the response and chooses the language by parsing req.getPathInfo() for /de/ resp. /en/. As it isn't only one centralized servlet, I can't use the /* url-pattern. And I don't want to use a servlet-definition and according /en/??? and /de/??? url-pattern for every single servlet. How else can I do this? Regards Marten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]