File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Issue with Struts Global Forward

yogi reddy

Joined: Aug 10, 2009
Posts: 18

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.


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"


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


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



<action path="/SelectBeer"
scope="request" name="selectBeerForm"
validate="true" input="/form.jsp">

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



<message-resources parameter="ApplicationResources"/>


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

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

[Asking smart questions] [About Bear] [Books by Bear]
yogi reddy

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:
subject: Issue with Struts Global Forward
It's not a secret anymore!