Ver Mensaje Individual
  #3 (permalink)  
Antiguo 25/05/2009, 00:24
Pelirr
 
Fecha de Ingreso: diciembre-2008
Mensajes: 233
Antigüedad: 15 años, 4 meses
Puntos: 1
Respuesta: error en jsp por struts

Hola, muchas gracias, al final lo he solucionado poniendo:

<taglib-uri>strutsForm</taglib-uri>
<taglib-location>/WEB-INF/struts-form.tld</taglib-location>
</taglib>

y añadiendo la librería struts-form.tld en el directorio. Así que no debe estar tan obsoleto. De todos modos, a eclipse le cuesta refrescar los cambios, tarda bastante rato, no sé cuál es la razón, a lo mejor tarde del orden de 10 minutos.
Asi el web.xml queda:

<?xml version="1.0" encoding="UTF-8"?>

<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<jsp-config>
<taglib>
<taglib-uri>strutsBean</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>strutsHtml</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>strutsLogic</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>strutsForm</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-form.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>strutsTemplate</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-template.tld</taglib-location>
</taglib>
</jsp-config>

<display-name>PruebaOsiris.war</display-name>

<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<!-- com.empresa.aplicacion.ApplicationResources es la localizacion del archivo ".properties"
del idioma principal de la aplicacion -->
<init-param>
<param-name>application</param-name>
<param-value>org.apache.struts.example.ApplicationResourc es</param-value>
<!-- en el manual después viene que en lugar de este value puede ser
com.empresa.aplication.ApplicationResources -->
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<!-- Para el nivel de depuración -->
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<!-- Clase java de implementación del mapping -->
<init-param>
<param-name>mapping</param-name>
<param-value>org.apache.struts.example.ApplicationMapping </param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<!-- Orden de ejecución cuando el servlet engine es inicializado -->
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>registro.jsp</welcome-file>
</welcome-file-list>
</web-app>

Por otro lado he conseguido terminarlo pero al arrancarlo con el jboss me dice lo siguiente:

...
INFO [TomcatDeployment] deploy, ctxPath=/PruebaOsiris, vfsUrl=PruebaOsiris.war
WARN [Config] Unable to process deployment descriptor for context '/PruebaOsiris'
INFO [TomcatDeployment] deploy, ctxPath=/, vfsUrl=ROOT.war
...

y no consigo ver mi aplicación en internet, al poner http://localhost:8080/PruebaOsiris/, lo cual debería funcionar. Debe faltarme algo pero no sé que es. Tengo en mi aplicación mi directorio WEF-INF/lib con todas las librerías necesarias, mi archivo web.xml con la página de inicio en <welcome-file>, un archivo de struts.xml, no sé que me puede faltar. ¿Puedes ayudarme? Gracias de nuevo, y un saludo