Hi:
I�m trying to run my first
struts application, but... I have a problem with class compilation. Code is:
/**SubmitAction.java**/
package hansen.playground;
import javax.servlet.http.*;
import org.apache.struts.action.*;
public final class SubmitAction extends Action {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response) {
SubmitForm f = (SubmitForm) form; // get the form bean
// and take the last name value
String lastName = f.getLastName();
// Translate the name to upper case
//and save it in the request object
request.setAttribute("lastName", lastName.toUpperCase());
// Forward control to the specified success target
return (mapping.findForward("success"));
}
}
/**End SubmitAction.java**/
The error message:
C:\Tomcat4112\webapps\struts2\WEB-INF\classes\hansen\playground>javac SubmitAction.java
SubmitAction.java:13: cannot resolve symbol
symbol : class SubmitForm
location: class hansen.playground.SubmitAction
SubmitForm f = (SubmitForm) form; // get the form bean
^
SubmitAction.java:13: cannot resolve symbol
symbol : class SubmitForm
location: class hansen.playground.SubmitAction
SubmitForm f = (SubmitForm) form; // get the form bean
^
2 errors
My CLASSPATH:
CLASSPATH=C:\Tomcat4112\common\lib\servlet.jar;
C:\struts-1.2.4\lib\struts.jar;
C:\struts-1.2.4\lib\commons-beanutils.jar;C:\struts-1.2.4\lib\commons-collections.jar;
C:\struts-1.2.4\lib\commons-logging.jar;
C:\struts-1.2.4\lib\antlr.jar;
C:\struts-1.2.4\lib\commons-digester.jar;
C:\struts-1.2.4\lib\commons-validator.jar;
C:\struts-1.2.4\lib\jakarta-oro.jar;
C:\Tomcat4112\webapps\struts2\WEB-INF\classes\hansen\playground\SubmitAction.java;
I will appreciate your help, thanks in advance!