This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Onchange Attribute in TLD  RSS feed

 
Ravi Pat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm trying to integrate some client side verification using Javascript in an existing JSP page and this is the error i get:

org.apache.jasper.JasperException: /pages/kv2cmod.jsp(188,0) Attribute ONCHANGE invalid for tag select according to TLD
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:238)
org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:975)
org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:696)

I see the onchange attribute defined in the files "Struts-html.tld" and "Struts-nested.tld".

How should I proceed?
Thanks and regards
ravi
 
Ravi Pat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, also I changed the ONCHANGE attributes in the above mentioned files to read:

<attribute>
<name>onchange</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>

Still my error stays. I'm new to this technology, any ideas anyone?
thanks in advance
-r
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Ravi",

We're pleased to have you here with us on the Ranch, but there are a few rules that need to be followed, and one is that proper names are required. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
Forum Bartender
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Case matters. Are you using ONCHANGE or onchange on the page?
 
Ravi Pat
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right, I was using ONCHANGE instead of onchange. HOwever i'm getting a new error now:

org.apache.jasper.JasperException: /index.jsp(2,0) According to the TLD or the tag file, attribute onchange is mandatory for tag redirect

So do i just copy the attribute specification ie.
<attribute>
<name>onchange</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>

to the index.jsp file? If so, where? The contents of my index.jsp file are as foll:
<%@ taglib uri="/tags/struts-logic" prefix="logic" %>
<logic:redirect forward="kv2c"/>

thanks so much
Ravi


thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!