I have a response reading the jguru FAQ concerning the encodeURL utility regarding
Cookies problem. I also output the session ID in my pages and could see they were
different if cookies was disabled so suppose i had as many of beans instances as I
had session. !?!
So I tried the encodeURL and I still have different session ID if cookies are
disabled. For the error page set by errorPage Tag, how could we encode the URL ?
I tried
test.jsp:
<% String errURL = response.encodeURL("error.jsp"); %>
...
<@ page import .... errorPage= xxx />
with xxx = <%=errURL%> I had an error ' Attributes must be quoted'
= "<%=errURL%>" It seems to try to access to page <%=errURL%>
="response.encodeURL(/"error.jsp/")" still doesn't work !!!!
I also tried for my links
<A HREF=<%=response.encodeURL("mypage")%>?params >
or
<% String pageURL = response.encodeURL("mypage" ); %>
<A HREF=<%=pageURL%>?params >
In both case, the session ID are differents each time I call my page and if I
display the pageURL string, it display only mypage.jsp
I used JSWDK 1.0.1 .... What could be the reason for this ?
thanks
Veronique
Veronique Dupierris a �crit :
> Hi,
>
> I'm new in Web application, JSP... so sorry for my basics questions
> !!
> I have to write an application which access to a specific database.
> All works fine but I 've read some mails about cookies and I'm wondering
> if my application will work well in any case:
> - I didn't wrote any servlet only JSP files. When i call a JSP from
> another JSP file, I passes some parameters (DB name) to be able to get
> my beans(usebean with same ID and then use setParameter DB name). Even
> if no cookies are set (disable cookies in browser), it seems to work (
> Is it true ?, do I really access to the same instance ?)
> - But to load my error page in top window not in a frame, I first
> call error.jsp from errorPage tag which calls a second error page
> (top.document.location.href="error2.jsp") after putting the exception
> object in session (session.putValue); In this case the error2.jsp file
> causes an error !! ( Null pointerException : certainly when I try to get
> the exception object with session.getValue).
>
> I suppose i could load the error page on top windows without
> calling a second page but i would like to know if the test i done on my
> PC concerning the 'disable cookie' is valid and if I have to do
> something in the case the user disable cookies in his browser. I saw
> some encoding url .. could we do this in a JSP file ?
>
> Thank you for your help
> veronique.
>
> I' ll certainly have a lot of other questions for you :-))
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html