You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nathan Anderson <na...@sum-ware.com> on 2001/09/12 19:52:29 UTC
Strut by Strut Example by Ted Husted
I am trying to learn Struts, and I am impressed by the collection of
material on www.husted.com. I have been able to successfully install and
run the tutorial from www.jspinsider.com, but the Strut by Strut example
doesn't seem to work. Here is the system I'm running Struts on:
Windows 2000 [sp2]
Tomcat 3.2.3
Struts 1.0
JCreator v2.0 is my IDE [basically a highlighting text editor].
Here is what happens. I have downloaded and installed the struts-stub.war,
then started up Tomcat. When I point my browser to
http://localhost:8080/struts-stub/ I properly get directed to
http://localhost:8080/struts-stub/index.jsp. The page displays, but when I
click on the "Enter" button nothing happens. A snippet of the HTML source
follows.
Thanks for any help in this matter.
Nathan Anderson
---
<form name="stubForm" method="POST"
action="/struts-stub/stub/Insert.do;jsessionid=67u3zh4l61" onsubmit="return
submitForm(this);">
... [form fields omitted] ...
<td align="right" colspan="3"> <input type="hidden" name="validate"
value="0"><input type="submit" name="submit" value="ENTER"
onclick="this.form.validate.value='1';"> <input type="submit"
name="org.apache.struts.taglib.html.CANCEL" value="CANCEL"
onclick="this.form.validate.value='0';"></td>
</tr>
</form>
<script language="JavaScript" type="text/javascript">
<!--
document.forms["stubForm"].elements["property0"].focus()
// -->
</script>
<SCRIPT LANGUAGE="Javascript1.1">
<!-- Begin
function validateStubForm(form) {
return null;
}
// End -->
</SCRIPT>
<script language="javascript">
<!--
function submitForm(form) {
if (form.validate.value == "0") {
return true;
}
if (validateStubForm(form)) {
form.submit.value=" ...";
return true;
}
else return false;
};
// -->
</script>