Document JSP limitations with executable JAR or WAR

pull/272/head
Andy Wilkinson 11 years ago
parent a2f70c6f4f
commit d64b18cca9

@ -229,6 +229,30 @@ can also register items directly if your bean implements the `ServletContextInit
interface.
### JSP limitations
When running a Spring Boot application that uses an embedded servlet container and is
packaged as an executable JAR or WAR, there are some limitations in the JSP support.
Due to the way that Jasper (Tomcat and Jetty's JSP engine) loads tag libraries, tag
libraries packaged in JAR files nested within the JAR or WAR will not work correctly.
When packaged and run as an executable JAR, you will see an error message produced during
application startup that is similar to the following:
> org.apache.jasper.JasperException: The absolute uri: http://www.springframework.org/tags
> cannot be resolved in either web.xml or the jar files deployed with this application
When packaged and run as an executable WAR, you will see an error message produced during
application startup that is similar to the following:
> java.io.FileNotFoundException: JAR entry
> WEB-INF/lib-provided/tomcat-embed-jasper-7.0.47.jar!/javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
> not found in my-app.war
To avoid these limitations, rather than using the embedded servlet container support,
package your application as a traditional (non-executable) WAR file and deploy it to a
servlet container. Alternatively, you may want to consider using an alternative view
technology.
## Using YAML instead of Properties
[YAML](http://yaml.org) is a superset of JSON, and as such is a very convenient format
for specifying hierarchical configuration data. The `SpringApplication` class will

Loading…
Cancel
Save