This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes Dividing jsp into parts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Dividing jsp into parts " Watch "Dividing jsp into parts " New topic
Author

Dividing jsp into parts

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

I am developing a JSP page with struts in it .

My requirement is that , upon clicking on a search button of a jsp page , i need to show the details of taht serach result .

My question is , is it good to go with Framesets/ Frames for this ??

Or is there any other better Option ??

Thanks in advance ??

Please share your ideas .


Save India From Corruption - Anna Hazare.
Rajkamal Pillai
Ranch Hand

Joined: Mar 02, 2005
Posts: 443
    
    1

Hi,

Frameset/Frame are among the list of options. Since you are using Struts another option is to use would be to use a <logic:present> on the same page. The use would have to be dependant on the end requirement, if I were to suggest.

Cheers,
Raj.
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks RaJKamal ,

But i think taht you didn't understand my question properly .

Initially , i want to show an Jsp Page with a simple search button . If the search is successfull , i want to show an another some data for taht search (Thinking to use Frameset for this )


<logic:present name="LogicForm1">

// Here i want to load that Frame Jsp .
</logic:present>



Thanks .
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Seems Ajax would be a better approach... or just reload the page.

I don't think frames are as evil as a lot of people do, but I also believe their usefulness is rather limited, and should be avoided unless there's a compelling usecase.
Ayoma Wijethunga
Ranch Hand

Joined: Mar 07, 2010
Posts: 38

David Newton wrote:Seems Ajax would be a better approach... or just reload the page.


Yes true! AJAX is one of the best approach in this case. Surely, it is better than Framesets. Here is an example, using JQuery.



More about JQuery.load()

Regards,


AyomaOnline - CodeGreed
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks a lot .
Ayoma Wijethunga
Ranch Hand

Joined: Mar 07, 2010
Posts: 38

Pleased to be able to help..
 
jQuery in Action, 2nd edition
 
subject: Dividing jsp into parts
 
Similar Threads
NT user
CLASS VS JSP
How to escape the html comments without encoding
eror in the jsp custom tags
Old JSP page still being display.