File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Other Open Source APIs
Problem with encodeURL (c:url)
Joined: Jul 01, 2002
Oct 13, 2004 06:11:00
I have the following configuration:
1. The Tomcat's server.xml contains the following context section:
<Context path="" docBase="/path-to-unpackedWAR/">
<Parameter name="some-name" value="some-value"/>
<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_myapp_log." suffix=".txt" timestamp="true"/>
the docBase elements points to the location where previously I have unpacked the application's war file.
2. Used is JSTL's <c:url> tag to ensure URL encoding (for disabled cookies scenario).
Running Tomcat went smoothly and the application has been starteed normally. Everything works fine in the case that the browser has enabled cookies.
THE PROBLEM: when cookies has been disabled in the browser, this ends up in encoding sessionid 2 times thus resulting in not available resource. I.e. when I poin to the link produced by <c:url value="some-resource"> this will produce the following link :
What I have found:
If I change the path element of the Context (i.e <Context path="/it_works") and access the site by
then everythink is fine. the <c:url value="some-resource"> encodes url properly and gives the following
Question: Where is the problem, is anybody can help. Is there any parameters that have to be set additionally?
[ October 13, 2004: Message edited by: Deyan Sultov ]
Author and ninkuma
Joined: Jan 10, 2002
Oct 14, 2004 08:44:00
Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please continue any discussion of this topic
here in the JSP forum
Asking smart questions
Books by Bear
I agree. Here's the link:
subject: Problem with encodeURL (c:url)
html-el:link - problem with context
Tomcat - problem with jsessionid (c:url)
URLConnection && session state
Difference between URLs: /? and /login?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015