You should probably just use Freemarker instead of making your own.  It
will work no problem by placing the template files in with your source
code and references them by the directory structure off the root of your
classpath.


-----Original Message-----
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 25, 2007 9:46 AM
To: Struts Users Mailing List
Subject: Re: Somewhat OT: Forward to JSP in JAR file

Well, I *sort of* found a solution... I couldn't literally do what I 
wanted, that seems all but impossible in a cross-container way (a 
compiled JSP servlet won't work because its specific to the container 
that compiled it, and writing to the file system won't work if run from 
an EAR without knowing about the environment more than I want), so 
instead I essentially created my own template system... Since I really 
just needed some straightforward token replacements, it wasn't an 
especially big deal.  I may investigate Freemarker or something similar,

but I "solved" it by going around it in the end :)

Frank


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM/Yahoo: fzammetti
MSN: [EMAIL PROTECTED]
Author of "Practical Ajax Projects With Java Technology"
  (2006, Apress, ISBN 1-59059-695-1)
and "JavaScript, DOM Scripting and Ajax Projects"
  (2007, Apress, ISBN 1-59059-816-4)
Java Web Parts - http://javawebparts.sourceforge.net
  Supplying the wheel, so you don't have to reinvent it!

Richard Wallace wrote:
> Do you have anything on the forwarding to a JSP in a JAR file that you
> can tell us about?  I'm running into the same situation where I work
> and can't figure out a solution.  I had thought that maybe if I
> forwarded to something like /struts/jsps/test.jsp and add the package
> that jsps are contained in to the filter I could access it that way.
> That sort of works.  What I wind up getting is the unparsed JSP.  So,
> I was thinking that I could instead extract the JSP I'm trying to get
> to the filesystem and forward to that, but that seems messy.
> 
> Did you find a good way to accomplish this?
> 
> Thanks,
> Rich
> 
> Musachy Barroso wrote:
>> I'm working on an Struts plugin to try to work around (more like
>> hack around)  that and other fun stuff :)
>>
>> musachy
>>
>> On 4/10/07, Laurie Harper <[EMAIL PROTECTED]> wrote:
>>> Frank W. Zammetti wrote:
>>>> Quick question... can anyone tell me if it's possible to
>>>> forward
>>> to a
>>>> JSP that is stored in a JAR file (i.e., in a JAR located in
>>>> WEB-INF/lib), and if so, how?  I couldn't find a quick answer
>>>> on the first few pages of Googling, figured someone here would
>>>> probably
>>> know
>>>> off the top of their heads.  Thanks!
>>> Not in any standard way, no. There may be container-specific
>>> solutions, but you'd be working outside the spec.
>>>
>>> L.
>>>
>>>
>>>
---------------------------------------------------------------------
>>>  To unsubscribe, e-mail: [EMAIL PROTECTED] For
>>> additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to