Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

RE: Problem while Struts 2 and Tiles 2 integration.

LAMY Olivier

2007-06-16

Replies:

Hi,
Have a look : https://issues.apache.org/struts/browse/TILES-183

HTH,
--
Olivier

-----Message d'origine-----
De : Kev_dev [mailto:guyincognito01@(protected)]
Envoyé : samedi 16 juin 2007 19:57
À : user@(protected)
Objet : Re: Problem while Struts 2 and Tiles 2 integration.


I received this error as well, and discovered the cause to actually be my tiles.xml. The Struts2 tiles.xml needs to follow the schema defined in "http://struts.apache.org/dtds/tiles-config_2_0.dtd", and if your tiles.xml differs from it, you may receive this exception. In my case, I was porting over a struts1 tiles.xml, and missed one of the syntax changes. So I had:

<definition name="2colLayout" path="/WEB-INF/templates/2col.jsp">

instead of:

<definition name="2colLayout" template="/WEB-INF/templates/2col.jsp">

for one of my entries. So when the tiles plugin wanted to open my actual layout page, it did not see the correct entry for it (it did not see the tag "template="), and threw the I/O exception. Double check your tiles.xml and ensure that it has the correct syntax for struts2 tiles.

You may not have noticed the syntax error if you were using an IDE (which should have validated your XML for you), because the "http://struts.apache.org/dtds/tiles-config_2_0.dtd" doesn't actually exist!
It looks like apache forgot to put in on their site, so you won't know of your syntax issues until runtime.
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
**********************************************************************
Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
**********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.