IntelliJ and JSP HotSwap

Answered

 

Hi,

I having been working on this for a couple of days now but still no luck.

I’m using IntelliJ and Wildfly 8 (JBoss) and trying to enable the hotswapping (which is working perfectly in Eclipse). Although it works fine for the java classes, JSP files are not hotswapped. Here is the details of my environment:

The exploded folder structure looks like this (can’t be changed):

  • webapp.war
    • JS
    • IMG
    • CSS
    • WEB-INF
      • classes
      • lib
      • jsps

The Project Structure: enter image description here

The Run/Debug Configuration: enter image description here

enter image description here

Thanks in advance

0
15 comments
Official comment

@Saleh Noures

I was able to enable hot reload of the JSPs in your github sample project by adding the following dependency into the pom.xml and re-importing Maven changes. 

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-devtools</artifactId>
</dependency>

I have verified as follows: 

- started the run configuration (either in Run or Debug modes, verified both ways)

- opened login page, logged in, opened `members` page

- switched to IDE, edited member.jsp, (specifically changed the h1 title at line 19)

- in IDE forced Build Project 

- reloaded the page in browser 

=> no re-login is required, the updated title had been shown at the page.

All kudos for that go to spring boot, IDE don't need to do anything specific for this case. Does this work for you?

 

@Mcommerce02

Note that Spring Boot case is different to the case when you deploy application using Tomcat Run/Debug configuration.

If you are on the latter case, please submit new youtrack, describe your case in more details and attach `.idea` folder of your project. 

As you can see above, providing the sample project to reproduce an issue mat significantly speed up the resolution. 

Hope that helps, 

 

Hi, could you please provide a project example to reproduce the problem?

0

Hi Petr,

This project has a slightly different structure,  but the same thing, classes are swapped correctly but not the JSPs.

https://github.com/saleh-noures/SpringBootMvcSecurityJpa.git

 

Best Regards

Noures

0

I am also having the same problem recently with tomcat server.  The JSP page is not able to do a hotswap.  I am using 2017.2.4 version

0

Thanks @Michael Golubev

I remember I tried this before but did not work work for me.

However,  I did the same steps mentioned in your post but again no luck yet.

I added the devtool dependency, re-imported the maven changes, built the application successfully,  ran the application (both Run or Debug modes), then changed the member.jsp BUT nothing happened !

Have you changed any thing else ?

Best Regards

Saleh

 

 

 

0

@Saleh

Note that since Spring Boot run configurations do not have an option similar to "on Frame deactivation" actions from IDEA app server run configurations, one needs to explicitly invoke Build project *after every* change made in JSP. 

0
Avatar
Permanently deleted user

Resource hot deployment is not working at all, with wildfly and IntelliJ combination. I don't know why the No 1 developer IDE like IntelliJ is not yet supporting out of the box support for full hot deployment (minimum like what Eclipse gives). We have to depend on some super costly tool like JRebel or some flaky tool like HotSwapAgent and DCEVM. The most important and productive thing required for any developer is hot deployer tool only and not fancy plugins.

0

@Sreekanth Nair jsp hotswap should work. Please provide a sample project to check it's setup and steps to reproduce the issue. Thanks.

0
Avatar
Permanently deleted user

@Andrey Dernov Sure will provide the sample project and let you know once its ready, FYI we are using EAR deployment.

I and a few of my teammates are using a licensed version of IntelliJ and this becoming a big bottleneck for us. We bought around 20 licenses but hardly 5 to 10 developer are using it due to its lack of hot deployment capability.

0

Same goes with JSF. If I change the facelets in any way, only server restart will show the changes in browser. Developing JSF is impossible this way...

0
Avatar
Liubov Melnikova

Please create a support ticket for us regarding JSF issue.

0

Hi all, is there any update about his subjet.

I have the same Issue in IntelliJ. hotswap on JSP not working please help

0

Sridi Mansour

Please refer to https://www.jetbrains.com/help/idea/updating-applications-on-application-servers.html. If it doesn't work, file a bug at https://youtrack.jetbrains.com/newIssue?project=IDEA and attach a sample project to reproduce this issue.

0

Hey guys, is there any news about it? This hot deploy is not working for me.

0

Lheredia1195 Please see the comment just above yours. It should work just fine. In case it doesn't work for you, please file a bug or contact support at https://intellij-support.jetbrains.com/hc/requests/new with the sample project and the exact steps to reproduce.

0

Please sign in to leave a comment.