Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java Open Source > BOOK: Professional Apache Tomcat
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional Apache Tomcat
This is the forum to discuss the Wrox book Professional Apache Tomcat by Chanoch Wiggers, Ben Galbraith, Vivek Chopra, Sing Li, Debashish Bhattacharjee, Amit Bakore, Romin Irani, Sandip Bhattacharya, Chad Fowler; ISBN: 9780764543722
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 7th, 2006, 03:13 PM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default RewriteRule / mod_jk / sessionid problem

I have a rule that states
gets rewritten to

RewriteRule ^/([A-Za-z0-9-]+)?$ /myapp/welcome.do?parameter=$1 [R]

The new URL contains "/myapp/", so is passed to the apache-tomcat due to the
following instruction:

<Location "/myapp/*">
    JkMount myapp
    Allow from all

(I'm using jakarta struts framework for the myapp application)
My problem is that the sessionid assigned to the user doesn't appear in the
apache log until the customer clicks beyond
http://www.mydomain.com/myapp/welcom...meter=any-text. Hitting the first URL
in the app sets the sessionid in a cookie on the users machine, subsequent
requests are logged with the sessionid in the apache log. I really need the
sessionid to be logged during the initial rewrite.

Is there an easy way to use a RewriteRule and mod_jk to resolve this?

I was thinking of something along the lines of:
* The rewrite rule can 'pass through' to a JkMount instruction.
* The 'any-text' parameter is passed to a servlet.
* The servlet sets the sessionid (cookie)
* The servlet forwards to
* I find http://www.mydomain.com/myapp/welcom...meter=any-text with a

I'd like to avoid using javascript redirect or similar

Thanks in advance!
  #2 (permalink)  
Old December 13th, 2006, 12:42 PM
Registered User
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


I think i am having the same problem or similar...

Do you know any solution or something new?


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to reset the SessionID? akkad C# 2 October 24th, 2007 06:49 AM
session.sessionid same for all items sarah lee ASP.NET 1.0 and 1.1 Basics 1 October 31st, 2006 12:40 PM
SessionID changing between postbacks - C# wlangel Visual Studio 2005 1 September 20th, 2006 11:23 AM
Problem with mod_jk, socket is not connected error kouterguine BOOK: Professional Apache Tomcat 0 October 6th, 2005 08:28 AM
How to Generate my own SESSIONID anand_asv .NET Framework 2.0 0 March 2nd, 2005 10:14 AM

All times are GMT -4. The time now is 02:15 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.