• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts 1 :Using logic:present to load a JSP Page

 
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

Is it possible to load a JSP depending upon logic:present

I am doing a search functionality , once data is entered on TextField and search button is clicked on , i need to show the search details .
For this I developed a two jsps (Frameset Logic)

Once the search is successful , logic:present i want to load that JSP .
Is it possible to load a JSP in struts depending upon logic:present ??

Please let me know if there is any better Option avaialable for this ??

Thanks .
 
Ranch Hand
Posts: 479
1
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ravi,

You can always have your <logic:present> in the same page as the one that shows the search options? In this scenario when you are viewing the page for the first time when the search results are absent you can 'hide' the same using a <logic:present>. The next time when you get back to the same with the results the same will get displayed based on the presentation you enclose within the logic tags.

The choice is always dependant on the requirements. I do not see any restrictions from your question. If you want to use frameset/frame and/or multiple pages for displaying the search criteria/search results you are free to do so. If you want to use the same page for the same, you are welcome again! :-)

It is for you to decide. If you ask me I'd rather use the same jsp page for both i.e. the search criteria as well as the search results also showing the criterai the search is based on. Why use multipleof JSP's when you can seggregate common functionality, after all the whole application will be more maintainable too, right?

N.B.: Your choice ought to depend more on your requirements.

Cheers,
Raj.
 
Everybody's invited. Even this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic