Win a copy of Terraform in Action this week in the Cloud forum!
  • 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 ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

JSP Doubt

Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a doubt. I have two modules A and B and both of them are in two different packages. Each Module has a JSP page and a Bean and a program has the logic for what to do when a search button is clicked and so on)

Both JSPs search data from database based on the selections and show the data in the results. Both the main page and results are in the same JSP with the help of taglibraries.

Now, When the search button in A is clicked I have to show the search results of B, so how can I do that without duplicating the code in module B?
Will a forward do, with setting the properties in Bean and then forwarding to the JSP in B ?

If anyone know then please let me know.

Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

More details would be needed, I think. Mainly, from the module A, I would fill the bean of the module B and forward to your B-JSP file, as you suggested.

I don't know for what reason you have 2 modules, I presume that it is two differents way to make a search. So, in this case, why are you not creating a 3rd module, for displaying results ? Just a suggestion.

If you could describe a little bit more what A & B is doing, I would able to answer you more in details. thk !

Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic