You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rivka Shisman <ri...@nite.org.il> on 2005/12/13 11:14:54 UTC

Struts DTD - basic question

Hello all,

 

My struts-config.xml looks for the dtd in the Jakarta website:
http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd

My validator.xml looks for the dtd in the Jakarta website:
http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd

And so my validator-rules.xml file.

 

When the above site is in some problem and I want to build my web
project, I get  this message: "Operation timed out: connect:could be due
to invalid address".

 

I would like to hold those dtd's locally. So, where should I put them in
my web project? Should it be in the "lib" directory with the struts.jar?

 

Thanks

Rivka

 

Re: Struts DTD - basic question

Posted by Danny Lee <ha...@yahoo.de>.
Thanks again Joe,
now I've configurated the stuff for Eclipse, and it works.

Cheers,

Danny


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Joe Germuska <Jo...@Germuska.com>.
At 3:41 PM +0100 12/13/05, Danny Lee wrote:
>Hi Joe,
>
>thanks for your answer,
>now I realy understand how this stuff works :)
>
>But it still don't works with validator.
>JAR is right and in scope, DTD is there in jar, DOCTYPE is right too
>but Eclipse allways tries to search for it online...

I think I missed that part; the suggestions I had are only for 
running Struts; not for work in an IDE.

Eclipse has an XML Catalog (at least 3.1 with the Web Tools 
installed; I'm not sure where that came in).  With that, you can do a 
similar process -- register a public ID and tell Eclipse where it can 
find a locally stored copy of that DTD.  You can get a copy from the 
URL (if the server is working) or from a Struts JAR or the SVN 
repository.

For other IDEs, I can't say, but they could all offer similar services.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Danny Lee <ha...@yahoo.de>.
Hi Joe,

thanks for your answer,
now I realy understand how this stuff works :)

But it still don't works with validator.
JAR is right and in scope, DTD is there in jar, DOCTYPE is right too
but Eclipse allways tries to search for it online...

Cheers,

Danny


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Joe Germuska <Jo...@Germuska.com>.
At 1:23 PM +0100 12/13/05, Danny Lee wrote:
>Shalom there,
>
>http://jakarta.apache.org is dead :(, have the same problem.
>
>
>yes you can hold the stuff localy.
>Just put it in your /lib/ folder... when jackarta's up, I'll do it too.

Struts, Tiles, and Validator all are distributed with the correct 
DTDs (as well as several historic versions) packaged in the JAR.  If 
you have the correct DOCTYPE declaration in your XML file, the DTD 
will be read as a classpath resource rather than over the internet.

People generally don't understand that the PUBLIC identifier in the 
DOCTYPE is literally an identifier.  It is an unstructured text 
string which must exactly match the value which is encoded in the 
validation Java code.  (Well, it looks structured, but the process of 
identifying the DTD is based on a pure string match.)

I recently collected the correct DOCTYPE declarations for the various 
XML files which Struts (or common Struts libraries) wants to 
validate; if you use these values, there should be no attempt to 
retrieve the DTD over the internet:

Struts 1.3

<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
        "http://struts.apache.org/dtds/struts-config_1_3.dtd">
============================

Struts 1.2

<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
        "http://struts.apache.org/dtds/struts-config_1_2.dtd">
============================

Struts 1.1

<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
        "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
============================

Struts 1.0

<!DOCTYPE struts-config PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
        "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
============================

Servlet 2.3

<!DOCTYPE web-app PUBLIC
	"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
	"http://java.sun.com/dtd/web-app_2_3.dtd">
============================

commons-validator 1.2

<!DOCTYPE form-validation PUBLIC
      "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.2.0//EN"
      "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">
============================

commons-validator 1.1.3

<!DOCTYPE form-validation PUBLIC
      "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.1.3//EN"
      "http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd">
============================

commons-validator 1.1

<!DOCTYPE form-validation PUBLIC
      "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.1//EN"
      "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd">
============================

commons-validator 1.0.1

<!DOCTYPE form-validation PUBLIC
      "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.0.1//EN"
      "http://jakarta.apache.org/commons/dtds/validator_1_0_1.dtd">
============================

commons-validator 1.0

<!DOCTYPE form-validation PUBLIC
      "-//Apache Software Foundation//DTD Commons Validator Rules 
Configuration 1.0//EN"
      "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
============================

Tiles 1.1

<!DOCTYPE tiles-definitions PUBLIC
        "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
        "http://struts.apache.org/dtds/tiles-config_1_1.dtd">


Joe



-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Danny Lee <ha...@yahoo.de>.
Shalom there,

http://jakarta.apache.org is dead :(, have the same problem.


yes you can hold the stuff localy.
Just put it in your /lib/ folder... when jackarta's up, I'll do it too.

Cheers

Danny

Rivka Shisman schrieb:
> Hello all,
> 
>  
> 
> My struts-config.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd
> 
> My validator.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd
> 
> And so my validator-rules.xml file.
> 
>  
> 
> When the above site is in some problem and I want to build my web
> project, I get  this message: "Operation timed out: connect:could be due
> to invalid address".
> 
>  
> 
> I would like to hold those dtd's locally. So, where should I put them in
> my web project? Should it be in the "lib" directory with the struts.jar?
> 
>  
> 
> Thanks
> 
> Rivka
> 
>  
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Wendy Smoak <ws...@gmail.com>.
On 12/13/05, Rivka Shisman <ri...@nite.org.il> wrote:

> My struts-config.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd
>
> My validator.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd
>
> And so my validator-rules.xml file.
>
> When the above site is in some problem and I want to build my web
> project, I get  this message: "Operation timed out: connect:could be due
> to invalid address".

What version of Struts are you using, and how are you building your project?

It sounds like your IDE or build tool might need to be configured to
find the resources locally.  (This is _not_ happening at runtime,
right?)

--
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts DTD - basic question

Posted by Torgeir Veimo <to...@pobox.com>.
On Tue, 2005-12-13 at 12:14 +0200, Rivka Shisman wrote:
> Hello all,

> My struts-config.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd
> 
> My validator.xml looks for the dtd in the Jakarta website:
> http://jakarta.apache.org/commons/dtds/validator_1_1_3.dtd
> 
> And so my validator-rules.xml file.

They should be in the struts jar file. Does your DOCTYPE exactly match
those of the dtd files?
 
-- 
Torgeir Veimo <to...@pobox.com>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org