Basic Templating Recommendations?
I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? Thank you, A. -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Basic Templating Recommendations?
I don't understand what you are asking. With struts you can specify the template you want to use by placing a tiles definition in the forward mappings. It will map you request url to a definition. Just make sure that everything is happening through struts controller and map you forward to tiles definitions. Have you tried nesting definition in your tiles-def or using the inheritance feature? Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: Adam Sherman [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:18 AM To: Struts Users Mailing List Subject: Basic Templating Recommendations? I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? Thank you, A. -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Basic Templating Recommendations?
Phase Web and Multimedia wrote: I don't understand what you are asking. With struts you can specify the template you want to use by placing a tiles definition in the forward mappings. It will map you request url to a definition. Just make sure that everything is happening through struts controller and map you forward to tiles definitions. Have you tried nesting definition in your tiles-def or using the inheritance feature? Basically, I've got a bunch of pages in a site that are static. I need a simple way to template them. I would like to use Tiles, but I don't want to have links to tiles?def=main.index and such. I want links to look like below. So, I'm asking about recommendations to do simple templating of static content, in conjunction with a dynamic site built using Struts. (So I want to reuse the tiles.) Thanks for your help, A. I've tried asking this a few times, but I think I haven't been clear. I need a simple way to have requests converted into calls to Tiles definitions. So, requests like /pages/pageone.thtml, would get turned into a call to the tile pageone. /pages/main/pagetwo.thtml = main.pageone, etc. I thought creating an Action that would figure out the defintion based on the request URI, using the ideas in org.apache.struts.tiles.actions.DefinitionDispatcherAction. However, I've just read that you can't have multiple servlet-mappings. Also, I feel that my approach isn't great. Please, I know people must be doing something for the many generic html pages on their dynamic sites, ideas? -- Adam Sherman Software Developer Teach and Travel Inc. +1.613.241.3103 -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]