Re: jsessionid appended to URL and page not found`
The solution Christopher and Dave discuss above can be handled with this in the Apache httpd.conf file: RewriteRule ^(.*);jsessionid=.*$ $1 This strips the session ID from anything that the HTTPD server is handling, although it should still get passed through the proxy. To be honest, our apps depend on cookies for other reasons so if URL rewrite sessions didn't work, we might never notice. The fact that your proxy config is not correctly brokering some URLs over to the servlet container would depend on how your proxy config is set up; I'm not very experienced in actally setting this up, but my diagnosis is correct, then the Struts mailing list is not the best place for the question anyway... Joe On 2/7/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: > --- Vinod Kumar <[EMAIL PROTECTED]> wrote: >> So I have apache+tomcat integrated. What >> confirguration settings, do I need to make this work >> in this scenario. > > IIRC when we had this problem we used one of the > rewrite mods to nudge Apache to know that the > ;jsessionid etc. was special. > > There's probably a better solution these days :) For me, this strategy is only necessary when I want Apache httpd to serve static content that has an encoded jsessiond in the URL. Anything that gets passed-through to the app server (Tomcat in my case) is handled correctly. Use of mod_rewrite is only necessary when Apache httpd incorrectly includes the ";jsessionid" as part of the filename, and therefore fails to locate "some-static.html;jsessionid=ABCDEF" in the filesystem. mod_rewrite can be used to remove the jsessionid, allowing Apache httpd to correctly locate the static resource on the disk. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFyoWQ9CaO5/Lv0PARArqsAKDEW+7/4JQmg1QkbK8XiqL1elywvQCfVxa5 dteBRDBaFEmOqbktSGxrti0= =vchZ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso
Re: jsessionid appended to URL and page not found`
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dave, Dave Newton wrote: > --- Vinod Kumar <[EMAIL PROTECTED]> wrote: >> So I have apache+tomcat integrated. What >> confirguration settings, do I need to make this work >> in this scenario. > > IIRC when we had this problem we used one of the > rewrite mods to nudge Apache to know that the > ;jsessionid etc. was special. > > There's probably a better solution these days :) For me, this strategy is only necessary when I want Apache httpd to serve static content that has an encoded jsessiond in the URL. Anything that gets passed-through to the app server (Tomcat in my case) is handled correctly. Use of mod_rewrite is only necessary when Apache httpd incorrectly includes the ";jsessionid" as part of the filename, and therefore fails to locate "some-static.html;jsessionid=ABCDEF" in the filesystem. mod_rewrite can be used to remove the jsessionid, allowing Apache httpd to correctly locate the static resource on the disk. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFyoWQ9CaO5/Lv0PARArqsAKDEW+7/4JQmg1QkbK8XiqL1elywvQCfVxa5 dteBRDBaFEmOqbktSGxrti0= =vchZ -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsessionid appended to URL and page not found`
--- Vinod Kumar <[EMAIL PROTECTED]> wrote: > So I have apache+tomcat integrated. What > confirguration settings, do I need to make this work > in this scenario. IIRC when we had this problem we used one of the rewrite mods to nudge Apache to know that the ;jsessionid etc. was special. There's probably a better solution these days :) d. Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsessionid appended to URL and page not found`
Hi Joe, Thanks for your reply. Basic Http Service is handled by apache web server and servlet requests are handled by Tomcat. So I have apache+tomcat integrated. What confirguration settings, do I need to make this work in this scenario. Thanks Vinod --- Joe Germuska <[EMAIL PROTECTED]> wrote: > What is handling the basic HTTP service for your > application? If it is not > a servlet container, but rather an HTTP server which > proxies certain > requests to a servlet container, then there is > probably just a configuration > problem. > > The scenario you describe is standard. A Servlet > Container (or maybe it's > the JSP engine) is supposed to encode the session ID > in URLs unless it knows > that the client accepts cookies, which it can only > know if the client > already presented a cookie with a session ID in it > (as on reload or later > clicks through the application.) > > If you don't have an HTTP proxy in the middle, then > what servlet container > are you using? I do local development with Tomcat > and have for years with > it being the HTTP server, and have never had this > problem. > > joe > > On 2/7/07, Vinod Kumar <[EMAIL PROTECTED]> wrote: > > > > Hi All, > > I have a link to a struts web application in one > of > > existing website like start.jsp?cntry_cd=US > > > > start.jsp is in struts application and contains > the > > following line > > > > > > setup action does some pre-setup stuff and > forwards to > > home page. The home page displays well with all > > navigation links. But, when I click on any of the > > navigation links (which are actions and their URL > > looks like status.do;jsession=jfdkfdkfdk > ..jsessionid > > appened only initially ) , I get error message > that > > page cannot be found. > > > > If before clicking on any of the links, I do > refresh > > on the home page and then click on any links, then > it > > works fine. > > > > My question is, why it cannot find actions, when > > jsessionid is appended to URL. What can i do to > fix > > this issue. > > > > Thanks for your help. > > > > Vinod > > > > > > > > > > > > > > > Don't pick lemons. > > See all the new 2007 cars at Yahoo! Autos. > > http://autos.yahoo.com/new_cars.html > > > > > - > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > > > > -- > Joe Germuska > [EMAIL PROTECTED] * http://blog.germuska.com > > "The truth is that we learned from João forever to > be out of tune." > -- Caetano Veloso > Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit. http://farechase.yahoo.com/promo-generic-14795097 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: jsessionid appended to URL and page not found`
What is handling the basic HTTP service for your application? If it is not a servlet container, but rather an HTTP server which proxies certain requests to a servlet container, then there is probably just a configuration problem. The scenario you describe is standard. A Servlet Container (or maybe it's the JSP engine) is supposed to encode the session ID in URLs unless it knows that the client accepts cookies, which it can only know if the client already presented a cookie with a session ID in it (as on reload or later clicks through the application.) If you don't have an HTTP proxy in the middle, then what servlet container are you using? I do local development with Tomcat and have for years with it being the HTTP server, and have never had this problem. joe On 2/7/07, Vinod Kumar <[EMAIL PROTECTED]> wrote: Hi All, I have a link to a struts web application in one of existing website like start.jsp?cntry_cd=US start.jsp is in struts application and contains the following line setup action does some pre-setup stuff and forwards to home page. The home page displays well with all navigation links. But, when I click on any of the navigation links (which are actions and their URL looks like status.do;jsession=jfdkfdkfdk ..jsessionid appened only initially ) , I get error message that page cannot be found. If before clicking on any of the links, I do refresh on the home page and then click on any links, then it works fine. My question is, why it cannot find actions, when jsessionid is appended to URL. What can i do to fix this issue. Thanks for your help. Vinod Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Joe Germuska [EMAIL PROTECTED] * http://blog.germuska.com "The truth is that we learned from João forever to be out of tune." -- Caetano Veloso
jsessionid appended to URL and page not found`
Hi All, I have a link to a struts web application in one of existing website like start.jsp?cntry_cd=US start.jsp is in struts application and contains the following line setup action does some pre-setup stuff and forwards to home page. The home page displays well with all navigation links. But, when I click on any of the navigation links (which are actions and their URL looks like status.do;jsession=jfdkfdkfdk ..jsessionid appened only initially ) , I get error message that page cannot be found. If before clicking on any of the links, I do refresh on the home page and then click on any links, then it works fine. My question is, why it cannot find actions, when jsessionid is appended to URL. What can i do to fix this issue. Thanks for your help. Vinod Don't pick lemons. See all the new 2007 cars at Yahoo! Autos. http://autos.yahoo.com/new_cars.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]