How to see JSP changes without redeployment
In this article we will learn how to see automatic changes in your Jakarta Server Pages without the need of redeploying your applications.
Prerequisites
To allow automatic reload of JSP pages you need to use an exploded deployment format. To learn more about the different types of deployment on WildFly, we recommend checking this article: How to deploy applications on WildFly
How to enable automatic changes in JSP pages
Next, let’s see how to enable automatic changes for JSP pages. The attribute which you need to configure is development, which is part of the servlet-container configuration of your Undertow server:
<servlet-container name="default">
<jsp-config development="true"/>
<websockets/>
</servlet-container>
To set it from the Command Line, you can use the following command:
/subsystem=undertow/servlet-container=default/setting=jsp:write-attribute(name=development,value=true)
Automatic reloading in JBoss EAP 6
On the other hand, if you are using an older version of the application server (such as JBoss EAP 6), the attribute to set is still development but it belongs to the configuration of the jsp-configuration element. For example:
<subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
...
<configuration>
<jsp-configuration development="true"/>
</configuration>
</subsystem>
Recommended Articles
Manage Exploded Deployments in WildFly for Efficient Java Enterprise Applications
Learn how to configure and explode deployments in WildFly for efficient Java enterprise applications. Discover the benefits of exploded deployments and get step-by-step guides on configuring and exploding your WildFly deployment.
Enable or Disable Hot Deployment in WildFly Application Server - A Comprehensive Guide
Learn how to control hot deployment in WildFly with CLI commands and configuration files for optimal performance.
Deploy Applications to WildFly: Custom Deployment Directory Tutorial
Learn how to configure custom deployment directories for WildFly applications. #WildFly #JavaDeployment #CloudNative
[Solved] Fix "Failed to start service jboss.deployment.unit" in WildFly
Learn how to solve the 'Failed to start service jboss.deployment.unit' error in WildFly & JBoss EAP. Decode deployment phases (.PARSE, .DEPENDENCIES, .INSTALL) and fix root causes.