Application path available for non-WW classes

Eduardo Cordeiro <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <15235647.1150287022034.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
Hello there,

I've been using WebWork 2 on a project and the ServletContextAware interface on Actions to retrieve the path for certain folders in my webapp.

The problem is that this path is needed in DAO classes way below in the application's layered structure, so I need to pass down this path from actions that can retrieve it to where they're actually needed. This is really annoying because it has to be dealt with from several actions where the "real path" of something might be needed during the operation.

My questions is this: is there another way to retrieve the "real path" for a file without using the ServletContext supplied in a ServletContextAware action -- and from a class that is not WebWork-related? 

I've seen reference to a ClassLoaderUtil class in OSCore...would it be able to give me a resource without the need to specify the it's "real path"?

Thanks and regards,
Eduardo Cordeiro
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=34279&messageID=66706#66706

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.