Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

run the structs program

 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using weblogic 8.1 application server.

i have struts.jar and placed in the lib folder.
ie org.apache.struts.action.ActionServlet.

and set the classpath.

updated in the web.xml and also wrote struts-config.xml

but it shows the below errror

Error 503--Service Unavailable
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml
at org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:739)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:715)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:670)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:1070)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:893)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:842)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:782)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5637)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:866)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2017)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2058)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2624)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2547)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2349)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2431)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2343)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2511)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:833)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:542)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Error 503--Service Unavailable
javax.servlet.UnavailableException: Parsing error processing resource path /WEB-INF/struts-config.xml



Problem may be in your struts-config.xml , validate it and try . Still problem persist , post your struts-config.xml file here !!
 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Sagar Rohankar:


Problem may be in your struts-config.xml , validate it and try . Still problem persist , post your struts-config.xml file here !!



i am joseph prabhu who asked the question.

this is my struts-config.xml file

<struts-config>
<
<action-mappings>
<action path="/Success" forward="/rep/Success.jsp"/>
</action-mappings>
</struts-config>
what is the error
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is your "struts-config.xml" file is under "WEB-INF" folder?
 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Raghavan Muthu:
Is your "struts-config.xml" file is under "WEB-INF" folder?




joe here

yes i have placed my struts-config.xml only within the WEB-INF

folder. what you mean UNDERSTAND the person
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

<struts-config>
<
<action-mappings>
<action path="/Success" forward="/rep/Success.jsp"/>
</action-mappings>
</struts-config>



Is that a part of your .xml file or A whole xml file you copy pasted ??
I need a whole struts-config.xnl file AND web.xml, so that i can find some error in it .. ( As the exception showed its parse exception ..) i think,the problem may be in dtd definition.
[ May 21, 2008: Message edited by: Sagar Rohankar ]
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that is true. It might be the case with validating the xml file against the DTD or Schema.

Can you paste your web.xml and struts-config.xml files here? It means the complete contents !
 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Raghavan Muthu:
Yes, that is true. It might be the case with validating the xml file against the DTD or Schema.

Can you paste your web.xml and struts-config.xml files here? It means the complete contents !



joe here

The complete web.xml is as follows


<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<display-name>Struts Blank Application</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>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
</welcome-file-list>

<security-constraint>
<web-resource-collection>
<web-resource-name>My secure resources</web-resource-name>
<description>Resources to be placed under security control.</description>
<url-pattern>/private/*</url-pattern>
<url-pattern>/registered/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>guest</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<realm-name>WebApp</realm-name>
</login-config>

<security-role>
<description>The role allowed to access our content</description>
<role-name>guest</role-name>
</security-role>

</web-app>

The Complete struts-config.xml is as follows



<struts-config>

<action-mappings>
<action path="/x" forward="/webapp/x.jsp"/>
</action-mappings>
</struts-config>

where webapp is the Root Directory

I think my struts-config.xml is wrong. i dont know to write struts-config.xml. please help how to learn because i am new to struts.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will need the following at the beginning of your struts-config.xml file:


This is assuming you are using some variation of Struts 1.3. Otherwise, substitute the appropriate DTD.

My advice is to unzip the struts-blank-1.3.8.war file that comes with the download and use that as the basis for your struts project. This will help you to avoid a lot of simple configuration mistakes.
[ May 21, 2008: Message edited by: Merrill Higginson ]
 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Merrill Higginson:
You will need the following at the beginning of your struts-config.xml file:


This is assuming you are using some variation of Struts 1.3. Otherwise, substitute the appropriate DTD.

My advice is to unzip the struts-blank-1.3.8.war file that comes with the download and use that as the basis for your struts project. This will help you to avoid a lot of simple configuration mistakes.

[ May 21, 2008: Message edited by: Merrill Higginson ]



Hi,
joe here

where i can get the struts 1.3.8.war from the site. can anyone
give the link.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi joseph,

find the war file here
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys,

It might not be configuration problem, and be conflicted of the version of jdk. That means the version of jdk in your server is different from in your development IDE. Most IDE set default version of jdk.

Try it
 
Author
Posts: 12617
IntelliJ IDE Ruby
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!