You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chuck Amadi <ch...@breconbeacons.org> on 2001/06/15 12:58:35 UTC

Re: help with package .java struts-classpath / invalid package/parsing errors

Hi , I have been trying to sort this for a day or so im unable to
compile the .java classes.
1) I have checked the struts-config.xml and ensured the following-
<struts-config>
    <form-bean >
        <form-bean name= "customForm"/>
        type="it.CustomForm"/>
    </form-bean>

    <action-mapping>
        <action path="/org/breconbeacons/it"
        type="it.GroupAction"
        name="customeForm">
        <set-property property="group" value ="BBNPA User"/>
           <forward name="view " path="/display.jsp" />
        </action>
    </action-mappings>
</struts-config>
2) I have checked the
<param-name>mapping</param-name><param-value>it.CustomMapping</param-value>
& <servlet-mapping>action
3) package name - org.breconbecons.it.CustomForm; & imported
org.apache.struts.action.ActionForm;

The Error while trying to compile, this is similiar to all my other
.java files Problem 2 except  Problem 1 ActionForward .
----------------------------------------------------------------------------------------------------------------------------

Problem 2 ActionForwrad.java
WEB-INF/classes/org/breconbeacons/it/ActionForward.java [9:1] Expected
the body of the class definition
                              perform(ActionMapping mapping,
                              ^
1 error
Errors compiling ActionForward.
---------------------------------------------------------------------------------------------------------

Problem 1 (all other .java files)
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [66:1] Class
ActionMapping not found in type declaration or import.
import org.apache.struts.action.ActionMapping;
                                ^
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [85:1] Class
ActionMapping not found in type declaration or import.
public final class ApplicationMapping extends ActionMapping {
                                              ^
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [85:1] Public
class org.breconbeacons.it.ApplicationMapping is defined in
C:\jakarta-tomcat-3.2.1\webapps\bbnpa\WEB-INF\classes\org\breconbeacons\it\ActionMapping.java
and must be defined in a file called "ApplicationMapping.java".
public final class ApplicationMapping extends ActionMapping {
                   ^
3 errors
Errors compiling ActionMapping.

Cheers chuck (tearing my hair out) ;^{

Chuck Amadi wrote:

>    Part 1.1    Type: Plain Text (text/plain)
>            Encoding: 8bit

--
The views expressed by the sender of this message don't
necessarily represent those of Brecon Beacons National Park
Authority. This message is intended for the addressee(s) only
and is sent in confidence; if you receive it in error, please can you
let us know (at it@breconbeacons.org) and then destroy all copies.
Nid yw'r farn a fynegir gan anfonwr y neges hon o anghenraid yn
adlewyrchu barn Awdurdod Parc Cenedlaethol Bannau Brycheiniog.
Neges yw hon a fwriadwyd ar gyfer y derbynnydd/derbynyddion
yn unig ac fe'i hanfonir yn gyfrinachol; os ydych yn ei dderbyn
mewn camgymeriad, a fyddech gystal â rhoi gwybod i
ni (yn it@breconbeacons.org) ac yna dilëwch bob copi.


Re: help with package .java struts-classpath / invalid package/parsing errors

Posted by Dan Miser <dm...@wi.rr.com>.
Are you putting struts.jar on your classpath in order to compile (i.e.
java -classpath /path/to/struts.jar *.java? Are you compiling from the right
directory? Are you copying Struts files around locally somewhere (like
ActionForward and ActionMapping)? If so, don't do that. Leave those files in
struts.jar and just reference them via an import.

Start by getting a succesful recompile of struts-example. That way, everyone
can relate to your problem. This seems like a simple case of compiling a
Java app.

BTW, you have more typos below. You should really double-check your posts
before sending, as we have no way of knowing what's a typo in your message
vs. what could really be a problem.
--
Dan Miser
http://www.distribucon.com

----- Original Message -----
From: Chuck Amadi
To: struts-user@jakarta.apache.org ; Jayson@jspinsider.com ; Petr Jiricka
Sent: Friday, June 15, 2001 5:58 AM
Subject: Re: help with package .java struts-classpath / invalid
package/parsing errors


Hi , I have been trying to sort this for a day or so im unable to compile
the .java classes.
1) I have checked the struts-config.xml and ensured the following-
<struts-config>
    <form-bean >
        <form-bean name= "customForm"/>
        type="it.CustomForm"/>
    </form-bean>
    <action-mapping>
        <action path="/org/breconbeacons/it"
        type="it.GroupAction"
        name="customeForm">
        <set-property property="group" value ="BBNPA User"/>
           <forward name="view " path="/display.jsp" />
        </action>
    </action-mappings>
</struts-config>
2) I have checked the
<param-name>mapping</param-name><param-value>it.CustomMapping</param-value>
& <servlet-mapping>action
3) package name - org.breconbecons.it.CustomForm; & imported
org.apache.struts.action.ActionForm;
The Error while trying to compile, this is similiar to all my other .java
files Problem 2 except  Problem 1 ActionForward .
----------------------------------------------------------------------------
------------------------------------------------
Problem 2 ActionForwrad.java
WEB-INF/classes/org/breconbeacons/it/ActionForward.java [9:1] Expected the
body of the class definition
                              perform(ActionMapping mapping,
                              ^
1 error
Errors compiling ActionForward.
----------------------------------------------------------------------------
-----------------------------
Problem 1 (all other .java files)
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [66:1] Class
ActionMapping not found in type declaration or import.
import org.apache.struts.action.ActionMapping;
                                ^
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [85:1] Class
ActionMapping not found in type declaration or import.
public final class ApplicationMapping extends ActionMapping {
                                              ^
WEB-INF/classes/org/breconbeacons/it/ActionMapping.java [85:1] Public class
org.breconbeacons.it.ApplicationMapping is defined in
C:\jakarta-tomcat-3.2.1\webapps\bbnpa\WEB-INF\classes\org\breconbeacons\it\A
ctionMapping.java and must be defined in a file called
"ApplicationMapping.java".
public final class ApplicationMapping extends ActionMapping {
                   ^
3 errors
Errors compiling ActionMapping.