![]() When you however add the build dir to the classpath and run the class, then JRebel should reload the classes without needing the rebel.xml file. To see the reloads you'd need to generate the rebel.xml file and build it into the jar. You can check if that's also the case with your application by running the app in command line.įirst run the Spring Boot jar file with JRebel and without a rebel.xml file and you'll see the reloads won't happen. The same thing sometimes also happens with an exploded web application started from an IDE. Such a setup doesn't need the rebel.xml file. In that case the classes being run are already in the build folder so they are reloadable and also the changes happen in a directory that is monitored by JRebel. However in many cases when running a standalone application inside an IDE, then the IDE doesn't run the jar file, but instead directly runs the classes from the build directory and adds the build directory to the classpath. To add the directories in the rebel.xml to classpath so JRebel would monitor them.To make JVM load the classes from the build directory.So if starting a jar file with JRebel and without a rebel.xml file then it wouldn't have any directories to monitor and wouldn't be able to reload anything. Regardless of the rebel.xml file, JRebel monitors all directories it can find in the classpath. Now try to change in any of your jsp, css, js, model classes, service classes dao classes, or wathever structure your application has.JRebel uses the rebel.xml file in order to remap your classpath resources and servlet resources to your build directory so that when you make a change in the IDE and build the class, then JRebel will detect the change in that build directory and reload the changed class. The application will now be deployed the traditional way, check out for messages in the Eclipse console, that JRebel actually is loading as it should. Start up the Tomcat server from Eclipse (Window | Show View | Servers), then right-click the server instance | Start. Server path, "/usr/local/tomcat", pointing to Tomcat install on my computerīuild a war-file in Eclipse using Ant in my case, and copying it over to the webapps directory. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.Server Location to "Use Tomcat installation (takes control of Tomcat installation).View section on configure WAR.Ĭonfigure Server in Eclipse (Window | Show View | Servers), setting Create a rebel.xml file, right-click project | JRebel | Add JRebel Nature, where the settings for classpath and webfolder has to be set.Ok after rubbing both of my braincells, and using the link that Anton tipped me, i got it to work out just fine. What i would like to be able todo is, set source down to file level, since the application i'm working on has a very specific folder/file structure, which deviates from the "normal" Hello World folder/file structure of a Web Project. "Web Deployment Assembly", where it is possible to set Source folder and corresponding target folder, this is however crippling, to that extent, that i can only point to folder level. Ok, let me try to evolve, in Eclipse, i right click the Web Project, choose "Properties", and then However, the application has a "non-standard" folder structure, that i find hard to control using the "Web Deployment Assembly", since i can only find support for folders. The ultimate goal is to take use of JRebel to avoid the traditional handling of war files, and instead just press F5 in the browser the make changes in the application shine trough. Hi i'm trying deploy a Java EE Web Project via Eclipse on a tomcat install on localhost (Tomcat v 7 at localhost).
0 Comments
Leave a Reply. |