EJB (Enterprise Java Beans) - tiles con spring

 
Vista:

tiles con spring

Publicado por ana (1 intervención) el 27/12/2007 14:40:04
Hola, tengo una aplicación con struts-hibernate y quiero intgrarle otra con struts-spring-hibernate .

En ambas uso las Tiles. Mi problema es que en el struts-config de cada aplicación tengo perfectamente definido donde esta el tiles-config.xml y dentro de estos ficheros defino las paginas JSP con su cuerpo, cabecera, etc.

La cosa esta en que cuando arranco la aplicacion obtengo la exepcion :

IllegalArgumentException: La Trayectoria tiles.sigadex.buscadorTrabajadoresSigadex no comienza con carácter "/"

Sin embargo en el path="tiles.loquesea" no necesito poner la '/' pq no tngo una ruta sino un tiles.
y en el web.xml estan los struts-config definidos tambien.

¿a alguien se le ocurre algo?

Gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:tiles con spring

Publicado por pedro (1 intervención) el 28/01/2008 12:18:43
http://wiki.apache.org/struts/StrutsUpgradeNotes12to13

Basicamente que si quieres utilizar tiles tienes que incluir en el web.xml de la aplicación el parametro de inicio:

<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>

y después cambiar el doctype de cada fichero de definiciones de tiles por este:

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

A mi me funcionó, pero bueno, a ver a tí.

Saludos

If you want to use Tiles, you must instruct Struts to use a configuration file included in the struts-tiles JAR instead. To do this:

*

Add a chainConfig init-param in the web.xml pointing to the location of the chain-config.xml

<init-param>
<param-name>chainConfig</param-name>
<param-value>org/apache/struts/tiles/chain-config.xml</param-value>
</init-param>

N.B. The tiles chain-config.xml included with Struts 1.3.5 has two commands missing from the configuration (see [WWW] Issue #STR-2935) - this can be rectified by downloading [WWW] this version of the tiles chain-config.xml

In addition to configuring the ComposableRequestProcessor to use the provided Tiles chain config file, you should also update the DOCTYPE definition in your tiles-defs.xml file:

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

You can do much more to configure the ComposableRequestProcessor, but those details are outside the scope of this document.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar