This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Issue with Struts Global Forward

 
yogi reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am having problem in creating a global forward in struts in 1.3.8. When I add the global forward tag I get an error in Tomcat during startup. I checked the spelling and it perfectly matches. When I remove the global forward tag, I do NOT get this error. I have not had a chance to work in struts in last 2 years, so can someone please let me know what is the mistake in this? Thanks in advance for your response.

Error:
**********

Nov 12, 2009 7:41:37 PM org.apache.commons.digester.Digester error
SEVERE: Parse Error at line 35 column 17: The content of element type "struts-config" must match "(display-name?,description?,form-beans?,global-exceptions?,global-forwards?,action-mappings?,controller?,message-resources*,plug-in*)".

My struts-config.xml
**********************

<?xml version="1.0" encoding="ISO-8859-1"?>

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

<struts-config>

<global-forwards>
<forward name="welcome" path="/pages/Welcome.jsp"/>
</global-forwards>

<form-beans>

<form-bean name="selectBeerForm" type="com.example.web.BeerSelectForm"/>
<form-bean name="logonForm" type="com.example.web.LogonForm"/>

</form-beans>

<action-mappings>

<action path="/SelectBeer"
type="com.example.controller.BeerSelectAction"
scope="request" name="selectBeerForm"
validate="true" input="/form.jsp">

<forward name="show_results" path="/result.jsp" />

</action>

</action-mappings>

<message-resources parameter="ApplicationResources"/>

</struts-config>

Thanks,
Yogesh
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
yogi reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear - I am new to the forum and this was my first post. I will make sure I post it in the right section of the forum. Also I have found the problem. The order in the struts config is what caused the problem. I have placed the global forwards at the bottom of my config file and it resolved the issue.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic