M
milkyway
Hello,
I have the following files below. Basically, all I am trying to do is
to get *1* form to call the contents of the action form. All I keep
getting is:
"The requested resource (/action.do) is not available"
BTW, the .xml config file was generated by a product called Exadel - as
an FYI - Beware ....
Why do I keep getting the error? I just would like to know for my own
understanding ... I thought I did everything right (doc - concerned).
Is the information generated by the program (Exadel) wrong?
Kindest Regards.
/* CVS information: $Revision: 1.1.1.1 $ $Date: 2003/05/05 23:38:50 $
* $Source: /cvs-master/Exadel4_6/tomcat/LICENSE,v $
* $Author: sorits $
*/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252">
<script type="text/javascript" src="data_check_functions.js"></script>
<script type="text/javascript" src="row_functions.js"></script>
</HEAD>
<style type='text/css'>
body {
font-family: Times;
font-weight: bold;
font-size: 100%;
}
</style>
<script type="text/javascript" ><!--
function PrepObj(Frm) {
with (document.forms[Frm]) return { Fawm:Frm, A:[
{F:"ProcID", W:"Process ID", H:"be in ###-##-#### format ",
V:RegCheckSocialOK},
{F:"FilerSocSecNo", W:"Filer Social Security Number", H:"be in
###-##-#### format ", V:RegCheckSocialOK}
] } }
--></script>
<BODY >
<FORM name="FrmStartPg" action="/socsecnoAction.do" method="post" >
<div ID="errmesg"> </div>
<table cellpadding="0" cellspacing="0" border="0" >
<tr>
<td width=400>
System Login ID
</td>
<td>
<INPUT TYPE ="text" style="width:300px" maxLength=11 name="ProcID">
</td>
</tr>
<tr>
<td width=400>
Social Security Number
</td>
<td>
<INPUT TYPE ="text" style="width:300px" maxLength=11
name="FilerSocSecNo">
</td>
</tr>
</table>
<br>
<INPUT type ="button" onClick="if (FTry2(PrepObj('FrmStartPg'))) {
process_single_form(this.form); }"
value=" Continue " name="Continue">
<br>
</FORM>
</BODY>
</HTML>
/*
* socsecnoAction.java
*
* Generated on Tue Jan 25 11:40:24 PST 2005
* by Exadel Struts Studio
*/
package taxes;
import java.io.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.util.MessageResources;
public class socsecnoAction extends org.apache.struts.action.Action {
public static final String GLOBAL_FORWARD_StartTaxes =
"StartTaxes";
// Global Forwards
public static final String GLOBAL_FORWARD_getName = "getName";
public socsecnoAction() {
// TODO: Write constructor body
}
public ActionForward execute(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
// TODO: Write method body
throw new UnsupportedOperationException("Method not
implemented");
}
}
/*
* socsecnoActionForm.java
*
* Generated on Mon Jan 24 05:33:26 PST 2005
* by Exadel Struts Studio
*/
package taxes;
import java.io.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.util.MessageResources;
import org.apache.log4j.Logger;
public class socsecnoActionForm extends
org.apache.struts.action.ActionForm {
private AtomFDep[] FDepList;
private FDep FDepQueryList;
private AtomFDep FDepDataQuery = new AtomFDep();
private int max, i;
private static Logger logger = Logger.getLogger("rfc.pattern");
public int load_data() {
logger.info("got inside");
FDepList = new AtomFDep[max];
for (i = 0; i < max; i++) {
logger.info("got one item "+ i);
FDepList = (AtomFDep) FDepQueryList.getRow(i);
}
logger.info(FDepList[1].getFilerSocSecNo() );
return 0;
}
public String getProcID() {
return this.ProcID;
}
public void setProcID(String inString) {
ProcID = inString;
}
public String getFilerSocSecNo() {
return this.FilerSocSecNo;
}
public void setFilerSocSecNo(String inString) {
FilerSocSecNo = inString;
load_data();
}
// Global Forwards
public static final String GLOBAL_FORWARD_getName = "getName";
// Local Forwards
private static final String FORWARD_ques = "ques";
public socsecnoActionForm() {
// TODO: Write constructor body
}
public ActionForward execute(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
// TODO: Write method body
throw new UnsupportedOperationException("Method not
implemented");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS ENTITY="StrutsProcess">
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="getName" NAME="forward0"
PATH="/pages/inputname.jsp" SHAPE="19,254,110,27" TARGET="page0"
TITLE="getName" TYPE="forward"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#greeting" NAME="action0"
PATH="/greeting" SHAPE="167,320,110,30" TITLE="GetNameForm"
TYPE="action"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page0"
PATH="/pages/inputname.jsp" SHAPE="224,260,55,30" SUBTYPE="jsp"
TITLE="inputname.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page1"
PATH="/pages/greeting.jsp" SHAPE="438,322,55,30" SUBTYPE="jsp"
TITLE="greeting.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#taxes.do" NAME="action1"
PATH="/taxes.do" SHAPE="298,307,110,44" TITLE="DependentsProcForm"
TYPE="action">
<PROCESS-ITEM-OUTPUT ENTITY="StrutsProcessItemOutput" ID="greeting"
NAME="forward0" PATH="/pages/greeting.jsp" TARGET="page1"
TITLE="greeting" TYPE="forward"/>
</PROCESS-ITEM>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page2"
PATH="/pages/dependents.jsp" SHAPE="23,300,55,30" SUBTYPE="jsp"
TITLE="dependents.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page3"
PATH="/pages/testtaxinp.jsp" SHAPE="391,238,55,30" SUBTYPE="jsp"
TITLE="testtaxinp.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page4"
PATH="/pages/Ques.jsp" SHAPE="621,313,55,30" SUBTYPE="jsp"
TITLE="Ques.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page5"
PATH="/pages/socsecno.jsp" SHAPE="183,36,55,30" SUBTYPE="jsp"
TITLE="socsecno.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="StartTaxes"
NAME="forward1" PATH="/pages/socsecno.jsp" SHAPE="43,36,110,27"
TARGET="page5" TITLE="StartTaxes" TYPE="forward"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page6"
PATH="/pages/PrintTaxVals.jsp" SHAPE="549,63,55,30" SUBTYPE="jsp"
TITLE="PrintTaxVals.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#action" NAME="action4"
PATH="/action" SHAPE="84,159,149,30" TITLE="socsecnoAction"
TYPE="action"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page7"
PATH="/pages/Dependents.jsp" SHAPE="444,159,0,0" SUBTYPE="jsp"
TITLE="Dependents.jsp" TYPE="page"/>
</PROCESS>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources/>
<form-beans>
<form-bean name="GetNameForm" type="demo.GetNameForm"/>
<form-bean name="DependentsProcForm" type="taxes.DependentsForm"/>
<form-bean name="AtomFDep" type="taxes.AtomFDep"/>
<form-bean name="socsecnoAction" type="taxes.socsecnoAction"/>
<form-bean name="socsecnoActionForm"
type="taxes.socsecnoActionForm"/>
</form-beans>
<global-exceptions/>
<global-forwards>
<forward name="getName" path="/pages/inputname.jsp"/>
<forward name="StartTaxes" path="/pages/socsecno.jsp"/>
</global-forwards>
<action-mappings>
<action name="GetNameForm" path="/greeting" scope="session"
type="demo.GreetingAction"/>
<action name="DependentsProcForm" path="/taxes.do" scope="session"
type="taxes.DependentsAction" unknown="false">
<forward name="greeting" path="/pages/greeting.jsp"/>
</action>
<action name="socsecnoAction" path="/action" scope="session"
type="taxes.socsecnoAction"/>
</action-mappings>
<controller/>
</struts-config>
I have the following files below. Basically, all I am trying to do is
to get *1* form to call the contents of the action form. All I keep
getting is:
"The requested resource (/action.do) is not available"
BTW, the .xml config file was generated by a product called Exadel - as
an FYI - Beware ....
Why do I keep getting the error? I just would like to know for my own
understanding ... I thought I did everything right (doc - concerned).
Is the information generated by the program (Exadel) wrong?
Kindest Regards.
/* CVS information: $Revision: 1.1.1.1 $ $Date: 2003/05/05 23:38:50 $
* $Source: /cvs-master/Exadel4_6/tomcat/LICENSE,v $
* $Author: sorits $
*/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<HTML>
<HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252">
<script type="text/javascript" src="data_check_functions.js"></script>
<script type="text/javascript" src="row_functions.js"></script>
</HEAD>
<style type='text/css'>
body {
font-family: Times;
font-weight: bold;
font-size: 100%;
}
</style>
<script type="text/javascript" ><!--
function PrepObj(Frm) {
with (document.forms[Frm]) return { Fawm:Frm, A:[
{F:"ProcID", W:"Process ID", H:"be in ###-##-#### format ",
V:RegCheckSocialOK},
{F:"FilerSocSecNo", W:"Filer Social Security Number", H:"be in
###-##-#### format ", V:RegCheckSocialOK}
] } }
--></script>
<BODY >
<FORM name="FrmStartPg" action="/socsecnoAction.do" method="post" >
<div ID="errmesg"> </div>
<table cellpadding="0" cellspacing="0" border="0" >
<tr>
<td width=400>
System Login ID
</td>
<td>
<INPUT TYPE ="text" style="width:300px" maxLength=11 name="ProcID">
</td>
</tr>
<tr>
<td width=400>
Social Security Number
</td>
<td>
<INPUT TYPE ="text" style="width:300px" maxLength=11
name="FilerSocSecNo">
</td>
</tr>
</table>
<br>
<INPUT type ="button" onClick="if (FTry2(PrepObj('FrmStartPg'))) {
process_single_form(this.form); }"
value=" Continue " name="Continue">
<br>
</FORM>
</BODY>
</HTML>
/*
* socsecnoAction.java
*
* Generated on Tue Jan 25 11:40:24 PST 2005
* by Exadel Struts Studio
*/
package taxes;
import java.io.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.util.MessageResources;
public class socsecnoAction extends org.apache.struts.action.Action {
public static final String GLOBAL_FORWARD_StartTaxes =
"StartTaxes";
// Global Forwards
public static final String GLOBAL_FORWARD_getName = "getName";
public socsecnoAction() {
// TODO: Write constructor body
}
public ActionForward execute(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
// TODO: Write method body
throw new UnsupportedOperationException("Method not
implemented");
}
}
/*
* socsecnoActionForm.java
*
* Generated on Mon Jan 24 05:33:26 PST 2005
* by Exadel Struts Studio
*/
package taxes;
import java.io.*;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionServlet;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.util.MessageResources;
import org.apache.log4j.Logger;
public class socsecnoActionForm extends
org.apache.struts.action.ActionForm {
private AtomFDep[] FDepList;
private FDep FDepQueryList;
private AtomFDep FDepDataQuery = new AtomFDep();
private int max, i;
private static Logger logger = Logger.getLogger("rfc.pattern");
public int load_data() {
logger.info("got inside");
FDepList = new AtomFDep[max];
for (i = 0; i < max; i++) {
logger.info("got one item "+ i);
FDepList = (AtomFDep) FDepQueryList.getRow(i);
}
logger.info(FDepList[1].getFilerSocSecNo() );
return 0;
}
public String getProcID() {
return this.ProcID;
}
public void setProcID(String inString) {
ProcID = inString;
}
public String getFilerSocSecNo() {
return this.FilerSocSecNo;
}
public void setFilerSocSecNo(String inString) {
FilerSocSecNo = inString;
load_data();
}
// Global Forwards
public static final String GLOBAL_FORWARD_getName = "getName";
// Local Forwards
private static final String FORWARD_ques = "ques";
public socsecnoActionForm() {
// TODO: Write constructor body
}
public ActionForward execute(ActionMapping mapping, ActionForm
form, HttpServletRequest request, HttpServletResponse response) throws
Exception {
// TODO: Write method body
throw new UnsupportedOperationException("Method not
implemented");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<PROCESS ENTITY="StrutsProcess">
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="getName" NAME="forward0"
PATH="/pages/inputname.jsp" SHAPE="19,254,110,27" TARGET="page0"
TITLE="getName" TYPE="forward"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#greeting" NAME="action0"
PATH="/greeting" SHAPE="167,320,110,30" TITLE="GetNameForm"
TYPE="action"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page0"
PATH="/pages/inputname.jsp" SHAPE="224,260,55,30" SUBTYPE="jsp"
TITLE="inputname.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page1"
PATH="/pages/greeting.jsp" SHAPE="438,322,55,30" SUBTYPE="jsp"
TITLE="greeting.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#taxes.do" NAME="action1"
PATH="/taxes.do" SHAPE="298,307,110,44" TITLE="DependentsProcForm"
TYPE="action">
<PROCESS-ITEM-OUTPUT ENTITY="StrutsProcessItemOutput" ID="greeting"
NAME="forward0" PATH="/pages/greeting.jsp" TARGET="page1"
TITLE="greeting" TYPE="forward"/>
</PROCESS-ITEM>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page2"
PATH="/pages/dependents.jsp" SHAPE="23,300,55,30" SUBTYPE="jsp"
TITLE="dependents.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page3"
PATH="/pages/testtaxinp.jsp" SHAPE="391,238,55,30" SUBTYPE="jsp"
TITLE="testtaxinp.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page4"
PATH="/pages/Ques.jsp" SHAPE="621,313,55,30" SUBTYPE="jsp"
TITLE="Ques.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page5"
PATH="/pages/socsecno.jsp" SHAPE="183,36,55,30" SUBTYPE="jsp"
TITLE="socsecno.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="StartTaxes"
NAME="forward1" PATH="/pages/socsecno.jsp" SHAPE="43,36,110,27"
TARGET="page5" TITLE="StartTaxes" TYPE="forward"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page6"
PATH="/pages/PrintTaxVals.jsp" SHAPE="549,63,55,30" SUBTYPE="jsp"
TITLE="PrintTaxVals.jsp" TYPE="page"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" ID="#action" NAME="action4"
PATH="/action" SHAPE="84,159,149,30" TITLE="socsecnoAction"
TYPE="action"/>
<PROCESS-ITEM ENTITY="StrutsProcessItem" NAME="page7"
PATH="/pages/Dependents.jsp" SHAPE="444,159,0,0" SUBTYPE="jsp"
TITLE="Dependents.jsp" TYPE="page"/>
</PROCESS>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD
Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources/>
<form-beans>
<form-bean name="GetNameForm" type="demo.GetNameForm"/>
<form-bean name="DependentsProcForm" type="taxes.DependentsForm"/>
<form-bean name="AtomFDep" type="taxes.AtomFDep"/>
<form-bean name="socsecnoAction" type="taxes.socsecnoAction"/>
<form-bean name="socsecnoActionForm"
type="taxes.socsecnoActionForm"/>
</form-beans>
<global-exceptions/>
<global-forwards>
<forward name="getName" path="/pages/inputname.jsp"/>
<forward name="StartTaxes" path="/pages/socsecno.jsp"/>
</global-forwards>
<action-mappings>
<action name="GetNameForm" path="/greeting" scope="session"
type="demo.GreetingAction"/>
<action name="DependentsProcForm" path="/taxes.do" scope="session"
type="taxes.DependentsAction" unknown="false">
<forward name="greeting" path="/pages/greeting.jsp"/>
</action>
<action name="socsecnoAction" path="/action" scope="session"
type="taxes.socsecnoAction"/>
</action-mappings>
<controller/>
</struts-config>