This week's giveaway is in the JDBC forum.
We're giving away four copies of Java Database Connections & Transactions (e-book only) and have Marco Behler on-line!
See this thread for details.
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How to avoid JSESSIONID display browser querystring  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have two JBoss servers clusted using ModJK and the application I have developed using struts framework. I am accessing the application from Apache web server.

When I access the application home page on the borwser address bar I am seeing the JSESSIONID as

http://HostName/AppContext/home.do;jsessionid=56FA082595546D3F49A5F42ACB48A1EB.JbossCluster1

How can I restrict ";jsessionid=56FA082595546D3F49A5F42ACB48A1EB.JbossCluster1" being displayed in browser as part of Query String.

Please someone help me.

Regards
Pon
 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is your browser allowing cookies? It seems like the server is using url rewriting...
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Any body got any solution on this issue?

I am facing the same issue.

Regards,
Rajesh.
 
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cut-and-paste from http://www.mail-archive.com/user@struts.apache.org/msg50246.html

The "jsessionid" attribute is put when cookies are not enabled on the browser, or when there wasn't time to set one. For example if your home JSP page has a <html:link>, the Struts tag will rewrite the URL appending the "jsessionid" attribute, because it did not find any cookie.
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see this is old, but a google search brought me here so I'm adding an answer...


The Servlet 3.0 standard gives you two ways to disable URL session rewriting. This works in Tomcat 7, Glassfish v3, and any other Servlet 3.0-compliant servlet container. First, you can add this to your web.xml webapp config:




Or programmatically, you can use:





Found from this url: https://fralef.me/tomcat-disable-jsessionid-in-url.html
OR this url: http://stackoverflow.com/questions/962729/is-it-possible-to-disable-jsessionid-in-tomcat-servlet
 
It would give a normal human mental abilities to rival mine. To think it is just a tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!