facebook

Strange warnings in JSP

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

    Olov_Felton
    Member

    Hello!

    I have enabled all warnings possible under prefrences / Compiler, except “Unqualified acces to instance fields” and “Usage of non-externalized strings”. (To assist me in writing better java classes)

    This results in some strange warnings on line 1 in JSP files. The easiest way to see the warnings I am refering to is to create a new JSP file through the JSP wizard. (code generated included at en of post)

    I now have five warnings on line 1:
    -Javadoc: Missing comment for public declaration
    -Empty block should be documented
    -The import java.util is never used
    -The import java.lang is never used
    -The parameter o is never read

    The two warnings about import are correct as they never are used, but the other ones I can’t realy understand. The last one i abolutely wrong as there is no parameter o in the code at all.
    Even if I delete everything in the file, resulting in a completely empty file I still have three of the warnings listed above, not the ones about import. The one that i find most strange is the one about parameter o.

    Is there something I have missed, or is this a bug in MyEclipse?

    /Olov

    P.S. I love MyEclipse! I do like the new DB capabilities. Keep up the good work!

    I am running Eclipse 3.0 and MyEclipse 3.8 Beta-2 on XP with Tomcat 5.0 java 1.4.2_05. (problem existed on earlier versions of MyEclips but where only shown if errors existed in the JSP file)

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN”>
    <html>
    <head>
    <base href=”<%=basePath%>”>

    <title>My JSP ‘MyJsp.jsp’ starting page</title>

    <meta http-equiv=”pragma” content=”no-cache”>
    <meta http-equiv=”cache-control” content=”no-cache”>
    <meta http-equiv=”expires” content=”0″>

    <meta http-equiv=”keywords” content=”keyword1,keyword2,keyword3″>
    <meta http-equiv=”description” content=”This is my page”>

    <!–
    <link rel=”stylesheet” type=”text/css” href=”styles.css”>
    –>
    </head>

    <body>
    This is my JSP page. <br>
    </body>
    </html>

    #209762 Reply

    No Operation
    Member

    Those warnings are coming from the generated code (JSP->Java), which is not commented with JavaDoc.
    There might be some filter missing, which would remove those warnings.

    NOP

    #210454 Reply

    Matsuo
    Member

    Hello nop,

    Are you understating that you can tell the compiler to suppress/ignore warnings using javadoc ?
    I saw such thing with the JDK 1.5 annotation suppresswarning.
    But is it possible to accomplish this as of JDK 1.4 ?

    Mat.

    #210469 Reply

    No Operation
    Member

    Think it is possible with any JDK to suppress warnings.
    The trick is to distinguish between JSP compiler generated warnings and real user warnings. E.g.:

    <% String foo = "hello"; %>

    where foo is never used, should always result in a warning if the warnings are enabled in the compiler settings.

    NOP

    #210887 Reply

    Just ran into the JavaDoc warning myself. It would be great if this could be suppressed for JSP only. I rely on the feature for normal Java compiling, but I don’t want it nagging me for JSPs.

    #215448 Reply

    Brett Connor
    Member

    Did this ever get resolved? I am in the same situation of wanting this reporting in our projects, but these JSP warnings are poluting the output. Can they either be supressed, or the JSP generated with javadoc (is this a MyEclipse component that generates the jsp or a 3rd party bit – forgive my ignorance on this?). Thanks.
    Brett

    #215455 Reply

    Scott Anderson
    Participant

    Brett,

    This should work properly now in 3.8.1. By the way, if you’re still using a beta or something we should be putting out 3.8.2 in several days in case you want to wait and only install once.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: Strange warnings in JSP

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