<html:form action="LaiDianAction">
<input type="text" name="id">
<input type="text" name="name">
<input type="submit" name="cmd">
</html:form>
如果把上面改成
<form action="LaiDianAction">
<input type="text" name="id">
<input type="text" name="name">
<input type="submit" name="cmd">
form>为什么就不对,会找不到action呢?我以前用不使用标签的也没出问题啊,请指教。。
<input type="text" name="id">
<input type="text" name="name">
<input type="submit" name="cmd">
</html:form>
如果把上面改成
<form action="LaiDianAction">
<input type="text" name="id">
<input type="text" name="name">
<input type="submit" name="cmd">
form>为什么就不对,会找不到action呢?我以前用不使用标签的也没出问题啊,请指教。。
你的代码结尾的
form>
似乎少了一个<
原因可能和楼上说的一样
或者你的form属性没写对
在XML文件中定义过Action了吗
不使用Struts的HTML标签,路径一定要加后缀的
<form action="LaiDianAction.do">
</form>
or
<form name="form1" method="post" action="LaiDianAction.do?method=XXX">
</form>
不用的话输入框不会自动赋值的.
一定要用struts的html标签,struts才 会自动从request里getAtrribute,拿出form,然后给相应属性的html标签赋值