Encoding URLs in navigation bar
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sanjit_Singh
Posted On:   Wednesday, November 7, 2001 05:56 AM

Hi, I have run into a problem and I have no clue how to solve it. Hopefully, somebody would be able to help me out. I am using tomcat and jsp pages. My jsp page basically has a top bar, a navigation bar on the left hand side and a body part. If I disable cookies, then the web container doesnt recognize the session if one of the buttons in the navigation bar is clicked(after logging in). I guess I have to encode the urls in the navigation bar and not have hard coded urls there,so that the web container can recognize the sessions (url rewriting). How can I encode these urls in the navigation bar?????? If I have a dynamic page, then one can write response.encodeURL(url); and it works    More>>

Hi,


I have run into a problem and I have no clue how to solve it. Hopefully, somebody would be able to help me out.

I am using tomcat and jsp pages. My jsp page basically has a top bar, a navigation bar on the left hand side and a body part. If I disable cookies, then the web container doesnt recognize the session if one of the buttons in the navigation bar is clicked(after logging in).

I guess I have to encode the urls in the navigation bar and not have hard coded urls there,so that the web container can recognize the sessions (url rewriting).

How can I encode these urls in the navigation bar??????

If I have a dynamic page, then one can write response.encodeURL(url); and it works perfectly, but I cannot do this in my navigation bar urlĀ“s as it is not a dynamic page.

Can somebody please shed some light on this issue and help me out. Thanks!

Sanjit

   <<Less

Re: Encoding URLs in navigation bar

Posted By:   Rupali_Deshmukh  
Posted On:   Monday, December 17, 2001 04:30 AM

Hi Sanjit,



want to know whether ur nav. bar is an included html page OR the nav. bar is a part of ur jsp page itself.



Regards,

Rupali

Re: Encoding URLs in navigation bar

Posted By:   Naveed_Azhar  
Posted On:   Wednesday, November 7, 2001 06:58 AM

In the JSP code of navigation bar page. When you create the HREF for a URL on the server. add a QueryString parameter which includes session attribute.
i.e.

pagename.jsp?sessionobj=sesionval

instead of

pagename.jsp


using the idea, you will be able to customize the contents.

Does it work?


naveed@hotmail.com
About | Sitemap | Contact