HELP! cookie succes depends on url structure (Struts?)

M

moo moo

Im using Struts. I was having a problem setting a cookie in an Action
Class, basically it wouldn't work. However I was able to set a cookie
with no problem in another Action class. After many many hours of head
scratching and a long process of elimination etc etc I discovered that
if the action path is

<action path="/dog"
type="MyClass">
</action>

i.e. a url of http://localhost:8080/dog.do

Then MyClass sets the cookie no problem. If the action path is

<action path="/a/dog"
type="MyClass">
<forward name="pdboard1" path="/pdboard1.do"/>
</action>

i.e. a url of http://localhost:8080/a/dog.do

then the cookie is not set. As soon as I changed the path from
'/a/dog' to '/dog' it all worked with no problem.

I guess this is a web server issue (Im using Resin)?

Pehaps urls of the form http://www.mysite.com/a/dog.do are ok? (its
only with http://localhost:8080 you get a problem )

This probably explains why sometimes the URL is re-written with the
JSESSIONID in it.

Hmmmm -- I'm very worried now. Is this a known problem or have I been
doing something wrong? Perhaps my web site is totally f****d up and I
dont know it ... oh my god!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,139
Latest member
JamaalCald
Top