Hi chris, thanks for your reply!
Christopher Schultz-2 wrote: > > Martin, > > MartinV wrote: > | Hi list, > | I've got a task to solve and I don't have any clue where to start. > Here's > | the chain for delivering a resource like a JSP file to client. > | > | 1)Client => 2)Request => 3)Modify Resource => 4)Normal Handling like > | JSP-Compiling => 5)Response => 6)Client > > Er... huh? You want to modify a JSP on the fly before it gets compiled > and run? Okay... > > ... > Maybe you could explain what you're really trying to do and we could > suggest an alternative. What you say you're doing is quite... hacky. > Ok, this modification is a small part of my thesis. The reason why the modification is needed is that I have in the JSP - or maybe in HTML files - XML tags from an other namespace. These are some placeholders for dynamic content I need to insert. A simple example would be: <div> <xyz:widget param1="<%= var1%>" param2="<%= var2%>"></widget> </div> should be converted to <div> <ol> <li><%= var1%></li> <li><%= var2%></li> </ol> </div> How to transfer the resource to the needed output format is easy to do for me but like I told a have no clue how to pass the new resource on the fly to the server that he could render/compile and deliver it to the client. I also get to know that my approach is a kind of hacky - but it's not for a live server - only development. So it's not problem when it's hacky or has a bad performance. :) Christopher Schultz-2 wrote: > > Why not just modify it on the disk and use reloadable JSPs? > The reason is that it should be possible to modify not only JSP file but also HTML or declarative documents at all. Christopher Schultz-2 wrote: > > | At > | first I thought about Filters but I could apply them only after the > | compiling process. > > That doesn't sound right. You can apply a filter before a request is > handled (by the JSP servlet) if you want. > Yes your are alright. I explained wrong :) I mean that the document is read and compiled in one process. I know that it's possible to modify the request before processing - but I couldn't find a possibility to handle the loaded resource before compiling. Thanks for the help, Martin -- View this message in context: http://www.nabble.com/modify-requested-resource-before-compiling-tp17543665p17552140.html Sent from the Tomcat - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]