aspose file tools*
The moose likes Struts and the fly likes Issue with Struts Global Forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Issue with Struts Global Forward" Watch "Issue with Struts Global Forward" New topic
Author

Issue with Struts Global Forward

yogi reddy
Greenhorn

Joined: Aug 10, 2009
Posts: 18
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

Joined: Jan 10, 2002
Posts: 61202
    
  66

Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
yogi reddy
Greenhorn

Joined: Aug 10, 2009
Posts: 18
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue with Struts Global Forward