Re: Servlet mapping issue
On 24/06/2010 19:24, laredotornado wrote: I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave Does the JSP have any includes from the same directory, that might work when you're using the /* ending, but not when you're using the single JSP? If you put the mapping back to: /play/music/includes/venue-listing and call it with the params on the end, does it work then? p n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org signature.asc Description: OpenPGP digital signature
Re: Servlet mapping issue
Did you mean to say, call it WITHOUT the params at the end? If so, when I did that, everything mapped fine. However, I do need the query params to process the page correctly. Sadly, this url-pattern didn't work servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing*/url-pattern /servlet-mapping Note the * after venue-listing in an attempt to capture any query params. Any ideas how to write the url-pattern so that I can catch additional query params? Thanks, - Dave Pid * wrote: On 24/06/2010 19:24, laredotornado wrote: I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave Does the JSP have any includes from the same directory, that might work when you're using the /* ending, but not when you're using the single JSP? If you put the mapping back to: /play/music/includes/venue-listing and call it with the params on the end, does it work then? p n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Servlet-mapping-issue-tp28984816p28994244.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Re: Servlet mapping issue Did you mean to say, call it WITHOUT the params at the end? No, leave the params in, but omit the .jsp suffix in the URL. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
2010/6/24 laredotornado laredotorn...@gmail.com: I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave Mapping of exact jsp path to a servlet must work. That is how precompiled JSP pages are added to a web application: they are compiled into servlets and servlets are added into web.xml. See the jsp-examples webapp in Tomcat 5.5 for an example of such configuration. You have to specify the exact path as is. Escaping ('\.') is not needed and will not work. Best regards, Konstantin Kolinko - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chuck, On 6/25/2010 12:47 PM, Caldarale, Charles R wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Re: Servlet mapping issue Did you mean to say, call it WITHOUT the params at the end? No, leave the params in, but omit the .jsp suffix in the URL. I'm surprised that this doesn't work as written: 1. The JspServlet is mapped to *.jsp 2. His servlet is mapped to /play/music/includes/venue-listing* 3. url-patterns match the longest-matching pattern, so #2 ought to override #1 What would be better, probably is: url-pattern/play/music/includes/venue-listing.jsp/url-pattern ...which the OP tried unsuccessfully, earlier. I would have expected that to work, too. :( - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwk8NMACgkQ9CaO5/Lv0PCaaACdGyZpvu/cF6X2XELHw9muz/mz qYYAn0BQetjmm0SNpwgQ894hdNmZmvlC =zYOn -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, On 6/24/2010 1:29 PM, laredotornado wrote: But visiting the URL http://mydomain.com/context-path/play/music/includes/venue-listing.jsp?id=3type=venues gives a 404. Just a thought: are you sure it's the servlet that can't be found? Is your servlet performing a forward() to a resource that can't be found? Maybe you're looking for the error in the wrong place. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwk8SAACgkQ9CaO5/Lv0PBLhQCeKDQp8YXRssHJCT4UfdTs7TKz ILYAoMQ9lvSJap+rVuQzcKsOzAqA99g6 =q7wO -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
I tried this too and still got the 404. servlet-mapping servlet-nameMusicVenueServlet/servlet-name url-pattern/play/music/venues/*/url-pattern url-pattern/play/music/includes/venue-listing.jsp/url-pattern /servlet-mapping I also tried escaping the period in the file extension (\.jsp), but no luck. Any ideas how to troubleshoot the problem further? - Dave n828cl wrote: From: laredotornado [mailto:laredotorn...@gmail.com] Subject: Servlet mapping issue url-pattern/play/music/includes/venue-listing/url-pattern You left the .jsp off the end of venue-listing. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- View this message in context: http://old.nabble.com/Servlet-mapping-issue-tp28984816p28985292.html Sent from the Tomcat - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] Subject: Servlet mapping issue Here's my question Is it possible to add a servlet mapping which points directly to the servlet contained in the .jar file of my tree menu? Well... yes. Servlet mapping is explained in the servlet spec, and there are numerous examples that ship with Tomcat. Is there more to your question? Perhaps some constraints that you haven't mentioned? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
Hi! Thanks for the really quick answer. It's probabily something really basic to do, but I'm a newbie and I'm not able to do it: I have an application (lets call it APP1) and it's organized like this: APP1 - WEB-INF +++ lib . myJar.jar (contains the package org.imin.treemenu) -.-.-.-.-.-.-.-..-.-.-.-.-.-.-.- myServlet (org.imin.treemenu.TreeMenuServlet) - web.xml Now I need to register _myServlet_ in the deploy descriptor and I write these lines in web.xml: servlet description/description display-nameTreeMenuServlet/display-name servlet-nameTreeMenuServlet/servlet-name servlet-classorg.imin.treemenu.TreeMenuServlet/servlet-class /servlet servlet-mapping servlet-nameTreeMenuServlet/servlet-name url-pattern/TreeMenuServlet/url-pattern /servlet-mapping When I try my application and I click on the button which make an AJAX post request on this servlet the browser returns an error (404 not found) Sorry to bother but I'm new! Thanks Sergio Caldarale, Charles R ha scritto: From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] Subject: Servlet mapping issue Here's my question Is it possible to add a servlet mapping which points directly to the servlet contained in the .jar file of my tree menu? Well... yes. Servlet mapping is explained in the servlet spec, and there are numerous examples that ship with Tomcat. Is there more to your question? Perhaps some constraints that you haven't mentioned? - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org -- *I.M.I.N. Holding s.r.l.* Sergio Arrighi sergio.arri...@iminholding.com mailto:sergio.arri...@iminholding.com Cell. 3455805121 Vicolo Molino, 2 21052 Busto Arsizio Varese Tel. +39 0331324679 Fax. +39 0331324678 www.iminholding.com - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
What's in your access-log? Rgds Gregor -- just because your paranoid, doesn't mean they're not after you... gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2 gpgp-key available @ http://pgpkeys.pca.dfn.de:11371 - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
Sergio Arrighi wrote: Hi! Thanks for the really quick answer. It's probabily something really basic to do, but I'm a newbie and I'm not able to do it: I have an application (lets call it APP1) and it's organized like this: APP1 - WEB-INF +++ lib . myJar.jar (contains the package org.imin.treemenu) -.-.-.-.-.-.-.-..-.-.-.-.-.-.-.- myServlet (org.imin.treemenu.TreeMenuServlet) - web.xml Now I need to register _myServlet_ in the deploy descriptor and I write these lines in web.xml: servlet description/description display-nameTreeMenuServlet/display-name servlet-nameTreeMenuServlet/servlet-name servlet-classorg.imin.treemenu.TreeMenuServlet/servlet-class /servlet servlet-mapping servlet-nameTreeMenuServlet/servlet-name url-pattern/TreeMenuServlet/url-pattern /servlet-mapping When I try my application and I click on the button which make an AJAX post request on this servlet the browser returns an error (404 not found) Sorry to bother but I'm new! Thanks Sergio Caldarale, Charles R ha scritto: From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] Subject: Servlet mapping issue Here's my question Is it possible to add a servlet mapping which points directly to the servlet contained in the .jar file of my tree menu? Well... yes. Servlet mapping is explained in the servlet spec, and there are numerous examples that ship with Tomcat. Is there more to your question? Perhaps some constraints that you haven't mentioned? - Chuck What URL is your AJAX posting to? Also take a look at your logs for any relevant messages. Maybe there was a problem setting up your servlet. The servlet mapping looks good as you defined it in your webapp's WEB-INF/web.xml file. --David - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
RE: Servlet mapping issue
From: Sergio Arrighi [mailto:sergio.arri...@iminholding.com] Subject: Re: Servlet mapping issue When I try my application and I click on the button which make an AJAX post request on this servlet the browser returns an error (404 not found) For initial testing, take AJAX out of the picture; just enter the URL for the servlet in the browser's address bar and see if you get a response (or use wget or curl or equivalent): http://server/APP1/TreeMenuServlet As others have stated, definitely look in the logs for any problem reporting. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Servlet mapping issue
Sergio Arrighi wrote: [...] Thanks for the info you put here. That was very clear, if even I understand. When I try my application and I click on the button which make an AJAX post request on this servlet the browser returns an error (404 not found) I think what you need to provide here, is the exact URL that your AJAX POST is posting to, so that we can have an idea of what the 404 is due to. Do you know ? - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org