users@glassfish.java.net

Trouble with Glassfish and Struts 1

From: <forums_at_java.net>
Date: Thu, 24 Mar 2011 09:45:53 -0500 (CDT)

Buddies:

I'm developing a jsp application in eclipse, with struts up there all right,
I have a glassfish server (Sun GlassFish Enterprise Server v2.1.1 ((v2.1
Patch06) (9.1_02 Patch12)) (build B31G-fcs)) , which when you upload the. war
of my application and try to Deploy I get the following error:

Deployment has succeeded with following warning, please look at the log file
for details Error occurred during application loading phase. The application
will not run properly. Please fix your application and redeploy. WARNING:
com.sun.enterprise.deployment.backend.IASDeploymentException:
ContainerBase.addChild: start: LifecycleException: 
javax.servlet.UnavailableException: Parsing error processing resource path
/WEB-INF/struts-config.xml
com.sun.enterprise.deployment.backend.IASDeploymentException:
ContainerBase.addChild: start: LifecycleException:
javax.servlet.UnavailableException.

In my jsp project, I have added the following,

in WEB-INF/lib:

-antrl.jar
-commons-beanutils.jar
-commons-digester.jar
-commons-fileupload.jar
-commons-logging.jar
-commons-validator.jar
-jakarta-oro.jar
-struts.jar

and WEB-INF:

-struts-bean.tld
-struts-config.xml
-struts-html.tld
-struts-logic.tld
-struts-nested.tld
-struts-tiles.tld
-web.xml

and the structure of my struts-config.xml is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
 
<struts-config>
 
<form-beans>     
<form-bean name="LoginForm" 
type="cl.forms.LoginForm"/>
</form-beans>
 
<action-mappings>
<action path="/Login"
type="cl.actions.LoginAction">
</action>
 
<action path="/Login"
name="LoginForm"
type="cl.actions.LoginAction"
input="/Login.jsp">
<forward name="correcto" path="/Index.jsp"/>     
</action>
</action-mappings>
 
</struts-config>

la estructura del web.xml:

<?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">
<display-name>LoginGF</display-name>
 
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<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>Login.jsp</welcome-file>
</welcome-file-list>
</web-app>

The java version is 1.6.0

I do not understand is that run well in eclipse, but when trying to upload it
to glassfish not recognize the struts-config.xml file, hopefully I can help,
thank you very much.


--
[Message sent by forum member 'shianim']
View Post: http://forums.java.net/node/784781