Subject: A common problem: "Cannot find ActionMappings or ActionFormBeans"?
From: Jesper Lindholt Ottosen <[EMAIL PROTECTED]>
 ===
This is a multi-part message in MIME format.
--------------71050682FAF314ABBDC2DF31
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi!

I have been attacking the "Cannot find ActionMappings or ActionFormBeans"
problem in a specific web app for quite some nights now. I have searched
for answers on the 'net and in this newsgroup, and checked up on most of
the advices. Apparently I'm not alone (and that's a comfort, after all :).

Question 1: How come the struts-config.xml file is so vulnerable and
what is done to make it more robust? To me it seems that there is a lot 
of suggestions on why the problem arises, but they are very different, 
with no general applicability. Is there perhaps a solution that verifies 
the file and setup properties (A "Do this and it can't go wrong")?

Back to my current problem: My Linux (7.2) crashed with two projects
that worked - I managed to save the files and have been rebuilding the
setup with Tomcat 4.0.2, Struts 1.0.2 and various XML parsers. 
Now one project works fine, the other project simply gives me the problem
no matter what I try.. I tried removing these XML jar's from the $CLASSPATH 
but it didn't matter. My project needs a JDOM xml-parser so that and the 
struts.jar file is added to the project WEB-INF/lib. I tried building
the app' up from scratch based on "struts-blank", with no luck at all (!).

Question 2: The struts-config.xml file I use (attached) generates a 
parsing error in the log and the dreaded JSP exception error page, when 
I start my application from a JSP page containing:
        ...
        <html:form action="login.do" focus="login">
        ...
        </html:form>
        ...
Can anyone find the blind spot I've been missing? I'm pretty sure that the 
files and the system setup (including web.xml) is as before the crash, and 
the jsp-files etc are all in the right places. But let me know if you want
any of them.

Any help will be appreciated - thanks!


-- 
Jesper
------ [EMAIL PROTECTED] - Computer Science ---
-- www.o2sn.dk/jesper - Aarhus University --
--------------71050682FAF314ABBDC2DF31
Content-Type: text/xml; charset=us-ascii;
 name="struts-config.xml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="struts-config.xml"

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!-- $Id: struts-config.xml,v 1.10 2002/04/27 11:40:39 jesper Exp $ -->
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>

<struts-config>

  <form-beans type="org.apache.struts.action.ActionFormBean">
    <form-bean  name="anyForm" type="myApplication.anyForm" />
  </form-beans>

  <global-forwards type="org.apache.struts.action.ActionForward">
    <forward name="login" path="/login.jsp" />
    <forward name="menu" path="/menu.jsp" /> 
    <forward name="hej" path="/hej.jsp" /> 
    <forward name="kig" path="/kig.jsp" /> 
    <forward name="exit" path="/logout.jsp" /> 
  </global-forwards>

  <action-mappings type="org.apache.struts.action.ActionMapping">
    <action     path="/login" 
                type="myApplication.loginAction"
                name="anyForm" 
                unknown="true"
                scope="request" 
                validate="true"
                input="/login.jsp">
    </action>
    <action     path="/logout" 
                type="myApplication.logoutAction"
                name="anyForm" 
                scope="request" 
                validate="false"
                input="/logout.jsp">
    </action>
    <action     path="/hej" 
                type="myApplication.hejAction"
                name="anyForm" 
                scope="request" 
                validate="false"
                input="/hej.jsp">
    </action>
    <action     path="/kig" 
                type="myApplication.kigAction"
                name="anyForm" 
                scope="request" 
                validate="false"
                input="/kig.jsp">
    </action>
  </action-mappings>

</struts-config>

--------------71050682FAF314ABBDC2DF31--


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

Reply via email to