You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Maggs <ja...@virgin.net> on 2001/04/11 19:11:14 UTC

Url Rewrting and Cache problems

Hi There,

I am developing my new website using struts and have found it to be
excellent. I use tomcat in stand-alone mode during development but on
deploying the web application to my web server I am experiancing a few
problems which I hope you learned fellows might be able to help me with.
Firstly here is my set-up:

Red Hat 6.2
Apache 1.3.12
Tomcat 3.2 Beta8 (using mod_jk)

And now here are my questions:

1. Apache does not recognise the jsessionid appended by Tomcat. I am aware
of the following RewriteRule but when I tried this the problem remained.

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteRule  ^(/.*;jsessionid=.*)$  $1  [T=jserv-servlet]
</IfModule>

I guess the jserv-servlet mime type is for mod_jserv users. How to I add
this mime-type to allow me to handle requests with mod_jk? Alternatively, I
have thought of adding the following to my config to achieve the same
result:

JkMount /appdir/*;jsessionid=* ajp13

Where appdir is the appropriate application context. It seems to work ok.
Does this seem feasible?

2. Secondly, I am having major problems with caching under MSIE. I am using
the templating tags to give a uniform layout to all of my pages. I am also
following the model demonstrated by the struts-example application where
more than one function is carried out per Action (using an 'action'
parameter to control this). However, this results in different pages being
displayed depending on request parameters and IE seems to ignore this and
just pull out the cached version. I have set the nocache=true in the init
config for the action servlet but this has made no difference.

Can anybody help me with either of these problems? It would be a shame if I
had to abandon Struts after having come so far.

Many thanks,

-James





Re: Url Rewrting and Cache problems

Posted by James Maggs <ja...@virgin.net>.
Further to my previous email, the caching in IE is becoming beyond a joke.
The browser seems to just pick files at random from the cache when it
displays a page.

In response to a request for the root index.jsp file for my site it returned
the source of an external javascript file linked to the document it was just
displaying!!!

I know this is a problem with IE and not struts itself but has anyone found
a solution to the caching problem? And, moreover, a solution that works
across all browsers?

Many thanks,

-James

----- Original Message -----
From: "James Maggs" <ja...@virgin.net>
To: <st...@jakarta.apache.org>
Sent: Wednesday, April 11, 2001 6:11 PM
Subject: Url Rewrting and Cache problems


> Hi There,
>
> I am developing my new website using struts and have found it to be
> excellent. I use tomcat in stand-alone mode during development but on
> deploying the web application to my web server I am experiancing a few
> problems which I hope you learned fellows might be able to help me with.
> Firstly here is my set-up:
>
> Red Hat 6.2
> Apache 1.3.12
> Tomcat 3.2 Beta8 (using mod_jk)
>
> And now here are my questions:
>
> 1. Apache does not recognise the jsessionid appended by Tomcat. I am aware
> of the following RewriteRule but when I tried this the problem remained.
>
> <IfModule mod_rewrite.c>
>    RewriteEngine On
>    RewriteRule  ^(/.*;jsessionid=.*)$  $1  [T=jserv-servlet]
> </IfModule>
>
> I guess the jserv-servlet mime type is for mod_jserv users. How to I add
> this mime-type to allow me to handle requests with mod_jk? Alternatively,
I
> have thought of adding the following to my config to achieve the same
> result:
>
> JkMount /appdir/*;jsessionid=* ajp13
>
> Where appdir is the appropriate application context. It seems to work ok.
> Does this seem feasible?
>
> 2. Secondly, I am having major problems with caching under MSIE. I am
using
> the templating tags to give a uniform layout to all of my pages. I am also
> following the model demonstrated by the struts-example application where
> more than one function is carried out per Action (using an 'action'
> parameter to control this). However, this results in different pages being
> displayed depending on request parameters and IE seems to ignore this and
> just pull out the cached version. I have set the nocache=true in the init
> config for the action servlet but this has made no difference.
>
> Can anybody help me with either of these problems? It would be a shame if
I
> had to abandon Struts after having come so far.
>
> Many thanks,
>
> -James
>
>
>
>
>