wood burning stoves 2.0*
The moose likes JSP and the fly likes Drop-down menus with custom tags in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Drop-down menus with custom tags in JSP" Watch "Drop-down menus with custom tags in JSP" New topic
Author

Drop-down menus with custom tags in JSP

Rupa S
Greenhorn

Joined: Dec 08, 2004
Posts: 10
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.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
read the documentation for your tags. If it's supported it should be mentioned somewhere how to do it.


42
Rupa S
Greenhorn

Joined: Dec 08, 2004
Posts: 10
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.
Nandkishore Dhilde
Greenhorn

Joined: May 09, 2002
Posts: 20
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 ) {}
}

}


SCJP1.4 certified, IBM SOA Solution Designer[2007]
Rupa S
Greenhorn

Joined: Dec 08, 2004
Posts: 10
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drop-down menus with custom tags in JSP