Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

What is more efficient?  RSS feed

 
Dinesh Kumar
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a jsp file that calls itself with different values of a request parameter.
Something like:
Href = "menu.jsp"?menu_level=0...
In the same jsp file I have code that checks the request parameter named menu_level to determine what kind of menu to show next. The user can click on a menu link and depending on the type of menu item they would be either taken to another jsp page or they would be shown the expanded view (sub-items) of the menu item they clicked on. This latter option is what I am implementing by calling the same jsp file itself with a different value of the parameter menu_level every time the user clicks on a menu link.
My question is will there be a fresh call to the server for each click on the link even though the same jsp is being requested (though with a different request parameter value)?
If yes, is there a better way of doing this. I know, alternatively, menus can be coded through Dhtml layers so that everything happens on the client side and new requests to the server are not required for expanding the menu. Is there any other way in jsp itself (besides dhtml and the one that I am using)?
Thanks in advance.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup ... there will be another hit on the server even if u are requesting the same page . U're retrieving a requestParameter Remember .
U could try using a javaScript menu or Tree to to move the display logic on the client instead of using DHTML Layers.It's simpler & there are loads of javaScript menus freely available on the net
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!