• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

What is more efficient?

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic