Does Eclipse Web Tools project handle refactoring inside JSP?

I installed the Web Tools project for Eclipse version 3.4. I tried to make refactoring work the way I think, and was not successful.

I have one Java project that contains Java classes for jar, which is placed in / WEB -INF / lib for the website. In another project (Dynamic Web project) there are JSP files for the same site. The Dynamic Web project is configured with the Java project as a required project in the build path. I also set the Project References option for the Dynamic Web project to reference the Java project.

If I use refactoring to change the name of a method in one of the Java classes, I would expect that references to this method in JSP will be renamed. But that does not work. Links in a Java project that contains a class and other Java projects that use this class have links that have changed, are refactored, but do not reference the method inside the JSP.

I have been doing this for several days, trying to use different versions of Eclipse and WTP. Delete all my projects and files and configure them again. Nothing matters.

Does this work for someone else? Is there anything special I need to get this to work?

+5
source share
4 answers

, , , , ... , , :

b , java- jsp. . , . , , , , .

(), (, ), DRY ( ) Java .java , .

, web.xml , , jsps, , ...

<jsp-config>
  <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <scripting-invalid>true</scripting-invalid>
  </jsp-property-group>
</jsp-config>

, , - , IntelliJ Idea , ( eclipse , IDE)

+1

, WTP ( Eclipses) Java- JSP , : , . , Eclipse <jsp:import> JSP .

- JSP Eclipse.

( Java- JSP MVC-, ...)

+2
+2

, , , , . , - .

, .

0

All Articles