This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP Doubt

 
Suresh Yadla
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • 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 Command.java(this 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.

Thanks,
Suresh
 
Frederic Filiatrault
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 !

:roll:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic