wood burning stoves 2.0*
The moose likes Struts and the fly likes jsp:include, template:insert or tiles? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "jsp:include, template:insert or tiles?" Watch "jsp:include, template:insert or tiles?" New topic
Author

jsp:include, template:insert or tiles?

dave sag
Ranch Hand

Joined: Feb 17, 2003
Posts: 47
Currently my site uses tiles extensively, but I can not decide what is the best to use for the following case:
I have a simple login-form. It needs to appear on 3 different pages, and is identical on each of them. my login form bean looks for a user bean in the request and if it finds one prepopulates the username field.
usign tiles to insert an ad-hoc login form seems like overkill, but is probably the cleanest way to do it.
using template:insert to do this is confusing - i have read and reread the template docs and they make no sense to me and I can't find any decent examples. (are the files i am including served up through the webserver or can i just specify a local path to them - ala tiles?) can use the forwards i have defined in my struts-config?
using jsp:include to do this means i need to expose the exact path (or are these included via the server too?) and i am not sure whether things I include will trigger calls to my form bean properly or not.
all a bit confused here. what do other people do for small reusable struts forms? got any example code you'd care to share?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:include, template:insert or tiles?