JSP support not configured

Jetty內嵌 測試代碼時,瀏覽jsp頁面報錯:
java

JSP support not configured

這時查看下後臺的consol,會發現有以下日誌信息:spring

NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServletless

…………
eclipse

No JSP support.  Check that JSP jars are in lib/jsp and that the JSP option has been specified to start.jarjsp

而個人依賴了明明加了jetty-jsp,以下:maven

<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jsp</artifactId>
			<version>9.3.0.M1</version>
		</dependency>

百般查詢,始終沒找到合適的解決方法。後來又細看了下maven 庫裏的jetty-jsp版本,發現:測試

原來我添加的依賴不是release版本(費了我大半天時間……)。因而將版本修改以下:spa

<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-jsp</artifactId>
			<version>9.2.15.v20160210</version>
		</dependency>

至此,測試成功。rest

另外,至於milestone版本是什麼意思,參考該兄弟寫的:日誌

Now, the Spring Milestone repo is a standard Maven repo - plugin or otherwise doesn't matter overmuch.

It's policy at Spring to publish milestone releases to the general public for those interested in testing them. Almost all publishing of Java binary artefacts is done on Maven these days. Hence these milestones are published into a Maven repo.

To make clear that these milestones releases are not to be used in production code they are published to a separate repo rather than Maven Central. Basically, don't use milestones unless you know what you are doing. And expect bugs.

連接以下:http://stackoverflow.com/questions/32356053/what-is-a-spring-milestone

相關文章
相關標籤/搜索