You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Upkar Saimbi <us...@cy-nap.com> on 2005/12/09 11:37:20 UTC
Using CatalogManager in Struts
Hello, I'd like to be able to use local versions of the struts DTDs -
configuring them within a Catalog xml file. I need to use something
called a resolver with my parser but I haven't the foggiest idea how I
can do this. I have my Catalog.properties file and catalog.xml files set
up in my WEB-INF/classes webapp directory, I just don't know how to get
struts to refer to it.
Please help....
Thanks.
Upkar Saimbi
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Using local versions of struts DTDs
Posted by Michael Jouravlev <jm...@gmail.com>.
On 12/12/05, Upkar Saimbi <us...@cy-nap.com> wrote:
> Hello,
>
> I'd like to be able to use local versions of the struts DTDs - does
> anyone know how I can do this?
<!DOCTYPE struts-config SYSTEM "here goes path to your dtd file">
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Using local versions of struts DTDs
Posted by Upkar Saimbi <us...@cy-nap.com>.
Hello,
I'd like to be able to use local versions of the struts DTDs - does
anyone know how I can do this?
Thanks.
Upkar Saimbi
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Using CatalogManager in Struts
Posted by Craig McClanahan <cr...@apache.org>.
On 12/9/05, Upkar Saimbi <us...@cy-nap.com> wrote:
>
> Hello, I'd like to be able to use local versions of the struts DTDs -
> configuring them within a Catalog xml file. I need to use something
> called a resolver with my parser but I haven't the foggiest idea how I
> can do this. I have my Catalog.properties file and catalog.xml files set
> up in my WEB-INF/classes webapp directory, I just don't know how to get
> struts to refer to it.
Struts does *exactly* the same thing when it parses your
struts-config.xmlfiles, so it would be helpful for you to see how
that's done (using Commons
Digester). Check out the initConfigDigester() method of
org.apache.struts.action.ActionServlet, and notice how it uses the
register() method of the Digester instance to register local copies of the
Struts DTDs.
Internally, what's going on is a string like
"/org/apache/struts/resources/struts_config_1_2.dtd" (which points at a
resource file included in struts.jar) is being turned into a URL by calling
ServletContext.getResource() -- exactly what you need to gain access to
anything stored under WEB-INF/classes or WEB-INF/lib.
Please help....
>
> Thanks.
>
> Upkar Saimbi
Craig McClanahan
Re: Using CatalogManager in Struts
Posted by Craig McClanahan <cr...@apache.org>.
On 12/9/05, Upkar Saimbi <us...@cy-nap.com> wrote:
>
> Hello, I'd like to be able to use local versions of the struts DTDs -
> configuring them within a Catalog xml file. I need to use something
> called a resolver with my parser but I haven't the foggiest idea how I
> can do this. I have my Catalog.properties file and catalog.xml files set
> up in my WEB-INF/classes webapp directory, I just don't know how to get
> struts to refer to it.
Struts does *exactly* the same thing when it parses your
struts-config.xmlfiles, so it would be helpful for you to see how
that's done (using Commons
Digester). Check out the initConfigDigester() method of
org.apache.struts.action.ActionServlet, and notice how it uses the
register() method of the Digester instance to register local copies of the
Struts DTDs.
Internally, what's going on is a string like
"/org/apache/struts/resources/struts_config_1_2.dtd" (which points at a
resource file included in struts.jar) is being turned into a URL by calling
ServletContext.getResource() -- exactly what you need to gain access to
anything stored under WEB-INF/classes or WEB-INF/lib.
Please help....
>
> Thanks.
>
> Upkar Saimbi
Craig McClanahan