You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Frank W. Zammetti" <fz...@omnytex.com> on 2007/04/10 05:47:18 UTC

Somewhat OT: Forward to JSP in JAR file

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!

Frank


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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Richard Wallace <rw...@thewallacepack.net>.
Thanks for the suggestions everyone.  I decided to do this using 
Freemarker after all.

Kertis, Dennis wrote:
> 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:fzlists@omnytex.com] 
> 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: fzammetti@hotmail.com
> 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>>>> additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>         
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: Somewhat OT: Forward to JSP in JAR file

Posted by "Kertis, Dennis" <dk...@vocollect.com>.
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:fzlists@omnytex.com] 
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: fzammetti@hotmail.com
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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>>> additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
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: fzammetti@hotmail.com
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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>>> additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Lance <la...@marketpipe.com>.
I was doing this sort of dodgy thing at one stage, dynamically writing 
jsp's to the filesystem

To get the real path of the webroot you can use the following code:
String webroot = pageContext.getServletContext().getRealPath("/");
if (!webroot.endsWith("/")) {
   webroot += '/';
}

 From memory this worked on jboss on windows but I think I came across 
problems when testing on weblogic or websphere (can't remember) on unix.
I was not allowed to write to the filesystem, i didn't resolve the issue 
which could have been down to file permissions, I ended up abandoning 
what I was doing.

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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>>> additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>       
>>     
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Musachy Barroso <mu...@gmail.com>.
You define a plugin with a constant named "extensionId" that has some unique
name, inside that plugin you define your actions like

<constant name="extensionId" value="myplugin"

<action ... namespace="myplugin/otherstuff">
   <interceptor-ref name="extensions" />
   <result>${extensionId}/MyJsp.jsp</result>
</action>

where MyJsp.jsp is a jsp that will be in a subdir under "s2resources". I
have a context listener that searches the class path for the "s2resources"
folder and uncompress it beneath a folder with the name defined in the
"extensionId" constant. When the action is invoked, the interceptor
"extensions" will get the first part of the namespace, in this case
"myplugin" and build the path to the subfolder that has the resources for
this plugin, and push it into the Value Stack with the name "extensionId" so
the result path points to the right jsp. I can post the code if anyone is
interested. At the end I think it is just easier to use FreeMarker which
works from inside the classpath.

musachy

//I did say it was a hack right? :)

On 4/25/07, Leon Rosenberg <ro...@googlemail.com> wrote:
>
> another cheap workaround i'm currently using, is to unpack the jsps
> from jars in the ant script which builds the war file:
>
> <unjar src="${packlib}/moskito-webui-jsps.jar" dest="${output.webapp }"/>
>
> in this case the jar file was specially prepared previously, but you
> can also tell unjar task to unjar the jsps only.
>
> regards
> Leon
>
>
> On 4/25/07, Zoran Avtarovski < zoran@sparecreative.com> wrote:
> > Just an idea, but couldn't you use pre-compiled jsp pages. This way
> they're
> > available as servlets.
> >
> > I remember looking at the Jrun admin console which uses precompiled
> jsps.
> >
> > Z.
> >
> > > 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
> > >>> additional commands, e-mail: user-help@struts.apache.org
> > >>>
> > >>>
> > >>
> > >>
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Somewhat OT: Forward to JSP in JAR file

Posted by Leon Rosenberg <ro...@googlemail.com>.
another cheap workaround i'm currently using, is to unpack the jsps
from jars in the ant script which builds the war file:

<unjar src="${packlib}/moskito-webui-jsps.jar" dest="${output.webapp}"/>

in this case the jar file was specially prepared previously, but you
can also tell unjar task to unjar the jsps only.

regards
Leon


On 4/25/07, Zoran Avtarovski <zo...@sparecreative.com> wrote:
> Just an idea, but couldn't you use pre-compiled jsp pages. This way they're
> available as servlets.
>
> I remember looking at the Jrun admin console which uses precompiled jsps.
>
> Z.
>
> > 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
> >>> additional commands, e-mail: user-help@struts.apache.org
> >>>
> >>>
> >>
> >>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Zoran Avtarovski <zo...@sparecreative.com>.
Just an idea, but couldn't you use pre-compiled jsp pages. This way they're
available as servlets.

I remember looking at the Jrun admin console which uses precompiled jsps.

Z.

> 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>>> additional commands, e-mail: user-help@struts.apache.org
>>> 
>>> 
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Richard Wallace <rw...@thewallacepack.net>.
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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org For
>> additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Leon Rosenberg <ro...@googlemail.com>.
resin does, tomcat doesnt.
:-)
Leon

On 4/10/07, Musachy Barroso <mu...@gmail.com> 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Musachy Barroso <mu...@gmail.com>.
The thing is that with current plugins you can add stuff to the framework,
but I want a way to plugin stuff into my application, not the framework
alone, ala eclipse. So I could plugin actions, with their jsps or whathever
they use, and have extension points in my application that get extended by
the plugins, my first shot was OSGi, but I quited before committing suicide
:)

musachy

On 4/10/07, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
> Sounds cool Musachy!  I could see that being a useful thing for sure.
>
> Thanks Laurie, that's what I was thinking was the case... I'd need to do
> it in a compliant way, so I'll have to go with my backup plan instead.
> Thanks guys.
>
> Frank
>
> 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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> >
>
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> AIM/Yahoo: fzammetti
> MSN: fzammetti@hotmail.com
> Author of "Practical Ajax Projects With Java Technology"
>   (2006, Apress, ISBN 1-59059-695-1)
> Java Web Parts - http://javawebparts.sourceforge.net
>   Supplying the wheel, so you don't have to reinvent it!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Somewhat OT: Forward to JSP in JAR file

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
Sounds cool Musachy!  I could see that being a useful thing for sure.

Thanks Laurie, that's what I was thinking was the case... I'd need to do 
it in a compliant way, so I'll have to go with my backup plan instead. 
Thanks guys.

Frank

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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

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

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Somewhat OT: Forward to JSP in JAR file

Posted by Musachy Barroso <mu...@gmail.com>.
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 <la...@holoweb.net> 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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

Re: Somewhat OT: Forward to JSP in JAR file

Posted by Laurie Harper <la...@holoweb.net>.
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org