本站首页    管理页面    写新日志    退出

The Neurotic Fishbowl

[/*Java*/]学习Struts
nybon 发表于 2005/1/28 10:34:54

最近不断在看Struts方面的资料,应该说Struts已经是很成熟的一种技术了,在网上的相关介绍也是连篇累牍,但是看了能够增进理解有所帮助的还是比较难见到。下面是我觉得在Struts学习中对我有帮助的一些资料: Preface: Core Technologies 用Struts建立MVC应用的介绍 Action Classes 下面是我学习中遇到的一些困难及解决: 在Tomcat上部署Struts的例子的时候碰到了问题,解决:Unable to find a javac compiler 表单数据验证失败时发生错误,“No input attribute for mapping path”,原因是没有填写配置文件action中的input属性值。解决:Struts中不同的Action和ActionForm组合  两次输入密码比较的验证,解决:Struts Validator: Validating Two Fields Match by Matt Raible. Howto article.开始漏看了最后一句重要的话,没看完就开始了,结果因为那个小问题浪费了两个多小时,真是不值得。 实现下拉框时出现错误"Cannot find bean under name org.apache.struts.taglib.html.BEAN"。解决:JSP FAQ @ jGuru 部署新的action时发生错误"No Action Instance for Path /CreateContent could be created",开始在网上找了一下,发现大多数此类错误都是由于Action的type名称写错了,但是我仔细核对发现这里没有错,我的错误在于没有将Action的type类声明成public的! 上面的数据验证的例子中采用的API调用已经被deprecated掉了,Struts 1.2用也还可以用,但是Eclipse里面会出来感叹号说不赞成使用ValidatorUtil和Resources.getActionError()方法,解决:Struts Upgrade Notes 11 to 124。 开了一个新的sample应用的时候,出现异常java.lang.IllegalArgumentException: Resources cannot be null.at org.apache.commons.validator.Validator.(Validator.java:188)后来发现是strut中没有添加validator插件,同时validation.xml文件和validator-rules.xml文件不存在 使用Struts将应用分成为几个模块配置的时候,无论如何配置,一直出现找不到子模块中的action的异常,"Cannot retrieve mapping for action /mindforce/SubmitLogon".后来发现原来是tab的链接没有通过action进行转发,而是直接写了要显示的jsp页面视图的url,因此struts进行模块间转换时无法自动识别,故action mapping找不到对应的action.正确的配置方法是:子模块中的action路径均填写模块下的相对路径,jsp页面中的action也填写相对于模块的路径而不要加上模块名称,struts会自动在模块切换时添加模块名.模块切换方法请见:5.3.3 Switching Modules 进行Struts开发时一些有用的工具: Scioworks™ Camino500)this.width=500'> 500)this.width=500'> Visual Modelling Tool for Struts Scioworks™ Camino500)this.width=500'> is a visual modelling tool for Jakarta Struts Framework, the de-facto J2EE web MVC framework. Designed for rapid assembly of web applications, its unique visual drag-and-connect paradigm allows for rapid development and re-wiring of web application with minimal coding.  Exadel Struts Studio 500)this.width=500'> Exadel Struts Studio now supports Eclipse 3.0.x. This version includes design-time JSP Preview, JSP, CSS, JavaScript and XML Prompting with autocomplete functionality, Java debugging of Web applications under the Tomcat, JBoss and Sun J2EE SDK environment, and one-step adding of Struts support to J2EE projects created with other Eclipse plug-ins. JamesHolmes.com Struts Console The Struts Console is a FREE standalone Java Swing application for developing and managing Struts-based applications. With the Struts Console you can visually edit JSP Tag Library, Struts, Tiles and Validator configuration files. The Struts Console also plugs into multiple, popular Java IDEs for seamless management of Struts applications from one central development tool. Visual Tags FWA Software's Visual Tags Dreamweaver extension suites for JSTL and Struts enable web developers to use Macromedia's Dreamweaver MX web design and development product to Visually design, implement, and maintain web pages for JSTL and Struts-based web applications Rapidly prototype web pages for JSTL and Struts-based web applications Exploit open source technologies with Dreamweaver to create JSTL and Struts-based web applications      

阅读全文(3211) | 回复(0) | 编辑 | 精华

 



发表评论:
昵称:
密码:
主页:
标题:
验证码:  (不区分大小写,请仔细填写,输错需重写评论内容!)

 
 



The Neurotic Fishbowl

.: 公告

This blog focuses on:

Semantic Web && Java Technology


Bloginess

«August 2025»
12
3456789
10111213141516
17181920212223
24252627282930
31

.: 我的分类(专题)

首页(171)
/*SemanticWeb*/(34)
/*Java*/(74)
/*FreeComments*/(59)
/*Agent*/(4)


In the Bowl

.: 最新日志

The End
使用Google Trends进行选型
怎样才能称为一次新的版本发行?
如何防止RSS信息过载
使用Excel作为用户接口
如何有效地报告Bug
sourceforge再次被封
趣文两篇
编写Firefox扩展
Jetspeed心得随笔


.: 最新回复

回复:Google API与yahoo 
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:Jbpm和Shark比较的feat
回复:JADE 3.3的bug
回复:JADE 3.3的bug
回复:[转]批判性地看待一种可行的表示技
回复:JIRA破解


The Fishkeeper
blog名称:SW Portal
日志总数:171
评论数量:219
留言数量:8
访问次数:1045263
建立时间:2004年10月30日



Text Me

.: 留言板

签写新留言

路过
路过
页脚问题
RE:请问一下你的主页的下面部分是怎么关
请问一下你的主页的下面部分是怎么关闭的?
我是做Mobile Agent的
Gmail
不错
不错啊小倪同学


Other Fish in the Sea

.: 链接





站点首页 | 联系我们 | 博客注册 | 博客登陆

Sponsored By W3CHINA
W3CHINA Blog 0.8 Processed in 0.031 second(s), page refreshed 144760333 times.
《全国人大常委会关于维护互联网安全的决定》  《计算机信息网络国际联网安全保护管理办法》
苏ICP备05006046号