Now JSP breakpoints should work, provided that you started your server with the proper debug arguments. button, and select the folders with the beans, classes and libraries that your JSPs depend on. Open the module settings ( F3 on the project folder), and add a Web Facet under Facets, and under Web Resource Directories specify your JSP root folder.Ĭlick the Configuration. Make sure you set the correct port in Startup/Configuration > Debug. Setting Application Server: Generic should work fine. Go to Preferences > Plugins, search for the JSR45 plugin, andĬreate a run configuration: Run > Run Configuration > click the + button, and pick JSR45 Compatible Server, and then in the dialog that opens, select Remote, and set server host and port. Please note this feature is only supported in the Ultimate edition of IntelliJ, not the community edition. If you don’t see Tomcat in the list of available application servers to add, check the plugins in the general Intellij settings pane: in the latest releases, more and more functionality has become “pluggable”, and even very basic functions may be disabled this plugin is called “Tomcat integration”.įinally, it is surely not true that JSP files need to be under WEB-INF to be under debugging.įor remote JSP debugging (which also applies to localhost) you'll need to install the JSR45 support plugin. The same configuration works if you want to use another web application server, I tested it with the latest Caucho Resin releases and debugging works fine (it didn’t with the previous Intellij and Resin combinations). The last trick is going to the “Deployment” tab and selecting as “Deployment source” the same facet that you configured in the previous step. Be sure to have a local Tomcat installation before you do this, and point to that when adding the web application server. In the list of application servers, you should have the default one, Tomcat. In this way Intellij will be able to intercept JSP calls. (Web) Application server: Go to “edit configurations”, there you have to add to configurations an application server, not launch the web server as an application like any other. Remember in the “Java EE build settings” tab to set as anable “Create web facet exploded directory” if you don’t want duplications, a trick is just to enable it and point to your already existing directory. Depending on the kind of web application structure you are using, the facet may be detected automatically by Intellij (go anyway to check what it has done) or you may have to add it manually. Web application Configuration: in order to have JSP debugging, you must have a “web” facet in your project structure, pointing to the correct web.xml file. In order to enable JSP debugging you must do two steps: set a web application configuration in your project and add a web application server configuration. previous versions you will need to do similar operations as the concepts are the same. In the following I refer to Intellij 8 configuration, w.r.t. The fact that Intellij always allows you to add a breakpoint on a JSP line does not necessarily imply that you’ve configured JSP debugging. For JSP debugging in Intellij there are some configurations that must be in order.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |