• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Onchange Attribute in TLD

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic