Skip to main content

Glassfish V2 + enterprise application using struts problem

2 replies [Last post]
askoruli
Offline
Joined: 2007-11-11
Points: 0

There seems to be some problem when trying to create an enterprise application using struts. If I create a standalone web app using struts it deploys and runs fine but if I add this same web app to an empty enterprise application I get various errors during deployment looking like:

java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml

and nothing will work. I've tried changing /WEB-INF/struts-config.xml to something else but nothing I try seems to work. Any ideas how to get this to work?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cesarc
Offline
Joined: 2007-12-21
Points: 0

Hi, I had the same problem working on NetBeans 6.0. It seems to be a NetBeans' bug. Try this:

1. On NetBeans (assuming you are using it) you must only build your Enterprise application (including the struts web application). Do not deploy it there.

2. Open your GlassFish admin console (http://localhost:4848), login with admin (default password: adminadmin) and deploy your EAR there.

2.1. It may be necessary to undeploy the previous Enterprise application, if you already tried a deploy before on NetBeans. Or you can also redeploy...

It worked for me...

Hope it helps.

Take care,
Cesar.

plasante
Offline
Joined: 2004-07-03
Points: 0

Hello.

I tried several times to deploy and undeploy from the GlassFish admin console but to no avail. I always get the following errors:

Parsing error processing resource path /WEB-INF/struts-config.xml
java.io.FileNotFoundException: C:\Program%20Files\glassfish_v2\domains\domain1\applications\j2ee-apps\MyStruts2\MyStruts2-war_war\WEB-INF\lib\struts.jar

Of course I checked that the struts.jar file is in the right folder.

Also the application works fine if I create a web struts module outside an Enterprise Application.

In the meantime I will use an EJB module and Struts Web module with stateless remote session bean.

Cheerio.