Re: DTD Question

2002-06-01 Thread Adam Cohen

Thanks for the info James.
-Adam

"James Holmes" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> From the 1.1 code base:
>
> lines: 341 - 355
>
> /**
>  * The set of public identifiers, and
> corresponding resource names, for
>  * the versions of the configuration file DTDs
> that we know about.  There
>  * MUST be an even number of
> Strings in this list!
>  */
> protected String registrations[] = {
> "-//Apache Software Foundation//DTD Struts
> Configuration 1.0//EN",
>
> "/org/apache/struts/resources/struts-config_1_0.dtd",
> "-//Apache Software Foundation//DTD Struts
> Configuration 1.1//EN",
>
> "/org/apache/struts/resources/struts-config_1_1.dtd",
> "-//Sun Microsystems, Inc.//DTD Web
> Application 2.2//EN",
>
> "/org/apache/struts/resources/web-app_2_2.dtd",
> "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN",
> "/org/apache/struts/resources/web-app_2_3.dtd"
> };
>
>
> lines: 937 - 963
>
> /**
>  * Create (if needed) and return a new Digester
> instance that has been
>  * initialized to process Struts application
> configuraiton files and
>  * configure a corresponding ApplicationConfig
> object (which must be
>  * pushed on to the evaluation stack before
> parsing begins).
>  */
> protected Digester initConfigDigester() {
>
> // Do we have an existing instance?
> if (configDigester != null) {
> return (configDigester);
> }
>
> // Create and return a new Digester instance
> configDigester = new Digester();
> configDigester.setDebug(detail);
> configDigester.setNamespaceAware(true);
> configDigester.setValidating(validating);
> configDigester.setUseContextClassLoader(true);
> configDigester.addRuleSet(new
> ConfigRuleSet());
> for (int i = 0; i < registrations.length; i +=
> 2) {
> URL url =
> this.getClass().getResource(registrations[i+1]);
> if (url != null)
>
> configDigester.register(registrations[i],
> url.toString());
> }
> return (configDigester);
> }
>
>
> Similar code exists in the 1.0x code base as well.
>
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
>
>
>
> --- [EMAIL PROTECTED] wrote:
> >
> >
> >
> > James -
> >
> > Where is the code for this? Can I trace this from
> > the init() stuff in the
> > Action servlet?
> >
> > This is Struts and not Tomcat stuff?
> >
> > Appreciate any pointers
> >
> > Thanks,
> > Kevin
> >
> >
> >
> >
> > James Holmes <[EMAIL PROTECTED]> on 05/30/2002
> > 03:50:07 PM
> >
> > Please respond to "Struts Users Mailing List"
> >   <[EMAIL PROTECTED]>
> >
> > To:   Struts Users Mailing List
> > <[EMAIL PROTECTED]>
> > cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
> > Subject:  Re: DTD Question
> >
> >
> > What version of Struts are you using?  Struts 1.0
> > and
> > later use a resource locator that grabs the DTD from
> > the Struts Jar and should resolve DTDs very quickly.
> >
> > -james
> > [EMAIL PROTECTED]
> > http://www.jamesholmes.com/struts/
> >
> > --- Struts Newsgroup <[EMAIL PROTECTED]> wrote:
> > > Subject: DTD Question
> > > From: "Adam Cohen" <[EMAIL PROTECTED]>
> > >  ===
> > > I'm working on a web-app that is on a server that
> > > has no access to the web
> > > on port 80.
> > > When web.xml tries to get the dtd:
> > >  > > Inc.//DTD Web Application
> > > 2.2//EN"
> > > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > > The server waits for a long time for the request
> > to
> > > time out.
> > > I don't want to hard code a local path to the dtd
> > > and the server can't get
> > > accss to the web.
> > > Is there a better way to do?
> > > Thanks, Adam
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > __

RE: DTD Question - SIMPLE SOLUTION

2002-05-31 Thread Emaho, Ghoot

A simple way of bypassing the need to access the DTD externally (as the Struts 
'automatic' resolution within the jar does NOT always work - see mail archives) is to 
change the DOCTYPE def to something like the following:



where the dtd directory is a subdirectory of your WEB-INF directory. Copy the web_app 
dtd into that directory and it will be found there. Nice and simple.

NOTE it is still defined as 'PUBLIC'. There have been other posts about using the 
'SYSTEM' definition and looking locally, but this doesnt always work - depending on 
which server/setup you have.

However, the suggested method works all the time and on as many different environments 
as I've tried it.

Cheers

Ghoot Emaho

Lead Architect
Petrotechnics Ltd

> -Original Message-
> From: Struts Newsgroup (@Basebeans.com) [mailto:[EMAIL PROTECTED]]
> Sent: 30 May 2002 20:40
> To: [EMAIL PROTECTED]
> Subject: DTD Question
> 
> 
> Subject: DTD Question
> From: "Adam Cohen" <[EMAIL PROTECTED]>
>  ===
> I'm working on a web-app that is on a server that has no 
> access to the web
> on port 80.
> When web.xml tries to get the dtd:
>  Application
> 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> The server waits for a long time for the request to time out.
> I don't want to hard code a local path to the dtd and the 
> server can't get
> accss to the web.
> Is there a better way to do?
> Thanks, Adam
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> 
> For additional commands, e-mail: 
> 
> 
> 

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DTD Question

2002-05-31 Thread Adam Cohen

I'm using Struts 1.0.2 and the DTD from the Struts Jar does get used but it
is taking about 5 minutes on startup. I was under the assumption that it is
because the server can't go to the web.

I guess this could be more of a Tomcat issue than Struts. Good point.

-Adam

<[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
>
>
>
> James -
>
> Where is the code for this? Can I trace this from the init() stuff in the
> Action servlet?
>
> This is Struts and not Tomcat stuff?
>
> Appreciate any pointers
>
> Thanks,
> Kevin
>
>
>
>
> James Holmes <[EMAIL PROTECTED]> on 05/30/2002 03:50:07 PM
>
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
>
> To:   Struts Users Mailing List <[EMAIL PROTECTED]>
> cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:  Re: DTD Question
>
>
> What version of Struts are you using?  Struts 1.0 and
> later use a resource locator that grabs the DTD from
> the Struts Jar and should resolve DTDs very quickly.
>
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
>
> --- Struts Newsgroup <[EMAIL PROTECTED]> wrote:
> > Subject: DTD Question
> > From: "Adam Cohen" <[EMAIL PROTECTED]>
> >  ===
> > I'm working on a web-app that is on a server that
> > has no access to the web
> > on port 80.
> > When web.xml tries to get the dtd:
> >  > Inc.//DTD Web Application
> > 2.2//EN"
> > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > The server waits for a long time for the request to
> > time out.
> > I don't want to hard code a local path to the dtd
> > and the server can't get
> > accss to the web.
> > Is there a better way to do?
> > Thanks, Adam
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
>
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
>
>
>
>
>
>
>
> --
-
> This e-mail message (including attachments, if any) is intended for the
use
> of the individual or entity to which it is addressed and may contain
> information that is privileged, proprietary , confidential and exempt from
> disclosure.  If you are not the intended recipient, you are notified that
> any dissemination, distribution or copying of this communication is
> strictly prohibited.  If you have received this communication in error,
> please notify the sender and erase this e-mail message immediately.
> --
-
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: DTD Question

2002-05-30 Thread Andrew Hill

This case appears to be for the web.xml file. Does the servlet container
provide a way of specifying which entity resolver class to use?
Im rather suprised the server would go out to the web for the dtd. Id have
thought it would already know to resolve to a local copy for efficiency
reasons. Probably implementation dependant I guess. Perhaps David Thigpen's
earlier response may be the easiest solution?

One solution might be to run Apache on the same box and serve the DTD files
from it:

http://localhost/j2ee/dtds/web-app_2_2.dtd";>


-Original Message-
From: Struts Newsgroup [mailto:@[EMAIL PROTECTED]]
Sent: Friday, May 31, 2002 12:40
To: [EMAIL PROTECTED]
Subject: Re: DTD Question


Subject: Re: DTD Question
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Adam Cohen wrote:
> I'm working on a web-app that is on a server that has no access to the web
> on port 80.
> When web.xml tries to get the dtd:
>  2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> The server waits for a long time for the request to time out.
> I don't want to hard code a local path to the dtd and the server can't get
> accss to the web.
> Is there a better way to do?

http://wwws.sun.com/software/xml/developers/resolver/



--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: DTD Question

2002-05-30 Thread @Basebeans.com

Subject: Re: DTD Question
From: Serge Shikov <[EMAIL PROTECTED]>
 ===
Adam Cohen wrote:
> I'm working on a web-app that is on a server that has no access to the web
> on port 80.
> When web.xml tries to get the dtd:
>  2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> The server waits for a long time for the request to time out.
> I don't want to hard code a local path to the dtd and the server can't get
> accss to the web.
> Is there a better way to do?

http://wwws.sun.com/software/xml/developers/resolver/



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: DTD Question

2002-05-30 Thread James Holmes

>From the 1.1 code base:

lines: 341 - 355

/**
 * The set of public identifiers, and
corresponding resource names, for
 * the versions of the configuration file DTDs
that we know about.  There
 * MUST be an even number of
Strings in this list!
 */
protected String registrations[] = {
"-//Apache Software Foundation//DTD Struts
Configuration 1.0//EN",
   
"/org/apache/struts/resources/struts-config_1_0.dtd",
"-//Apache Software Foundation//DTD Struts
Configuration 1.1//EN",
   
"/org/apache/struts/resources/struts-config_1_1.dtd",
"-//Sun Microsystems, Inc.//DTD Web
Application 2.2//EN",
   
"/org/apache/struts/resources/web-app_2_2.dtd",
"-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN",
"/org/apache/struts/resources/web-app_2_3.dtd"
};


lines: 937 - 963

/**
 * Create (if needed) and return a new Digester
instance that has been
 * initialized to process Struts application
configuraiton files and
 * configure a corresponding ApplicationConfig
object (which must be
 * pushed on to the evaluation stack before
parsing begins).
 */
protected Digester initConfigDigester() {

// Do we have an existing instance?
if (configDigester != null) {
return (configDigester);
}

// Create and return a new Digester instance
configDigester = new Digester();
configDigester.setDebug(detail);
configDigester.setNamespaceAware(true);
configDigester.setValidating(validating);
configDigester.setUseContextClassLoader(true);
configDigester.addRuleSet(new
ConfigRuleSet());
for (int i = 0; i < registrations.length; i +=
2) {
URL url =
this.getClass().getResource(registrations[i+1]);
if (url != null)
   
configDigester.register(registrations[i],
url.toString());
}
return (configDigester);
}


Similar code exists in the 1.0x code base as well.

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/



--- [EMAIL PROTECTED] wrote:
> 
> 
> 
> James -
> 
> Where is the code for this? Can I trace this from
> the init() stuff in the
> Action servlet?
> 
> This is Struts and not Tomcat stuff?
> 
> Appreciate any pointers
> 
> Thanks,
> Kevin
> 
> 
> 
> 
> James Holmes <[EMAIL PROTECTED]> on 05/30/2002
> 03:50:07 PM
> 
> Please respond to "Struts Users Mailing List"
>   <[EMAIL PROTECTED]>
> 
> To:   Struts Users Mailing List
> <[EMAIL PROTECTED]>
> cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
> Subject:  Re: DTD Question
> 
> 
> What version of Struts are you using?  Struts 1.0
> and
> later use a resource locator that grabs the DTD from
> the Struts Jar and should resolve DTDs very quickly.
> 
> -james
> [EMAIL PROTECTED]
> http://www.jamesholmes.com/struts/
> 
> --- Struts Newsgroup <[EMAIL PROTECTED]> wrote:
> > Subject: DTD Question
> > From: "Adam Cohen" <[EMAIL PROTECTED]>
> >  ===
> > I'm working on a web-app that is on a server that
> > has no access to the web
> > on port 80.
> > When web.xml tries to get the dtd:
> >  > Inc.//DTD Web Application
> > 2.2//EN"
> > "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > The server waits for a long time for the request
> to
> > time out.
> > I don't want to hard code a local path to the dtd
> > and the server can't get
> > accss to the web.
> > Is there a better way to do?
> > Thanks, Adam
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> __
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <
> mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
> mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> 
> 
>
---
> This e-mail message (including attachments, if any)
> is intended for the use
> of the individual or entity to which it is addressed
> and may contain
> information that is privileged, proprietary ,
> confidential and exempt from
> disclosure.  If you are not the intended recipient,
> you are notified that
> any dissemination, distribution or copying of this
> communication is
> strictly prohibited.  If you have received this
> communication in error,
> please notify the sender and erase this e-mail
> message immediately.
>
---
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: DTD Question

2002-05-30 Thread Kevin . Bedell




James -

Where is the code for this? Can I trace this from the init() stuff in the
Action servlet?

This is Struts and not Tomcat stuff?

Appreciate any pointers

Thanks,
Kevin




James Holmes <[EMAIL PROTECTED]> on 05/30/2002 03:50:07 PM

Please respond to "Struts Users Mailing List"
  <[EMAIL PROTECTED]>

To:   Struts Users Mailing List <[EMAIL PROTECTED]>
cc:(bcc: Kevin Bedell/Systems/USHO/SunLife)
Subject:  Re: DTD Question


What version of Struts are you using?  Struts 1.0 and
later use a resource locator that grabs the DTD from
the Struts Jar and should resolve DTDs very quickly.

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

--- Struts Newsgroup <[EMAIL PROTECTED]> wrote:
> Subject: DTD Question
> From: "Adam Cohen" <[EMAIL PROTECTED]>
>  ===
> I'm working on a web-app that is on a server that
> has no access to the web
> on port 80.
> When web.xml tries to get the dtd:
>  Inc.//DTD Web Application
> 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> The server waits for a long time for the request to
> time out.
> I don't want to hard code a local path to the dtd
> and the server can't get
> accss to the web.
> Is there a better way to do?
> Thanks, Adam
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>







---
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: DTD Question

2002-05-30 Thread Nelson, Laird

> -Original Message-
> From: James Holmes [mailto:[EMAIL PROTECTED]]
> What version of Struts are you using?  Struts 1.0 and
> later use a resource locator that grabs the DTD from
> the Struts Jar and should resolve DTDs very quickly.

In case the original poster is working under Visual Age for Java, where once
you've imported the struts source code into the repository it never gets
officially built, he'll need to ensure that his test environment is actually
getting the struts classes and resources from the struts.jar and not from
the Visual Age repository.  If it *is* getting those things from the VAJ
repository, then the DTD resolution will not happen properly, because the
org/apache/struts/resources/ doesn't exist unless a
"real" build is run.

Shooting in the dark,
Laird

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: DTD Question

2002-05-30 Thread Thigpen, David

What do you mean by "no access to the web on port 80?"  

One solution might be to run Apache on the same box and serve the DTD files from it:

http://localhost/j2ee/dtds/web-app_2_2.dtd";>

DT

-Original Message-
From: Struts Newsgroup (@Basebeans.com) [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 30, 2002 1:40 PM
To: [EMAIL PROTECTED]
Subject: DTD Question


Subject: DTD Question
From: "Adam Cohen" <[EMAIL PROTECTED]>
 ===
I'm working on a web-app that is on a server that has no access to the web
on port 80.
When web.xml tries to get the dtd:
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
The server waits for a long time for the request to time out.
I don't want to hard code a local path to the dtd and the server can't get
accss to the web.
Is there a better way to do?
Thanks, Adam



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: DTD Question

2002-05-30 Thread James Holmes

What version of Struts are you using?  Struts 1.0 and
later use a resource locator that grabs the DTD from
the Struts Jar and should resolve DTDs very quickly.

-james
[EMAIL PROTECTED]
http://www.jamesholmes.com/struts/

--- Struts Newsgroup <[EMAIL PROTECTED]> wrote:
> Subject: DTD Question
> From: "Adam Cohen" <[EMAIL PROTECTED]>
>  ===
> I'm working on a web-app that is on a server that
> has no access to the web
> on port 80.
> When web.xml tries to get the dtd:
>  Inc.//DTD Web Application
> 2.2//EN"
> "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> The server waits for a long time for the request to
> time out.
> I don't want to hard code a local path to the dtd
> and the server can't get
> accss to the web.
> Is there a better way to do?
> Thanks, Adam
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> 
> For additional commands, e-mail:
> 
> 


__
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

--
To unsubscribe, e-mail:   
For additional commands, e-mail: