Re: dtd validation of tld's

2004-03-15 Thread Adam Hardy
On 03/15/2004 12:52 AM hanasaki wrote:
I am using whatever is in tomcat 4.1.24.  Not sure what version of 
xerces that is or how to find out.
Neither am I, I'm afraid. Perhaps someone can jump in with the answer.




Funny thing is it worked some time ago.  The project just came out of 
5mo mothballs.



Adam Hardy wrote:

On 03/14/2004 08:59 PM hanasaki wrote:

Any thoughts on why Tomcat would be giving an error saying:

Digester error... SEVERE Parse error Document is invalid: no grammar 
found

This is happening on all TLD's.  They are JSTL and Struts.   I am 
thinking it has something to do with the DTD specified in the TLD as 
an http:... and having only intermittent Internet connectivity.  The 
need is to find away around this issue while still using xml 
validation and not modifying the TLD's from the downloaded distribution.

Are you using xerces 2.6.1?

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



--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: dtd validation of tld's

2004-03-14 Thread hanasaki
I am using whatever is in tomcat 4.1.24.  Not sure what version of 
xerces that is or how to find out.

Funny thing is it worked some time ago.  The project just came out of 
5mo mothballs.



Adam Hardy wrote:
On 03/14/2004 08:59 PM hanasaki wrote:

Any thoughts on why Tomcat would be giving an error saying:

Digester error... SEVERE Parse error Document is invalid: no grammar 
found

This is happening on all TLD's.  They are JSTL and Struts.   I am 
thinking it has something to do with the DTD specified in the TLD as 
an http:... and having only intermittent Internet connectivity.  The 
need is to find away around this issue while still using xml 
validation and not modifying the TLD's from the downloaded distribution.

Are you using xerces 2.6.1?

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


Re: dtd validation of tld's

2004-03-14 Thread Adam Hardy
On 03/14/2004 08:59 PM hanasaki wrote:
Any thoughts on why Tomcat would be giving an error saying:

Digester error... SEVERE Parse error Document is invalid: no grammar 
found

This is happening on all TLD's.  They are JSTL and Struts.   I am 
thinking it has something to do with the DTD specified in the TLD as an 
http:... and having only intermittent Internet connectivity.  The need 
is to find away around this issue while still using xml validation and 
not modifying the TLD's from the downloaded distribution.

Are you using xerces 2.6.1?

--
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: dtd check on validation.xml: date pattern

2003-10-31 Thread Yansheng Lin
I think you can do something like this:



Don't know exact syntax though unfortunately:).


-Original Message-
From: Robert Lamping [mailto:[EMAIL PROTECTED] 
Sent: October 31, 2003 4:09 PM
To: Struts Users Mailing List
Subject: dtd check on validation.xml: date pattern


I made a stupid mistake. I intended to validate a date and entered the
following




Pattern
dd-MM-



On one machine this worked, as the DateFormat.SHORT format was obviously the
one I intended.
But at my laptop fortunately this didn't work, so I found the error. 

"Pattern" of course should be datePattern or datePatternStrict.

I tried to check the validation.xml with the dtd by adding the dtd to the
XML file and placing the dtd-file in the same directory as the
validation.xml.
With a XML plugin for Eclipse I can validate the 



I would like to limit var-name to certain values. Like datePattern, min,
max, maxLenght etc. 
As I don't know enough about DTDs, my question is: how do I built in such a
dtd-check?

Kind regards,

Robert Lamping
The Netherlands


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



RE: DTD

2002-09-26 Thread Ditlinger, Steve


Hi Jeff:

It appears you have a mismatch of identifier (1.1) with DTD (1.0) in your
!DOCTYPE tag.  Change your identifier to 1.0 to be consistent with the DTD
URL and then your app should work whether the struts site is up or not.
(Assuming your app is a Struts 1.0 app) 

The ActionServlet will use the DTD in the struts.jar if it recognizes the
identifier.  That's what we've been doing with Struts 1.1 successfully on a
server with no web access.

Good luck,
Steve


-Original Message-
From: Lowe, Jeff [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 7:49 AM
To: 'Struts Users Mailing List'
Subject: DTD


I'm new to this list, so forgive me if this question has been posted
recently.

Yesterday my Struts application stopped working.  I finally traced the
problem to the following line in struts-config.xml:

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>

Apparantly the Apache domain was unavailable for awhile on the web and this
caused the parser to hang.  (I was surprised not to see any mention of this
anywhere.  I would have thought that Struts apps all around the world would
have stopped working.)

To fix the problem I placed a copy of struts-config_1_0.dtd in the same
directory as struts-config.xml and changed the reference to:



When I start the application, I get a parser error stating that it can't
find the resource in the directory that the VM (i.e. Weblogic) was started
from.  According to the XML spec, the SYSTEM specifier should tell the
parser to look for the resource in a path relative to struts-config.xml, in
this case - the same directory.  Anyone have any insight into this?

Thanks,
-Jeff

Jeff Lowe
Software Architect
CELT Corporation
199 Forest St.
Marlboro, MA 01752

508-624-4474 x1237
[EMAIL PROTECTED]


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




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: 




RE: DTD validation

2002-01-24 Thread Witt, Mike (OH35)

I put the web.xml dtd in WEB-INF\lib and do not specify a system dtd 
for the struts-config.xml.  Tomcat seems to find this one just fine in 
the struts.jar.

-Original Message-
From: Jin Bal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:57 AM
To: Struts Users Mailing List
Subject: Re: DTD validation


I'm compiling from source and and the dtd's are in WEB-INF is this the right
place for them?

Also the validating param in the web.xml is already set to false howver we
still had probs...

Thanks
Jin
- Original Message -
From: "James Holmes" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 2:47 PM
Subject: RE: DTD validation


> Struts uses its own DTD resolver and *should* be able
> to resolve DTDs with or without a connection to the
> internet.
>
> I would not comment out the DOCTYPE declaration in the
> config files. If you do not want your config files
> validated for some reason you can turn this "off" by
> setting the "validating"  for the
> ActionServlet in your web.xml file to "false".
>
> -james
> [EMAIL PROTECTED]
> http:[EMAIL PROTECTED]/struts/
>
>
> > -Original Message-
> > From: Jin Bal [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 24, 2002 5:13 AM
> > To: Struts Users Mailing List
> > Subject: DTD validation
> >
> >
> > How do I cleanly switch off or force struts and the
> > web.xml to validate the
> > dtds that are on my local machine as opposed to
> > trying to resolve the url
> > declared in the xml file (which sometimes can be
> > unavailable).
> >
> > I've commented out the doctype declaration as a stop
> > gap measure but this
> > isn't an ideal situation
> >
> > Thanks
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
>
> __
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
>
> --
> 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]>

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




RE: DTD validation

2002-01-24 Thread Witt, Mike (OH35)

I realize the struts-config.xml dtd is in the struts.jar 
and this seems to work fine on tomcat.  But, on iPlanet, 
I was unable to get this to work.

-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:47 AM
To: Struts Users Mailing List
Subject: RE: DTD validation


Struts uses its own DTD resolver and *should* be able
to resolve DTDs with or without a connection to the
internet.

I would not comment out the DOCTYPE declaration in the
config files. If you do not want your config files
validated for some reason you can turn this "off" by
setting the "validating"  for the
ActionServlet in your web.xml file to "false".

-james
[EMAIL PROTECTED]
http:[EMAIL PROTECTED]/struts/


> -Original Message-
> From: Jin Bal [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 5:13 AM
> To: Struts Users Mailing List
> Subject: DTD validation
> 
> 
> How do I cleanly switch off or force struts and the
> web.xml to validate the
> dtds that are on my local machine as opposed to
> trying to resolve the url
> declared in the xml file (which sometimes can be
> unavailable).
> 
> I've commented out the doctype declaration as a stop
> gap measure but this
> isn't an ideal situation
> 
> Thanks
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

--
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 validation

2002-01-24 Thread Jin Bal

I'm compiling from source and and the dtd's are in WEB-INF is this the right
place for them?

Also the validating param in the web.xml is already set to false howver we
still had probs...

Thanks
Jin
- Original Message -
From: "James Holmes" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 24, 2002 2:47 PM
Subject: RE: DTD validation


> Struts uses its own DTD resolver and *should* be able
> to resolve DTDs with or without a connection to the
> internet.
>
> I would not comment out the DOCTYPE declaration in the
> config files. If you do not want your config files
> validated for some reason you can turn this "off" by
> setting the "validating"  for the
> ActionServlet in your web.xml file to "false".
>
> -james
> [EMAIL PROTECTED]
> http:[EMAIL PROTECTED]/struts/
>
>
> > -Original Message-
> > From: Jin Bal [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 24, 2002 5:13 AM
> > To: Struts Users Mailing List
> > Subject: DTD validation
> >
> >
> > How do I cleanly switch off or force struts and the
> > web.xml to validate the
> > dtds that are on my local machine as opposed to
> > trying to resolve the url
> > declared in the xml file (which sometimes can be
> > unavailable).
> >
> > I've commented out the doctype declaration as a stop
> > gap measure but this
> > isn't an ideal situation
> >
> > Thanks
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
>
>
> __
> Do You Yahoo!?
> Great stuff seeking new owners in Yahoo! Auctions!
> http://auctions.yahoo.com
>
> --
> 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 validation

2002-01-24 Thread Andrew B Forman

we have the same problem
so we just turned off the
dtd validation in the web.xml


action
org.apache.struts.action.ActionServlet
  ...


 validating
 false


  

_\|/___
  generation-d development
  andrew b forman 

> -Original Message-
> From: Witt, Mike (OH35) [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 8:38 AM
> To: Struts Users Mailing List
> Subject: RE: DTD validation
> 
> 
> You can have a public and a system doctype tag.  Though, I've 
> found problems
> with this because our production machine is a Solaris server 
> using Iplanet,
> and I am developing on a NT box with tomcat.  So I'm always doctoring the
> tags to make them work on my local box and then undoctoring them before
> checkin.
> 
> Mike
> 
> -Original Message-
> From: Jin Bal [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 5:13 AM
> To: Struts Users Mailing List
> Subject: DTD validation
> 
> 
> How do I cleanly switch off or force struts and the web.xml to 
> validate the
> dtds that are on my local machine as opposed to trying to resolve the url
> declared in the xml file (which sometimes can be unavailable).
> 
> I've commented out the doctype declaration as a stop gap measure but this
> isn't an ideal situation
> 
> Thanks
> 
> --
> 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]>
> 

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




RE: DTD validation

2002-01-24 Thread James Holmes

Struts uses its own DTD resolver and *should* be able
to resolve DTDs with or without a connection to the
internet.

I would not comment out the DOCTYPE declaration in the
config files. If you do not want your config files
validated for some reason you can turn this "off" by
setting the "validating"  for the
ActionServlet in your web.xml file to "false".

-james
[EMAIL PROTECTED]
http:[EMAIL PROTECTED]/struts/


> -Original Message-
> From: Jin Bal [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 5:13 AM
> To: Struts Users Mailing List
> Subject: DTD validation
> 
> 
> How do I cleanly switch off or force struts and the
> web.xml to validate the
> dtds that are on my local machine as opposed to
> trying to resolve the url
> declared in the xml file (which sometimes can be
> unavailable).
> 
> I've commented out the doctype declaration as a stop
> gap measure but this
> isn't an ideal situation
> 
> Thanks
> 
> --
> To unsubscribe, e-mail:
> 
> For additional commands, e-mail:
> 


__
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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




RE: DTD validation

2002-01-24 Thread Witt, Mike (OH35)

You can have a public and a system doctype tag.  Though, I've found problems
with this because our production machine is a Solaris server using Iplanet,
and I am developing on a NT box with tomcat.  So I'm always doctoring the
tags to make them work on my local box and then undoctoring them before
checkin.

Mike

-Original Message-
From: Jin Bal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 5:13 AM
To: Struts Users Mailing List
Subject: DTD validation


How do I cleanly switch off or force struts and the web.xml to validate the
dtds that are on my local machine as opposed to trying to resolve the url
declared in the xml file (which sometimes can be unavailable).

I've commented out the doctype declaration as a stop gap measure but this
isn't an ideal situation

Thanks

--
To unsubscribe, e-mail:

For additional commands, e-mail:


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




RE: DTD Reference Problem Encountered while exercise the Struts Employeelist Example in VAJ WTE 3.5.3

2001-08-02 Thread Assenza, Chris

That message indicates that your change worked as far as WTE/WAS is
concerned. :) Didn't it get any further this time?

Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 02, 2001 10:04 AM
To: [EMAIL PROTECTED]
Subject: RE: DTD Reference Problem Encountered while exercise the Struts
Employeelist Example in VAJ WTE 3.5.3


Hi,
 I put struts-config_1_0.dtd  into my local c:\ root directory and then
used 
inside my struts-config.xml declaration, then I got following message

 ".. resolveEntity('null', 'file:/c:/struts-config_1_0.dtd') Not
registered, use system identifier..."

 Anyone can tell me what's wrong with my configuration and how to solve
this problem? Any inputs will be appreciated.

Rongbin





[EMAIL PROTECTED] on 08/01/2001 05:08:49 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  RE: DTD Reference Problem Encountered while exercise the Struts E
  mployeelist Example in VAJ WTE 3.5.3


Just for the sake of getting it working and at the expense of hard-coding,
extract the DTD's to some location on your drive and make the doctype
declaration look like:



Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 4:31 PM
To: [EMAIL PROTECTED]
Subject: DTD Reference Problem Encountered while exercise the Struts
Employeelist Example in VAJ WTE 3.5.3


Hi,

 I tried  to exercise the employeelist example in my VAJ 3.5.3
environment. I
encountered a problem of locating a DTD file while starting Servlet Engine
listed below:

 (1) When I used http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
 within the struts-config.xml
 I got error message of
".. External entity not
found:"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";.


 (2) When I tried to use http://localhost:8080/WEB-INF/struts-config_1_0.dtd";> or
 
 within the struts-config.xml
 I got error message of
".. Relative URI "/WEB-INF/struts-config_1_0.dtd"; cannot be resolved
without a document root URI".


 If someone can give me solutions or suggestions on how to fix this
problem, it will be appreciated.

Rongbin Cai
[EMAIL PROTECTED]









RE: DTD Reference Problem Encountered while exercise the Struts Employeelist Example in VAJ WTE 3.5.3

2001-08-01 Thread Assenza, Chris

Just for the sake of getting it working and at the expense of hard-coding,
extract the DTD's to some location on your drive and make the doctype
declaration look like: 



Chris

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, August 01, 2001 4:31 PM
To: [EMAIL PROTECTED]
Subject: DTD Reference Problem Encountered while exercise the Struts
Employeelist Example in VAJ WTE 3.5.3


Hi,

 I tried  to exercise the employeelist example in my VAJ 3.5.3
environment. I
encountered a problem of locating a DTD file while starting Servlet Engine
listed below:

 (1) When I used http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>
 within the struts-config.xml
 I got error message of
".. External entity not
found:"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";.


 (2) When I tried to use http://localhost:8080/WEB-INF/struts-config_1_0.dtd";> or
 
 within the struts-config.xml
 I got error message of
".. Relative URI "/WEB-INF/struts-config_1_0.dtd"; cannot be resolved
without a document root URI".


 If someone can give me solutions or suggestions on how to fix this
problem, it will be appreciated.

Rongbin Cai
[EMAIL PROTECTED]




Re: DTD Incompatibility With WebLogic 5.1 and Struts 1.0?

2001-06-26 Thread Mikael Eriksson

Hello!

 This was a bug that existed in earlier versions of 5.1 but it was fixed at
around service pack 5. So it seems that your configuration are not
picking up the service pack properly.
  When I manage to fail to pick up a service pack its usually becuase
I misremember where the service pack jar files are :-)
 You can use the weblogic console to find out what service pack
that really is loaded on a server.

  Regards
  Mikael Eriksson


  
  



"Hohlen, John" wrote:

> Has anyone ever seen the following Document Type Definition (DTD) error
> message upon starting the WebLogic 5.1 (SP 8) server using Struts 1.0 on NT?
> This occurs using both the Struts-Example and Struts-Documentation war
> files:
>
> "[ExternalEntity] : Could not resolve entity '-//Sun Microsystems, Inc.//DTD
> Web
> Application 2.2//EN'.  Check your dtd reference."
>
> The way I fixed this error was modifying the DocType data in the web.xml
> file.  Specifically, the line:
>
>  2.2//EN" "http: //java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> If I change the "DTD Web Application 2.2" to "DTD Web Application 1.2", the
> error message no longer occurs.  Notice, I only changed the comment portion.
> Not the URL.  Any explanations to this?
>
> Thanks,
>
> JOHN




Re: Enhydra: Re: DTD validation of struts-config.xml

2001-02-12 Thread Craig R. McClanahan

DONNIE HALE wrote:

> To those interested:
>
> I followed the rabbit trail implied by Craig's response, and have discovered that in 
>fact there is an issue when Struts attempts to register its local DTD in the 
>initDigester method. However, I believe it may be due to a bug in the Struts code, 
>not Enhydra's class loader. The class loader implicitly used by the code in 
>ActionServlet.initDigester:
>
> URL url = this.getClass().getResource(registrations[i+1]);
>
> is "org.apache.tomcat.core.ServletClassLoader". I didn't pursue this angle terribly 
>far other than to intuit that it wasn't the class loader I expected.
>
> Making a short story long, I figured that the "getResource" method on the servlet 
>context was the appropriate method to use, I changed the relevant section in 
>initDigester to:
>
> // Register our local copy of the DTDs that we can find
> for (int i = 0; i < registrations.length; i += 2) {
> URL url;
> try {
> url = 
>getServletConfig().getServletContext().getResource(registrations[i+1]);
> }
> catch (java.net.MalformedURLException e) {
> url = null;
> }
> if (url != null)
> digester.register(registrations[i], url.toString());
> }
>
> This seems to fix the problem, though I can't say for sure what ill side effects it 
>could have. My guess is that one can't assume that the class loader of the servlet 
>class itself (at least, perhaps, while it's "init" method is still running) is the 
>same as that of the web application as a whole. Consequently, the standard servlet 
>getResource method is appropriate because the classpath of the class loader being 
>used behind the scenes of that method is the one to which the WEB-INF/lib stuff and 
>WEB-INF/classes directories have been added.
>

Unfortunately, this solution is not going to help unless you much -- at least in a 
servlet container that conforms to the spec requirements.

ServletContext.getResource() returns you a URL of a web application resource -- in 
other words, of a "file" or "directory" entry from the original WAR file.  For 
example, you can get a URL to read the web.xml file itself, if you want to, by calling:

URL url =
  getServletContext().getResource("/WEB-INF/web.xml");

However, the internal copy of the DTD we are talking about here is in the struts.jar 
file (along with all the LocalStrings.properties files containing messages generated 
by the Struts components themselves).  Struts expects to be able to access these 
resources via the class loader that the class was loaded from.

URL url =
   
this.getClass().getResource("/org/apache/struts/resources/struts-config_1_0.dtd");

Among other things, that means the call will succeeed whether you leave the Struts 
classes packaged in "struts.jar", or unpack them into WEB-INF/classes -- it is totally 
up to the class loader to figure out how to return a URL that can be used to read 
these resources.  And the class loader in question is the class loader provided by 
your servlet container.

Craig McClanahan






>
> Thanks,
>
> Donnie
>
> >>> [EMAIL PROTECTED] 02/12/01 03:01PM >>>
> Lee Hall wrote:
>
> > We've been using the Tomcat 3.2 that is integrated with NetBeans to do
> > our Struts development.  Our test deployment server (AIX 4.3 with the
> > IBM 1.2.2 JVM) is running a vanilla Tomcat3.2.1.  Neither of these
> > environments has any problem with the subject of this message. Our
> > pre-production server (AIX 4.3 with the IBM 1.2.2 JVM) is running
> > Enhydra 3.1 and fails initialization due to the validation done by
> > ActionServlet.  We've tried forcing Xerces 1.2 in Enhydra, but Enhydra
> > persists in it's attempt to validate using the network URL instead of
> > the local resource. I hacked ActionServlet.initDigester() to turn off
> > validation and that got us by - but I know it's the wrong way to deal
> > with this.  In spite of the Barracuda project, I would hope that the
> > Enhydra team would want to be completely Tomcat-compatible (which I
> > think includes Struts compatibility). Still, it was easier to "fix"
> > the ActionServlet than to fingure out why we are having this problem
> > with Enhydra.  I know, I know... I should have extended ActionServlet
> > to override instead of butchering my clean Struts - but the question
> > remains regarding why this seeming incompatibility exists. Could
> > somebody give me a clue?- Lee
>
> As you can see from the source code in ActionServlet, Struts attempts to
> register its local copy of the DTD in the initDigester() method.  It
> uses Class.getResource() to actually acquire a URL for reading the
> contents of the DTD, which is stored as a resource in the "struts.jar"
> file.  If the web application class loader in Enhydra has problems
> implementing this method correctly, you could encounter the symptom that
> you report (trying to go across t

Enhydra: Re: DTD validation of struts-config.xml

2001-02-12 Thread DONNIE HALE

To those interested:

I followed the rabbit trail implied by Craig's response, and have discovered that in 
fact there is an issue when Struts attempts to register its local DTD in the 
initDigester method. However, I believe it may be due to a bug in the Struts code, not 
Enhydra's class loader. The class loader implicitly used by the code in 
ActionServlet.initDigester:

URL url = this.getClass().getResource(registrations[i+1]);

is "org.apache.tomcat.core.ServletClassLoader". I didn't pursue this angle terribly 
far other than to intuit that it wasn't the class loader I expected.

Making a short story long, I figured that the "getResource" method on the servlet 
context was the appropriate method to use, I changed the relevant section in 
initDigester to:

// Register our local copy of the DTDs that we can find
for (int i = 0; i < registrations.length; i += 2) {
URL url;
try {
url = 
getServletConfig().getServletContext().getResource(registrations[i+1]);
}
catch (java.net.MalformedURLException e) {
url = null;
}
if (url != null)
digester.register(registrations[i], url.toString());
}

This seems to fix the problem, though I can't say for sure what ill side effects it 
could have. My guess is that one can't assume that the class loader of the servlet 
class itself (at least, perhaps, while it's "init" method is still running) is the 
same as that of the web application as a whole. Consequently, the standard servlet 
getResource method is appropriate because the classpath of the class loader being used 
behind the scenes of that method is the one to which the WEB-INF/lib stuff and 
WEB-INF/classes directories have been added.

Thanks,

Donnie


>>> [EMAIL PROTECTED] 02/12/01 03:01PM >>>
Lee Hall wrote:

> We've been using the Tomcat 3.2 that is integrated with NetBeans to do
> our Struts development.  Our test deployment server (AIX 4.3 with the
> IBM 1.2.2 JVM) is running a vanilla Tomcat3.2.1.  Neither of these
> environments has any problem with the subject of this message. Our
> pre-production server (AIX 4.3 with the IBM 1.2.2 JVM) is running
> Enhydra 3.1 and fails initialization due to the validation done by
> ActionServlet.  We've tried forcing Xerces 1.2 in Enhydra, but Enhydra
> persists in it's attempt to validate using the network URL instead of
> the local resource. I hacked ActionServlet.initDigester() to turn off
> validation and that got us by - but I know it's the wrong way to deal
> with this.  In spite of the Barracuda project, I would hope that the
> Enhydra team would want to be completely Tomcat-compatible (which I
> think includes Struts compatibility). Still, it was easier to "fix"
> the ActionServlet than to fingure out why we are having this problem
> with Enhydra.  I know, I know... I should have extended ActionServlet
> to override instead of butchering my clean Struts - but the question
> remains regarding why this seeming incompatibility exists. Could
> somebody give me a clue?- Lee

As you can see from the source code in ActionServlet, Struts attempts to
register its local copy of the DTD in the initDigester() method.  It
uses Class.getResource() to actually acquire a URL for reading the
contents of the DTD, which is stored as a resource in the "struts.jar"
file.  If the web application class loader in Enhydra has problems
implementing this method correctly, you could encounter the symptom that
you report (trying to go across the network to grab the DTD).

Craig McClanahan


-
To unsubscribe from this mailing list, send email to [EMAIL PROTECTED] 
with the text "unsubscribe enhydra" in the body of the email.
If you have other questions regarding this mailing list, send email to
the list admin at [EMAIL PROTECTED]




Re: DTD validation of struts-config.xml

2001-02-12 Thread Craig R. McClanahan

Lee Hall wrote:

> We've been using the Tomcat 3.2 that is integrated with NetBeans to do
> our Struts development.  Our test deployment server (AIX 4.3 with the
> IBM 1.2.2 JVM) is running a vanilla Tomcat3.2.1.  Neither of these
> environments has any problem with the subject of this message. Our
> pre-production server (AIX 4.3 with the IBM 1.2.2 JVM) is running
> Enhydra 3.1 and fails initialization due to the validation done by
> ActionServlet.  We've tried forcing Xerces 1.2 in Enhydra, but Enhydra
> persists in it's attempt to validate using the network URL instead of
> the local resource. I hacked ActionServlet.initDigester() to turn off
> validation and that got us by - but I know it's the wrong way to deal
> with this.  In spite of the Barracuda project, I would hope that the
> Enhydra team would want to be completely Tomcat-compatible (which I
> think includes Struts compatibility). Still, it was easier to "fix"
> the ActionServlet than to fingure out why we are having this problem
> with Enhydra.  I know, I know... I should have extended ActionServlet
> to override instead of butchering my clean Struts - but the question
> remains regarding why this seeming incompatibility exists. Could
> somebody give me a clue?- Lee

As you can see from the source code in ActionServlet, Struts attempts to
register its local copy of the DTD in the initDigester() method.  It
uses Class.getResource() to actually acquire a URL for reading the
contents of the DTD, which is stored as a resource in the "struts.jar"
file.  If the web application class loader in Enhydra has problems
implementing this method correctly, you could encounter the symptom that
you report (trying to go across the network to grab the DTD).

Craig McClanahan