facebook

<%@ page %> directive not fully supported [Closed]

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #214419 Reply

    djacobs
    Member

    Sorry, I originally posted this on the support forum, where it probably doesn’t belong.

    It appears that the MyEclipse JSP editor does not fully support the JSP 1.2 & 2.0 syntax for the <%@ page import=””> directive. According to the spec, the quoted value may be either a single package name or a comma-separated list of package names. But the following directive in one of my JSPs:

    <%@ page import=”java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.DriverManager, java.sql.SQLException, java.sql.ResultSet, java.text.*” %>

    produces the following error in the JSP editor:

    Multiple annotations found at this line:
    – Syntax error on tokens, delete these tokens (in file: “java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.DriverManager, java.sql.SQLException, java.sql.ResultSet, java.text.*”)
    – The public type Print must be defined in its own file (in file: “java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.DriverManager, java.sql.SQLException, java.sql.ResultSet, java.text.*”)
    – The import java.sql.SQLException is never used (in file: “java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.DriverManager, java.sql.SQLException, java.sql.ResultSet, java.text.*”)

    Posting guidelines information:
    – Operation System: Windows XP
    – Eclipse Version: Version: 3.0.0 Build id: 200406251208
    – Fresh install of Eclipse and MyEclipse
    – Other Plug-ins: Visual Source Safe Plug-in for Eclipse
    – Eclipse Version: 3.8.1+QF20040825
    – JDK 1.4.2_05
    – Application Server: Tomcat 5.0.27

    Thanks,
    –dave

    #214422 Reply

    Riyad Kalla
    Member

    Dave,
    Right next to where it specifies the format for the import statements, it also notes that imports are only honored when the page language attribute is set to “java”, so you need to add a:
    language=”java”

    attribute to your page directive.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: <%@ page %> directive not fully supported [Closed]

You must be logged in to post in the forum log in