<%@ page contentType = "text/html;charset = UTF-8" language = "java" %><%@ taglib uri = "/WEB-INF/struts-bean.tld" prefix = "bean" %>
<%@ taglib uri = "/WEB-INF/struts-html.tld" prefix = "html" %>
<%@ taglib uri = "/WEB-INF/struts-logic.tld" prefix = "logic" %><html:html locale = "true">
<head>
<title><bean:message key="hello.jsp.title"/></title>
<html:base/>
</head>
<body bgcolor="white"><p>
<h2><bean:message key="hello.jsp.page.heading"/></h2><p>
<html:errors/><p>
<logic:present name="personbean" scope="request">
<h2>
<bean:message key="hello.jsp.page.hello"/>
<bean:write name="personbean" property="userName"/>!<p>
</h2>
</logic:present>
<html:form action="/HelloWorld.do" focus="userName">
<bean:message key="hello.jsp.prompt.person"/>
<html:text property="userName" size="16" maxlength="16"/><br>
<html:submit property="submit" value="Submit"/>
<html:reset/>
</html:form><br>
</body> </html:html>
解决方案 »
- 弹出似网站留言板如何设计(利用java技术)
- 关于try语句的执行顺序
- 编程错误提问
- 在webwork下使用velocity的问题
- 对于Textfield没有写东西,getText()的返回值问题!
- 用spring的SimpleFormController可以一次更新多个对象么?
- UBB的问题
- 有谁在weblogic集群部署过WEB服务没?我的发生了一个奇怪错误,有空的进来帮我看一下
- struts问题,Cannot find ActionMappings or ActionFormBeans collection,不好意思就这么多分了
- MEJB附录B,jndi例子无法运行的问题
- 请教:用jdbc连接数据库,报错“Error establishing socket”,是怎么回事啊?
- struts通用性问题?50分啊
"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
<struts-config>
<form-beans>
<form-bean name = "HelloForm" type = "hello.HelloForm" />
</form-beans>
<action-mapping>
<action path = "/HelloWorld"
type = "hello.HelloAction"
name = "HelloForm"
scope = "request"
validate = "true"
input = "/hello.jsp"
>
<forward name = "SayHello" path = "/hello.jsp" />
</action>
</action-mapping>
<message-resources parameter = "hello.application" />
</struts-config>
这句咋看咋别扭。
为什么要property="submit" value=""???
改为以下内容<html:submit>保存</html:submit>
<html:submit property="submit" value="Submit"/>
这个没问题。这个错误信息是说没有找到相应的message资源文件。
看一下WEB-INF/classes/里面有没有hello.application.properties这个文件。
要是有的话,再确认一下,文件里面有没有
hello.jsp.title=XXX
hello.jsp.page.heading=XXX
等等所有用到的message key