Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SimpleTagSupport implementation problem

 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am developing tags which can generate Javascript at runtime.With classic tags i have done it succesfully but with simple tags one problem is coming

I have my jsp page like this:



Now in this jsp page the form tag handler functions fine but the nested tag doesn't work.What i want is a form tag is generated in the html's body tag & after that as a footer the script tag gets appended to the form tag in body ie of the sort:

html
body
form form attributes


close form
script tag

close script tag
close body
close html


KINDLY HELP ME OUT TO FIND OUT THE PROBLEM IN MY CODE:

The tag handler for outer tag 'form' is :


& the nested tag handler FOR VALIDATE TAG is :



Thanking you,
Jignesh
 
Shraddha Jain
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i dont see your jsp file supplying the required attributes namely footerand onsubmit to the SimpleTag Form handler? and what have you specified as the <body-content> for the form tag in your .tld file?

could you post the exact exception thrown?
[ February 07, 2006: Message edited by: Shraddha Jain ]
 
Jignesh Gohel
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the reply.

See actually i am not getting any exception.

What's happening is the html form tag which i want to generate at runtime using my custom tags is getting generated.

But the javascript <script> tag which is also to be generated after the end of form tag is not getting generated & the body-content type for outer form tag is scriptless & for inner tags its empty.

The footer & onsubmit attributes i have kept optional .If they are bnot provided then through coding i am embedding tht into my jsp page.

So see if u can help me sort out this problem.

ok bye
Jignesh
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65105
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JavaRanch is a community of people from all over the world, many of who are not native English speakers. While using abbreviations like "u" instead of spelling out "you" is convenient when text messaging your friends on a cell phone or in a chat room, it presents an extra challenge to those that are already struggling with English. Additionally, such shortcuts may confound automated translation tools that patrons of the Ranch may be making use of.

I would like to ask for your help in making the content of JavaRanch a little easier to read for everybody that visits here by not using such abbreviations.

Please read this for more information.

thanks,
bear
JavaRanch Sheriff
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic