"type" on global-forwards is used in Struts 1.2.1 onwards to configure the
default class for all ActionForward - was fixed as part of this enhacement:

http://issues.apache.org/bugzilla/show_bug.cgi?id=28330

But IMO the best version to use in the Struts 1.2.x serires is Struts 1.2.4.

On the subject of your UnavailableException when parsing the
struts-config.xml.....

Struts has copies of the dtds in its jar file which the digester registers
so that in the event that you don't have a connection to the outside world
it can find copies of the dtd's locally. If it can't find them (which is
what I think is the cause of your UnavailableException) it is because either
whats in your DOCTYPE isn't correct (which it wasn't) or you don't have the
correct version  of the struts.jar deployed.

If you're still getting the same UnavailableException when parsing the
struts-config.xml - and you have corrected (and deployed!) the
struts-config.xml, then check that you have the right version of the
struts.jar

Niall

----- Original Message ----- 
From: "John Crossman" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Wednesday, September 15, 2004 6:16 PM
Subject: Re: ParseException on struts-config.xml


> Well, for whatever reason, I can not get that to work.  I would like to
> try a different approach...  In what rev of Struts is the following
> supported:
>
>     <global-forwards
> type="org.apache.struts.webapp.examples.CustomActionForward">
>         <!-- utilize a custom ActionForward as an example only -->
>         <forward name="welcome" path="/welcome.do">
>             <set-property property="example" value="EXAMPLE" />
>         </forward>
>     </global-forwards>
>
>
> Thanks
>
> J
>
> Niall Pemberton wrote:
>
> >Try changing the DOCTYPE declaration to:
> >
> ><!DOCTYPE struts-config PUBLIC
> >       "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
> >       "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> >
> >I guess you're probably using Struts 1.2.2 - which has the same DOCTYPE
> >declaration as you in the "examples" webapp - has been corrected in the
> >current version (Struts 1.2.4) which is being considered/tested prior to
> >release. You can download it here:
> >
> >http://cvs.apache.org/dist/struts/v1.2.4/
> >
> >Also there are upgrade notes here:
> >
> >http://wiki.apache.org/struts/Struts1_2e1to1_2e2_2e1UpgradeNotes
> >
> >
> >Niall
> >
> >
> >----- Original Message ----- 
> >From: "John Crossman" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Wednesday, September 15, 2004 4:50 PM
> >Subject: ParseException on struts-config.xml
> >
> >
> >
> >
> >>My struts-config is below the stacktrace.  When I startup my webapp, I
> >>get the following the stacktrace. Why?  It appears to have something to
> >>do with how I have my <form-beans> config'd, but I can't tell what's
> >>wrong.  This is essentially what is present in the webapp/examples
> >>webapp which is distributed with the struts source.  Anyone?
> >>
> >>[2004/09/15 08:41:44] Parsing error processing resource path
> >>/WEB-INF/struts-config.xml
> >>javax.servlet.UnavailableException: Parsing error processing resource
> >>path /WEB-INF/struts-config.xml
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.
j
> >ava:739)
> >
> >
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.
j
> >ava:715)
> >
> >
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:
6
> >70)
> >
> >
> >>        at
> >>org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> >>        at javax.servlet.GenericServlet.init(GenericServlet.java:82)
> >>        at
> >>com.caucho.server.http.Application.createServlet(Application.java:3103)
> >>        at
> >>com.caucho.server.http.Application.loadServlet(Application.java:3054)
> >>
> >>
> >
> >
> >
> >>at
com.caucho.server.http.Application.initServlets(Application.java:1914)
> >>        at
com.caucho.server.http.Application.init(Application.java:1827)
> >>        at
> >>
> >>
> >com.caucho.server.http.VirtualHost.initWars(VirtualHost.java:824)
> >
> >
> >>        at com.caucho.server.http.VirtualHost.init(VirtualHost.java:687)
> >>        at
> >>com.caucho.server.http.ServletServer.initHosts(ServletServer.java:853)
> >>        at
>
>>com.caucho.server.http.ServletServer.initInternal(ServletServer.java:698)
> >>        at
> >>
> >>
> >com.caucho.server.http.ServletServer.init(ServletServer.java:509)
> >
> >
> >>        at com.caucho.server.http.ResinServer.init(ResinServer.java:377)
> >>        at
com.caucho.server.http.ResinServer.main(ResinServer.java:1137)
> >>        at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
> >>[2004/09/15 08:41:44] init exception for `action'
> >>javax.servlet.UnavailableException: Parsing error processing resource
> >>path /WEB-INF/struts-config.xml
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.
j
> >ava:739)
> >
> >
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.
j
> >ava:715)
> >
> >
> >>        at
> >>
> >>
> >>
>
>org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:
6
> >70)
> >
> >
> >>        at
> >>org.apache.struts.action.ActionServlet.init(ActionServlet.java:329)
> >>        at javax.servlet.GenericServlet.init(GenericServlet.java:82)
> >>        at
> >>com.caucho.server.http.Application.createServlet(Application.java:3103)
> >>        at
> >>com.caucho.server.http.Application.loadServlet(Application.java:3054)
> >>at
com.caucho.server.http.Application.initServlets(Application.java:1914)
> >>        at
com.caucho.server.http.Application.init(Application.java:1827)
> >>        at
> >>
> >>
> >com.caucho.server.http.VirtualHost.initWars(VirtualHost.java:824)
> >
> >
> >>        at com.caucho.server.http.VirtualHost.init(VirtualHost.java:687)
> >>        at
> >>com.caucho.server.http.ServletServer.initHosts(ServletServer.java:853)
> >>        at
>
>>com.caucho.server.http.ServletServer.initInternal(ServletServer.java:698)
> >>        at
> >>
> >>
> >com.caucho.server.http.ServletServer.init(ServletServer.java:509)
> >
> >
> >>        at com.caucho.server.http.ResinServer.init(ResinServer.java:377)
> >>        at
com.caucho.server.http.ResinServer.main(ResinServer.java:1137)
> >>        at com.caucho.server.http.HttpServer.main(HttpServer.java:103)
> >>
>
>>--------------------------------------------------------------------------
> >>
> >>
> >--------------------
> >
> >
> >>My struts-config:
> >>
> >><?xml version="1.0" encoding="ISO-8859-1" ?>
> >>
> >><!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
> >>Struts Configuration 1.2//EN"
> >>    "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd";>
> >>
> >><struts-config>
> >>
> >>    <form-beans>
> >>        <form-bean name="Date" type="cnwk.camaro.sample.DateModel" >
> >>            <set-property property="commands"
> >>value="cnwk.camaro.PrintDateCommand,cnwk.camaro.FormatDateCommand" />
> >>        </form-bean>
> >>        <form-bean name="Value" type="cnwk.camaro.sample.ValueModel" >
> >>            <set-property property="commands"
> >>
> >>
> >>
>
>value="cnwk.camaro.sample.QueryValueCommand,cnwk.camaro.sample.FormatValueC
o
> >mmand"
> >
> >
> >>/>
> >>        </form-bean>
> >>    </form-beans>
> >>
> >>    <global-forwards>
> >>        <forward name="DateFormat" path="/do/Swift/Date/SampleView" />
> >>        <forward name="ValueQuery" path="/do/Swift/Value/ShowValue" />
> >>    </global-forwards>
> >>
> >>    <action-mappings>
> >>        <action path="/Swift/*/*"
> >>            type="cnwk.camaro.CamaroMasterAction"
> >>            name="{1}"
> >>            attribute="camaroForm"
> >>            scope="request">
> >>            <forward
> >>                name="success"
> >>                path="/WEB-INF/pages/{2}.jsp" />
> >>        </action>
> >>    </action-mappings>
> >>
> >></struts-config>
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to