问题描述:

In JSP editor I am getting JSP Autocomplete options -

But I cannot get JSP Java Autocomplete options -

网友答案:

This is from http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.wst.sse.doc.user%2Ftopics%2Ftsrcedt023.html:

Enabling content assist for JSP files

Having the proper files defined in the Java™ build class path is essential for content assist to work properly in JSP files. It is also essential for the links builder to be able to correctly resolve links to servlets or Java beans in JSP and HTML files.

To enable content assist for JSP files:

  1. To determine whether the build path is correct, select Properties from the project's pop-up menu.

  2. Select Java Build Path, and then the Libraries page. You should see the following files:

    • j2ee.jar
    • rt.jar
    • servlet.jar
    • webcontainer.jar
  3. If they are not present, add them as External JAR files. You may have your own versions of these files, depending on the level of JDK or Servlet API for which you are developing.

  4. If your Web applications reference other JARs, you can place them in the build path as follows:

    • Use the Add JARs button on the Library page. You must ensure that the JAR file is available to the server by properly configuring the server.

    • Add the JARs to the WEB-INF/lib directory. They will be automatically added to the build path and deployed to the server in as part of the project WAR.

相关阅读:
Top