Re: URL rewriting and cookies
The img tag is mainly there in case the images in a secure location, and the user needs to be logged in to get them. In which case, URL rewriting would be required to retrieve them (or the user would be asked to log in to retrieve each image ;-( You are not required to use the img tag if the images are in a public location. If the images are on another server, you may want to pass the URL in a bean, or as part of your own tag. If not, you can also use the conventional img tag with relative references, or a scriplet to insert the path to the current context. -- Ted Husted, Husted dot Com, Fairport NY USA. -- Custom Software ~ Technical Services. -- Tel +1 716 737-3463 -- http://www.husted.com/struts/ Aapo Laakkonen wrote: The Struts tag is doing this because this is the result of URL rewriting. The syntax is strange, as you put it, because the session id is encoded as a path parameter, and not part of the query string. This is all explained in the Servlet spec. Is it possible to fix this behavior somehow? What do you mean about strange syntax? And I'm still not sure that where the problem exists. Are you saying that IBM WebSphere 3.5.4 on AIX is somehow broken or doesn't implement Servlet specification as it should? I'm quite sure that there is some other people who are using struts on WebSphere. Do you have this kind of problems when URL-rewriting is turned on? Kind regards Aapo Laakkonen -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: URL rewriting and cookies
I still have not got any answers for the problem described below. Is there some problems with struts custom img-tag? Why it is generating tags like this? img src=/images/blue.gif;jsessionid=0001CEAAQCTISJFXCZWNZLC2WNA Where does this ';' came from and why there it is not '?' instead? Do I have to add ? on every picture if I like to use URL rewriting instead of cookies? Could you post an example of the type of URLs you're seeing? Here is the struts html:img-tag: html:img srcKey=img.pixel.blue altKey=img.pixel.blue.alt width=715 height=7 border=0/ And it generates output like this: img src=/images/blue.gif;jsessionid=0001CEAAQCTISJFXCZWNZLC2WNA alt= height=7 width=715 border=0 As you see ;jsessionid=0001CEAAQCTISJFXCZWNZLC2WNA is absolutely crap that I don't want to have in src-attribute. This occurs only when I enable URL-rewriting and disable cookies in my application server (WAS 3.5.4 on AIX). I have WAS modified struts package installed. My client likes to use URL-rewriting and disable cookies... I'm not sure if this problem occurs even if both URL rewriting and Cookies are enabled. But again my client wants to use only URL-rewriting, because they have quite strict deployment standards. Images are not served by WAS as my client uses separate Web Server for serving static content and they don't want to have any overhead that is generated by WAS layer if the files can be served directly by Apache or some other Web Server as it is the case with images in this app. Can someone at least confirm me if the problem exists in struts framework or somewhere else so I can point my finger to the source of the problem... and leave you to think how you can improve this great framework. Have you heard anything about WebWare for Python? I think that Struts developers should look at the ideas implemented in WebWare... if you already have not. It's really nice app server ... at least in developer's point of view, imho. Original message: - I have some small problems with struts on WebSphere 3.5.4 on AIX. Everything works fine, if I enable cookies and disable URL rewriting. But when I enable URL rewriting and disable cookies (or maybe I just need to enable URL rewriting) struts is generating (or is it because of struts)strange URL's. For example if I have used html:img srcKey=image.logo... / tag then struts generates the tag correctly but adds session id at the end of HTML's img-tags source attribute. And then the image is not displayed to the user because the generated URL points to wrong place. How can I remove struts from adding session ids at the end of the src attribute? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]