Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unexpected HTML/JSP warnings in Eclipse IDE

Tags:

html

eclipse

jsp

I'm relatively new to HTML. I was initially working in a .html document which did not give me any warnings out of the ordinary in Eclipse. However, I changed it to a JSP, with a few added functionalities and now I seem to be getting certain warnings like

Multiple annotations found at this line:
- Invalid location of tag (td).
- Undefined attribute name 
 (width).

for lines such as

<td width="300"><label for="select">Based on:</label>
    <form:select path="basedOn">
        <form:option value="Event_Name" label="Event Name"/>
        <option value="Product_Name">Product Name</option>
    </form:select>
</td>

even though it seems to be working fine when I try it in my browser.

I did see similar SO posts where they had suggested that this might be because my version of eclipse might be outdated, but that is not the issue here; eclipse is up to date.

Is it a problem with how I coded the JSP or is this a known issue? In either case, can I suppress the warnings in any way?

like image 793
Roney Michael Avatar asked Feb 18 '23 08:02

Roney Michael


1 Answers

  1. Right click on your project, Properties -> Validation (or you can go to Window -> Preferences -> Validation to do this globally).
  2. Uncheck "Build" for HTML syntax validation OR Click ellipsis under "Settings" and add a rule to exclude specific file name / extension / what have you.

No problem with this warnings for you.

like image 124
PSR Avatar answered Feb 27 '23 20:02

PSR