struts1标签加载不了

ChengwanWu 2010-01-13 11:01:19
<%@ page contentType="text/html;charset=gbk"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<html:html lang="true">
<head>

</head>
<body>
<center>
<jsp:include flush="true" page="../inc/template.jsp">
<jsp:param name="url" value="../"/>
</jsp:include>

<h1>用户注册</h1>
<html:form action="jsp/user.do" method="post">
用户ID:<html:text property="userid"></html:text>
<br>
用户密码:<html:password property="userpwd"></html:password>
<br>
确认密码:<html:password property="confirmpwd"></html:password>
<br>
丢失密码提示问题:<html:text property="userques"></html:text>
<br>
丢失密码问题答案:<html:text property="userans"></html:text>
<br>
验证码:<html:text property="checkcode"></html:text>
<img src="image.jsp"><br>
<input type="hidden" name="status" value="register">
<input type="hidden" name="type" value="1">
<html:submit value="注册"></html:submit>
<html:reset value="重置"></html:reset>
</html:form>
</center>
</body>
</html:html>

这段代码运行到如果删除<html:form action="jsp/user.do" method="post"></html:form>标签内容,可以正常显示“用户注册”和以及更前面的内容,一旦加上<html:form action="jsp/user.do" method="post"></html:form>页面显示就是空白,产看页面源文件的时候,里面显示只加载到<center>这个的开始标签,以后的全是空白,请问这是怎么回事,怎么解决?
...全文
136 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
chpublish1012 2010-01-13
  • 打赏
  • 举报
回复
user.do你加个jsp再前面干什么
ChengwanWu 2010-01-13
  • 打赏
  • 举报
回复
<action-mappings >
<action
attribute="userForm"
input="/jsp/errors.jsp"
name="userForm"
parameter="status"
path="/user"
scope="request"
type="org.lxh.myzngt.struts.action.UserAction">
<forward name="registersuccess" path="/jsp/index.jsp"></forward>
<forward name="registerfailure" path="/jsp/register.jsp"></forward>
</action>
</action-mappings>
那这里写的对吗?
chpublish1012 2010-01-13
  • 打赏
  • 举报
回复
html:form 会自动检查有没有这个.do 没有就不显示了
检查一下看是不是写错了
caichengzyokokok 2010-01-13
  • 打赏
  • 举报
回复
.do删掉,struts标签会在struts被处理自动加上的
connor_zheng 2010-01-13
  • 打赏
  • 举报
回复
<html:form action="jsp/user.do" method="post">
你把jsp/user.do改成一个静态的html测试哈
子龙奶爸 2010-01-13
  • 打赏
  • 举报
回复
<html:html lang="true"> 去掉,没用的。
</body>标签换成</html:body>试试看
ChengwanWu 2010-01-13
  • 打赏
  • 举报
回复
把jsp去掉还是不行

67,538

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧