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
Register
Register | 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
Reply
 
Thread Tools 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
www.mydomain.com/any-text
gets rewritten to
http://www.mydomain.com/myapp/welcom...meter=any-text

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
</Location>

(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
http://www.mydomain.com/myapp/welcom...meter=any-text
* I find http://www.mydomain.com/myapp/welcom...meter=any-text with a
sessionid!

I'd like to avoid using javascript redirect or similar

Thanks in advance!
Reply With Quote
  #2 (permalink)  
Old December 13th, 2006, 11:42 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi...

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

Do you know any solution or something new?

Thanks,
Fernando
Reply With Quote
Reply


Thread Tools
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 11:40 AM
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 09:14 AM



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


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