• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

JSTL validation error

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

I am using custom jstl tag in my jspf file as follows.

<user:newUrl dest="${object.url}" var="sendUrl">
<c:param name="userName" value="${object.name}" />
</user:newUrl>


but the problem is that while running, i am getting the following validation error.

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: <h3>Validation error messages from TagLibraryValidator for c in

blahblahblah.....
</h3><p>30: Invalid use of "param" tag outside legitimate parent tag</p><p>

I am not sure what is causing the problem.

Any help will be appreciated.


Thanks
 
Sheriff
Posts: 67754
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

anandkrishna anand wrote:I am using custom jstl tag


That makes no sense. The JSTL is a standard tag library.

Either you are using the JSTL, or you are creating your own custom tag. There's no such thing as a "JSTL custom tag".

That said, your problem is that you are trying to nest a <c:param> tag within your own custom tag. That won't work. <c:param> must be nested within a JSTL tag for which it is defiend.
 
anandkrishna anand
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thanks for reply Bear Bibeault ,

but this code works perfectly fine in jstl 1.1.
It is throwing error in 1.2 only.
This was an existing code which was working perfectly fine.
once we upgraded to Tomcat 6 and jstl 1.2 , the problems started.
Any idea?

Thanks
 
anandkrishna anand
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And our java class implements org.apache.taglibs.standard.tag.common.core.ParamParent and extends necessary java classes related with tagsupport.
My doubt is that, the reason might be some jar file mismatch.


Thanks
 
anandkrishna anand
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I resolved the issue by creating a new wrapper class which extends param tag and using this new tag in place of c:param.
I think the issue was that JSTL 1.2 is having more strict validation compared to earlier versions..This validations can be bypassed by using a new wrapper class.

Thanks
Vinod
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic