Jbuilder8开发J2ee学习笔记(8)

王朝java/jsp·作者佚名  2006-01-08
宽屏版  字体: |||超大  

Jbuilder8开发J2ee学习笔记(8)

作者:缪青

现在加入我们的资源文件ApplicationResources.properties

这个文件为纯文本文件,内容为

login.title=Struts Demo

login.heading=<h1>Welcome to the StrutsDemo !</h1>

login.message=Welcome to the StrutsDemo !

input.xiwbz=Please input xiwbz :

input.shancbz=Please input shancbz :

loginOK.title= User Login Successfull

inputOK.message=<h1>Login Successfull !</h1>

error.shancbz.required=<h3><font color="red">shancbz is Required !</font></h3>

error.xiwbz.required=<h3><font color="red">xiwbz is Required !</font></h3>

error.Shancbz.wrong=<h3><font color="red">Shancbz is Wrong !</font></h3>

error.Xiwbz.wrong=<h3><font color="red">Xiwbz is Wrong !</font></h3>

errors.footer=</ul><hr>

errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>

开发好后放到src\strutsdemo下,加入项目后,选这个文件的属性如下:

双击struts-config.xml,做如下修改:

一左一右的Path,Name很清楚的映射关系了吧。

双击web.xml,双击Servlets->action,

做如下增加application->strutsdemo.ApplicationResources:

1.如何发布

现在struts-config.xml和web.xml都修改好了,编译我们的StrutsDemo一切成

功后,拷贝WEB-INF目录,和input.jsp,inputError.jsp,inputOK.jsp到C:\bea\wlserver6.1\config\mydomain\applications\DefaultWebApp下就好了,当然这时候Weblogic6.1应该运行着

2.测试

Ie中地址栏书写http://127.0.0.1:7001/input.jsp,这里的127.0.0.1你可以按具

体环境改。第一页是输入部分,程序要求用户输入2个大于等于2位的字符,或是数字,通过后会有成功页面。如果有错误,会进入相应的错误页面。

备注

Jbuilder8开发JSP要安装补丁,请在网络上寻找。也可以在CSDN上寻找。

有什么看法可以发邮件topgun1@21cn.com给我,大家探讨。

可以转帖,但是没经过授权希望不要修改本文档。

本文档参考了,CSDN上的一些文章,在次对这些文章的作者表示感谢。

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
© 2005- 王朝网络 版权所有