| Summary: | Incorrect "Undefined Attribute" Warning in JSP Editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Carsten Friedrich <carsten> | ||||
| Component: | jst.jsp | Assignee: | Nitin Dahyabhai <thatnitind> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | david_williams, for.work.things, mauromol, rkalla, thatnitind | ||||
| Version: | 0.7 | ||||||
| Target Milestone: | 2.0 M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Amy, will you please triage these to determine proper owner (if you can't fix, that is). Phil, I think you may be more familiar with this than I. Mass transfer from pa to dw. Needs more triage. I would like to report other two little examples where the JSP editor gives this kind of warning:
---
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Test</title>
</head>
<body>
<%
final boolean pippo = true;
%>
<form>
<input type="checkbox" <%=pippo? "checked":"" %> >
<input type="checkbox" <%if(pippo){%>checked<%}%>>
</form>
</body>
</html>
---
The two rows with "<input type... etc.>" generate the warnings.
I noticed that no warning is given if the scriptlets are not within the definition of a tag (like "<input type...>").
I hope this can help you to solve the problem.
Mauro.
I ran into the identical problem Mauro did and have attached a project that exhibits the issue (just import it, and open the only JSP in the project). Created attachment 48962 [details]
Project to test the problem with
Did I accidentally create a dupe with bug 143209? Oh, yeah. Guess so. And I see in that bug you already have a fix for the bug, so I'll just go ahead and assign this bug to you. Closing as fixed since M2. Please reopen if closed in error. |
I have the following code in a .jsp file: [...] <FORM action="" method="post"> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="34" class="FormFieldDesc"> <div align="right">Fund </div> </td> <td width="20"><select name="fund"> <%String error= ""; for (int i= 0; i < funds.length; i++) { FundVO fund= funds[i]; %> <option <%= (fund.getFundName().equals(fundStr) ? "SELECTED" : "")%>><%=fund.getFundName()%> [...] The last line give a "Undefined attribute <%= (fund.getFundName().equals(fundStr) ? "SELECTED" : "")%>><%=fund.getFundName()%>" warning which is not correct