The <c:url> also performs another nice service. As you may be aware, relative URLs in HTML elements must either be relative to the page that contains them or to the root directory of the server (if they start with a slash). The first part of a URL path for a JSP page is called the context path, and it may vary from installation to installation. You should therefore avoid hard-coding the context path in the JSP pages. But sometimes you really want to use a server-relative URL path in HTML elements; for instance when you need to refer to an image file that’s located in an /images directory shared by all JSP pages, no matter where in the document structure the page reside. The good news is that if you specify a URL starting with a slash as the <c:url> value, it converts it to a server-relative path. For instance, in an application with the context path /myApp, the <c:url> action converts the path to /myApp/images/logo.gif:

<c:url value="/images/logo.gif" />
There are a few more actions related to URLs in the Core library. The <c:import> action is a more flexible action than the standard <jsp:include> action. You can use it to include content from resources within the same Web application, from another Web application in the same container, or from another server, using protocols like HTTP and FTP. The <c:redirect> action lets you redirect to another resource in the same Web application, in another Web application, or on a different server. Both actions are straightforward to use, so I leave it as an exercise for you to try them out.

from tomcat to resin,一点体会


to find setter method。google一番查到一个解释如下:
Q. I have a bean with a property whose second letter is capitalized.

Why won ‘t my JSP page that uses this bean compile?

A. This may not happen often, but can be difficult to determine why.

The reason is found in the Java Beans specification, where in section

"8.8 Capitalization of inferred names " it states:

Thus when we extract a property or event name from the middle of an

existing Java name, we normally convert the first character to lower

case. However to support the occasional use of all upper-case names,

we check if the first two characters of the name are both upper case

and if so leave it alone.

This means that if you have a bean with a setter method of "setXLoc ",

then the inferred property is "XLoc ", not "xLoc ". If you used this

bean in a JSP page and you tried to use "xLoc " as the property, it

would not compile. Using "XLoc " as the property would succeed.

If you insist on using "xLoc " on the JSP page, you can make this

by creating a BeanInfo class for the bean. The following is an example

of such a BeanInfo class for a simple bean called Coordinate. It

explicitly defines the properties of the bean to be "xLoc " and "yLoc

import java.beans.*;

public class CoordinateBeanInfo extends SimpleBeanInfo


private final static Class beanClass = Coordinate.class;

public PropertyDescriptor[] getPropertyDescriptors()


try {

PropertyDescriptor xLocDesc new PropertyDescriptor( "xLoc ",beanClass,
"getXLoc ", "setXLoc ");

PropertyDescriptor yLocDesc new PropertyDescriptor( "yLoc ",beanClass,
"getYLoc ", "setYLoc ");

PropertyDescriptor [] pdv = { xLocDesc, yLocDesc };

return pdv;

} catch (IntrospectionException e) {

throw new Error(e.toString());





I just
set it up as a regular application, like this:

Main class: com.caucho.server.http.ResinServer

VM parameters:
-Xdebug -Xnoagent -Djava.compiler=NONE
-Dfile.encoding=UTF-8 -XX:PermSize=64M -XX:MaxPermSize=64M

Program parameters:
-conf resin.xml

Working directory:

Use classpath and JDK of module:

Then I can "run" it or "debug" it with no problem and it logs directly
to the console in IDEA.

可怜plugin的那个作者在下面无奈的说”I know that the need for a
plugin is not that big…“,哈哈





 Intellij4.5下面配置tomcat,发现没法改动server.xml。Intellij总是在自己的临时目录底下开一个目录,建一套conf,我设置了tomcat base也不起作用。一怒之下看到它还是从catalina的一个startup.bat之类的bat文件开始启动tomcat的,就直接去改了那个bat,把calatina_base环境变量强制置成tomcat的安装目录(不读启动参数了),于是搞定。。



 <jsp:include page="<%=request.getParameter("xxx")%>" />


Categorized as Uncategorized Tagged , ,

 Lomboz配置 …


Tomcat5.0.30还跑不起来,在 http://dev.csdn.net/article/42/42567.shtm 这个blog的文章里看到解释(CSDN居然丢图片。。还是去搜了一把才在别的地方看到这个文章的图片)