How do I reload dynamically my jsp from an EAR ?
Deploy your JSP as part of an application deployed in exploded format. (That is create a folder named yourapplication.ear’ and inside it create a folder yourwebapplication.war).
This is the suggested deployment’ strategy when you’re developing your applications because changes to the JSP pages take effect immediately. Therefore, you don’t need to redeploy the application nor restart the server.
Note for JBoss EAP 6 / JBoss AS 7 users:’ make sure you have set the development attribute to “true” in your jsp-configuration’ :
<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
<configuration>
<jsp-configuration development="true" keep-generated="false" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
</configuration>
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
<virtual-server name="default-host" enable-welcome-root="true">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
WildFly users, on the other hand, need to specify development mode to true in the jsp-config element:
<subsystem xmlns="urn:jboss:domain:undertow:1.1">
. . . .
<servlet-container name="default" default-buffer-cache="default" stack-trace-on-error="local-only">
<jsp-config development="true" check-interval="1" modification-test-interval="1" recompile-on-fail="true"/>
</servlet-container>
</subsystem>
‘
‘
Recommended Articles
WildFly Servlets and JSP Compilation Locations Explained
Discover where WildFly stores compiled Servlets from JSP pages in different deployment modes. Learn about file system paths for JBoss AS 5, JBoss EAP 5, and Domain mode.
Enable Logging in WildFly and Log4j for JSON Format - A Comprehensive Guide
Learn how to configure logging in JSON format in WildFly. Includes native configuration and using Log4j custom settings.
Admin Tip: Check WildFly Configuration Changes with CLI in Just Two Steps
Learn how to audit and track configuration changes for your WildFly Server using the Command Line Interface. #WildFly #Java #CloudNative
Integrate JRebel with JBoss AS 7.1.1 for Instant Code Changes and Improved Development Experience
Learn how to integrate JRebel with JBoss AS 7.1.1 for instant code changes, versioning classes and resources individually, and updating one at a time without redeploying.