Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » JSP validator - Undefined attribute name
JSP validator - Undefined attribute name [message #189032] Fri, 02 March 2007 20:08 Go to next message
Eclipse UserFriend
Originally posted by: kevin.ilsen.mckesson.com

In my JSP files, when I'm using form fields and need to programmatically
(server-side) set certain tag attributes (e.g., checked, disabled, selected,
etc.), I often do it using embedded JSP scriptlet code. For example:

<input type="checkbox" name="MyOption" value="true"
<%=isMyOptionChecked?"checked":""%>>

(where 'isMyOptionChecked' is a variable previously set in the file).

The JSP editor validator is reporting the error

Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).

Is there some other way that I can do what I'm trying to do, without causing
a validation error?
Re: JSP validator - Undefined attribute name [message #189065 is a reply to message #189032] Sat, 03 March 2007 22:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse5.rizzoweb.com

Kevin wrote:
> In my JSP files, when I'm using form fields and need to programmatically
> (server-side) set certain tag attributes (e.g., checked, disabled, selected,
> etc.), I often do it using embedded JSP scriptlet code. For example:
>
> <input type="checkbox" name="MyOption" value="true"
> <%=isMyOptionChecked?"checked":""%>>
>
> (where 'isMyOptionChecked' is a variable previously set in the file).
>
> The JSP editor validator is reporting the error
>
> Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).
>
> Is there some other way that I can do what I'm trying to do, without causing
> a validation error?

I don't think the JSP editor should report an error. File a bug report
in Bugzilla.
But in any case, you should look into using taglibs instead of
scriptlet. The JSTL tags have all that you need to accomplish this kind
of simple presentation-layer logic. And there are lots of other taglibs
out there to do all kinds of things with no scriptlet code in the JSP.
Google for "JSTL" and/or "JSP tags" and you'll find lots of info and
tutorials.

Hope this helps,
Eric
Re: JSP validator - Undefined attribute name [message #189088 is a reply to message #189032] Mon, 05 March 2007 06:44 Go to previous message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Kevin wrote:
> In my JSP files, when I'm using form fields and need to programmatically
> (server-side) set certain tag attributes (e.g., checked, disabled, selected,
> etc.), I often do it using embedded JSP scriptlet code. For example:
>
> <input type="checkbox" name="MyOption" value="true"
> <%=isMyOptionChecked?"checked":""%>>
>
> (where 'isMyOptionChecked' is a variable previously set in the file).
>
> The JSP editor validator is reporting the error
>
> Undefined attribute name (<%=isMyOptionChecked?"checked":""%>).
>
> Is there some other way that I can do what I'm trying to do, without causing
> a validation error?

If you're on 1.5.2, update to 1.5.3--this is already fixed.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=159926

--
Nitin Dahyabhai
Structured Source Editor


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Previous Topic:Using getParameterMap() with Tomcat 4.1
Next Topic:Support for glassfish
Goto Forum:
  


Current Time: Sat Apr 20 15:28:00 GMT 2024

Powered by FUDForum. Page generated in 0.03189 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top