-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
Dakota Jack wrote:
Not sure what you want. Does this help?
package whatever;
import java.io.File; import java.net.URL;
public final class Classpath {
public static final String SLASH = File.separator;
public static final String HERE =
Classpath.class.getClassLoader().getResource("whatever" + SLASH +
"Classpath.class").getFile();
}
On Tue, 25 Jan 2005 19:25:21 -0800 (PST), Martin Wegner <[EMAIL PROTECTED]> wrote:
As far as I can tell the attributes offer no insight. I have yet to find a way to get to the container from within a PlugIn. But I will keep looking. Using an initParam is not an option in this application.
--Marty
--- "Frank W. Zammetti" <[EMAIL PROTECTED]> wrote:
The OP was looking for a way to construct the entire path. I too got as
far as ServletContext, but I'm not sure what in it would give you that, or even all the pieces to constuct it... Maybe getAttribute()? I'm not sure what it will return, although you can use getAttributeNames() to see. The Javadocs indicates the attributes are container-specific though, so I'm not sure he'd want to use that anyway.
This is just a matter of curiosity for me at this point, I long ago solved this problem another way. I'd like to know how to do it though.
-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
Jim Barrows wrote:
On Tue, 25 Jan 2005 18:37:29 -0500, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
I seem to remember trying to solve this problem myself and coming to
the
conclusion that there was no way to do it independent of a request. I wound up just sticking it in my application config file that gets read in the plugin anyway. Can anyone prove me wrong? :)
Your looking for the application context correct? In the init you are passed the ActionServlet, which inherits from HttpServlet, which will give you the ServletContext. IIRC you can get the context from there.
-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
Martin Wegner wrote:
In have a Struts PlugIn that needs to determine the URL for the
containing
web application (http://localhost:8080/BlahBlahBlah/). I am unable
to
find a way to determine this information. Any ideas?
Thanks.
--Marty
--------------------------------------------------------------------- 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]
-- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com
--------------------------------------------------------------------- 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]