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 <[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]

Reply via email to