2012年2月17日 星期五

JSTL: format a message with parameter

 

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<fmt:message key="my.message.key">
<fmt:param value="${the.first.place.holder}"/>
<fmt:param value="${the.second.place.holder}"/>
</fmt:message>

2012年2月16日 星期四

Spring + Eclipse Tips

 

Issue:

java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener

解法 I:

檢查spring相關的jar在不在tomcat的發佈工程的lib下

檢查Deployment deployment Assembly


解法 II:

xml設置裡面用到的bean不對,可能名字寫錯了。

解法 III:
web.xml 文件的 <listener>標籤必須在<servlet>之前

 

 

Issue:

Hangs at “Initializing Java tooling”

http://tedvinke.wordpress.com/2010/06/21/eclipse-initializing-java-tooling-hangs/