• 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

Drop-down menus with custom tags in JSP

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JSP which has cutom tags for creating menubar and menus.Now i want to have submenus within menus onmouseover.I have to do this using custom tags, please help, give some sample code as i am new to custom tags.
 
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
read the documentation for your tags. If it's supported it should be mentioned somewhere how to do it.
 
Rupa S
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I searched a lot for a way to create a drop down menu in a JSP which has custom tags, but unable to find any help.Can anybody help out.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its very simple you just need to create
public class MenuBarTag extends BodyTagSupport {
// and in doStartTag or doEndTag u can call the getHtml() where u can write pure html code for creating menus...
public int doEndTag() throws JspException {
try {
this.getHtml() //write here html code
} catch(JSPException ) {}
}

}
 
Rupa S
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How can i write direct html from my tag handler class, the html will involve JavaScript funtions and that when given to the xsl embedded in my jsp page causes error.
I am terribly lost, please help.I am getting solutions with pure html pages calling javascript functions but mine is a JSP full of custom tags and the taghandlers write to the outputstream, which in turn is transformed by the XSLT and the actual HTML is rendered.Hence i cant use pure html in the JSP.

Please help with some sample code, i will be grateful.
Thankx in advance
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic