Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 9th, 2002, 03:26 PM
maximpact maximpact is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 2 maximpact User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
mod_rewrite URL stripping question

Hi all,

Apache : 1.3.x
Tomcat : 3.x

I am having a problem in that suddently, for some reason, Tomcat's session id ( jsessionid ) is getting included in the HTML URLs that are generated from the JSP code I am using. For example :

http://www.domain.com/ghb/estabtype?=GH;jessionid=Gkhjfjfhgjg?type=MX

The following should NOT be in the URL : ;jessionid=Gkhjfjfhgjg

As a temporary workaround, how do I tell mod_rewrite to strip out the offending jsessionid and end up with the correct url ( http://www.domain.com/ghb/estabtype?=GH?type=MX )

also, does anyone know why this jsessionid should suddenly start appearing like this? I have changed nothing in the apache or tomcat configuration.

Regards, Mark

Reply With Quote
  #2  
Old May 10th, 2002, 09:31 AM
Hero Zzyzzx's Avatar
Hero Zzyzzx Hero Zzyzzx is offline
11
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Jul 2001
Location: Lynn, MA
Posts: 4,635 Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level)Hero Zzyzzx User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 4 Days 23 h 44 m 19 sec
Reputation Power: 77
Send a message via AIM to Hero Zzyzzx
Why is this a problem, exactly? One thing that's good about embedding sessionids in URLs is that your sessions will then work for users that disable cookies. . .

In fact, some sessioning systems will default to stuffing sessionids in the URL when it can't do it with a cookie. Are you sure cookies are working OK on the browser you're using (or that you haven't disabled them for the domain, as some browsers will let you)?

I suggest you take a look at how to configure sessioning with tomcat (like you haven't already. . .) Stripping out the IDs from the URL will break a potentially valuable feature.

Have you tested this from other browsers?

Full disclosure- I've never installed/used tomcat and know only the basics of java.

Reply With Quote
  #3  
Old May 10th, 2002, 09:42 AM
maximpact maximpact is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 2 maximpact User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for your reply. It is a problem because when the jessionid is included in the URL, it produces a 404 error when someone clicks on the link which includes the jsesionid ( see example URL in my original post ). Cookies are enabled on my browser and this has been tested on multiple browsers on multiple machines.

When you go to a part of the site that uses JSP, you will initially find that links to other JSP pages contain the jsessionid code. When you refresh the browser, the jsessionid code disappears. That is the kernel of the problem. The jsessionid code should not appear for the links to work. The question is, how do I work around this? ( mod_rewrite ? ) and also why would this happen all of a sudden after the site has been months in operation and no changes at all have been made to apache or tomcat.

Regards, Mark

Reply With Quote
  #4  
Old May 13th, 2002, 10:04 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> why would this happen all of a sudden after the site has been months in operation

"I changed a part on my car's engine, and today it does not start. What is the matter?"
Sorry I know nothing about tomcat maybe you should ask the people in JSP forum, that's what that forum is for anyway.

>> how do I work around this? ( mod_rewrite ? )

No. Using external redirect will send [302] and internal redirect will not work because rewrite ruleset has no way of predicting the jessionid, thus you can't hardcode it to your ruleset, therefore, mod_rewrite is not a workaround for your situation.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > mod_rewrite URL stripping question


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT