But, the servlet needs access to the Session so it can do things such as
validating that
the user is logged on and can see the content, etc.
So, by your answer can I assume that all hyperlinks in JSP pages have to use
EncodeURL to
successfully survive a browser with disabled cookies?
Dave Bolt
ATSC/SPAWAR ASAT Team
Bolt's Law of Bandwidth - There is always plenty of network bandwidth, just
none for you.
-----Original Message-----
From: Shrisha Radhakrishna [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 20, 2000 3:04 PM
To: [EMAIL PROTECTED]
Subject: Re: Question about URL rewriting.
You don't have to do encodeURL the 'IMG SRC' unless it's a hyperlink.
--Shrisha
----- Original Message -----
From: "Bolt, Dave" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, September 20, 2000 11:18 AM
Subject: Question about URL rewriting.
> If I want my JSP pages to work in a situation where cookies are disabled
and
> the server is doing URL rewriting
> do I have to use EncodeURL for all of my HREF (and perhaps IMG) tags in my
> JSP page.
>
> Example. Here is a JSP page that retrieves an image (stored in a database)
> via a servlet and has hyperlinks
> to other JSP pages. Note: I am using a servlet mapping to map a servlet to
a
> directory
>
> The way you would expect to write this page is something like this.
>
> <IMG SRC="mediaservlet?mediaId=5000"><BR>
> <a href="page1.jsp">page1</a><BR>
> <a href="page2.jsp">page2</a><BR>
> <a href="page3.jsp">page3</a><BR>
>
> If I want the page to work in a URL-rewriting mode do I have to do the
> following?
>
> <IMG SRC="<%= response.encodeURL("mediaservlet?mediaId=5000")%>"><BR>
> <a href="<%=response.encodeURL("page1.jsp")%>">page1</a><BR>
> <a href="<%=response.encodeURL("page2.jsp")%>">page2</a><BR>
> <a href="<%=response.encodeURL("page3.jsp")%>">page3</a><BR>
>
> What I'm basically looking for is some guidance on whether or not I need
to
> do option 2 all of the time to
> maximize portability and survive cookie-disabled browsers.
>
> If option 2 is what I should do, why doesn't JSP shield the HTML developer
> from this? The goal would be for
> the JSP author to be a higher-end HTML developer who shouldn't have to
worry
> about maintaining the
> session, etc.
>
> Thanks
>
> Dave Bolt
> ATSC/SPAWAR ASAT Team
> Bolt's Law of Bandwidth - There is always plenty of network bandwidth,
just
> none for you.
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets