Charles - What you want to do is not possible with JSP. I tried for quite some time to find every conceivable way around it, but it can't be done. See my original posting:
http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg50547.html and Craig McClanahan's response: http://www.mail-archive.com/tomcat-user%40jakarta.apache.org/msg50578.html Basically, you cannot get access to the body content of a tag (or in your case replace a body-less tag) such as through the BodyContent object (subclass of JspWriter), alter its content, and then have it (re)process that content. Look to the future. Maybe JSP spec 1.3 will support this. jeff Galpin, Charles wrote: >>-----Original Message----- >>From: James Mitchell [mailto:[EMAIL PROTECTED]] >>Sent: Friday, May 10, 2002 1:49 PM >>To: Struts Users Mailing List >>Subject: RE: include a dynamically created page in my jsp >> >>Do you mean displaying your site text from a db table? >> >>Sorry, I guess I am not following what you are trying to do. >> > > Ok picture this - instead of a jsp include, or template call in my jsp page, > I want to dynamically grab some jsp/html text from a database and > include/parse/compile it at runtime - just like the container would do when > parsing the jsp file and creating a servlet which is actually running when > you access that jsp. > > So it would look something like... > > My.jsp: > > <my:dynamicInclude chunk="custom_search_form"/> > > DnamicIncludeTag.java: > > String dynamicJspPage = getDynamicJspPageFromDBOrBean(chunk); > // parse the string which contains jsp/html into a servlet > // like the container would do, execute it, and inject > // the output into the current response output. > > Clearer? > > Actually the real problem I'd like to solve is how to include some jsp that > is outside our application - in other words allow someone to change a few > select jsp files without unwarring our app. I think the answer is that you > don't. :) > > Tia > charles > > >>JM >> >>P.S. Please forgive my stupidity, I am a lawyer ;) >> > I'll forgive you this one time :) > > -- Jeffrey Bonevich Ann Arbor, Michigan [EMAIL PROTECTED] http://www.bonevich.com Hw�t! W� G�r-Dena in ge�r-dagum, peod-cyninga, prym gefr�non, h� �a aepelingas ellen fremedon! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

