本文转自TSS
http://www.theserverside.com/tt/articles/article.tss?l=SmartURLs
In this article, we jettison XML gluecode for "convention over configuration". Using the SmartURLs plugin for Struts 2, we can autowire Action classes to page templates with search-engine-optimized URIs.
This article covers: ...
取值要通过<s:property value="" />或在任意的<s:/>标签内使用%{};
当Action的valueStack中有该属性的值时,只需直接使用该属性的名字即可;
当Action的valueStack中没有该属性的值时,比如在session,application范围中的属性值时,需要加#或者#attr.;
例子:
假设某Action中有person成员变量,在application中存在company属性
那么我们可以通过以下方法取值:
<s:property value="person.name" />
<s:property value=" ...
使用JDK1.4运行Struts2.0
转自http://www.blogjava.net/puras/archive/2007/11/14/160590.html
刚刚把做完的项目从JDK5上移植到JDK1.4,事后整理一下,常常记记备忘录是个灰常好的习惯滴.呵.
Struts2.0默认的平台需求是:
Servlet API 2.4
JSP API 2.0
Java 5
但是因为一些原因,我们必须使用JDK1.4来编译,所以只能应用Struts提供的J4,来进行一下移植了,说实话,还是挺好的,只需要简单的操作,便可以把JDK更改为1. ...
http://blog.csdn.net/pharaohsprince/archive/2007/02/07/1504850.aspx







评论排行榜