Thanks for your help on the custom tag error problem. When I move the application from the ROOT/ folder to the webapps folder everything worked fine. I am new to JSP and tomcat and have been putting all my applications under ROOT and everything worked fine before this. WHY?
--- Bill Barker <[EMAIL PROTECTED]> wrote: > > "Percival Bragg" <[EMAIL PROTECTED]> wrote in > message > news:[EMAIL PROTECTED] > > The following are the current files and the error > from > > tomcat that I received in trying my first custom > tag. > > > > The following is the java class for the custom > tag. > > package com.braggonline.portal; > > > > import java.io.*; > > import javax.servlet.jsp.tagext.*; > > import javax.servlet.jsp.*; > > > > public class bannerTag extends TagSupport { > > > > public int doEndTag() throws JspException { > > > > StringBuffer out = new StringBuffer(); > > > > out.append("<table width="100%" > > cellspacing="0" class="HeadBg" > > border="0">"); > > out.append("<tr valign="top">"); > > out.append("<td colspan="3" > > class="SiteLink" > > background="images/bars.gif" > > align="right">"); > > out.append("<span > > id="Banner_WelcomeMessage" > > style="color:#EEEEEE;"></span>"); > > out.append("<a href="index.html" > > class="SiteLink">Braggonline Home</a>"); > > out.append("<span > > class="Accent">|</span>"); > > out.append("<a href="index.html" > > target="_blank" > > class="SiteLink">Site Map</a>"); > > out.append("<span > > class="Accent">|</span>"); > > out.append("<a href="index.html" > > > target="_blank"class="SiteLink">Logoff</a>"); > > out.append(" </td></tr>"); > > out.append("<tr><td width="10" > > rowspan="2"> </td>"); > > out.append("<td height="40">"); > > out.append("<span > id="Banner_siteName" > > class="SiteTitle">BraggOnline > > Portal</span></td>"); > > out.append("<td align="center" > > rowspan="2"> </td></tr>"); > > out.append("<tr><td>"); > > out.append("<table id="Banner_tabs" > > class="OtherTabsBg" > > cellspacing="0" border="0" > > > style="border-collapse:collapse;"><tr>"); > > out.append("<td class="TabBg" > > > style="border-width:1px;border-style:solid;height:25px;">"); > > out.append(" <span > > > class="SelectedTab">Home</span> </td>"); > > out.append("<td > > > style="border-width:1px;border-style:solid;height:25px;"> <a > > > href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=1&tabid > =2" > > class="OtherTabs">JSP</a></td>"); > > out.append("<td > > > style="border-width:1px;border-style:solid;height:25px;"> <a > > > href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=2&tabid > =3" > > class="OtherTabs">JavaBeans</a></td>"); > > out.append("<td > > > style="border-width:1px;border-style:solid;height:25px;"> <a > > > href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=3&tabid > =4" > > > class="OtherTabs">Discussions</a></td>"); > > out.append("<td > > > style="border-width:1px;border-style:solid;height:25px;"> <a > > > href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=4&tabid > =5" > > class="OtherTabs">About the > > Portal</a></td>"); > > out.append("</tr></table>"); > > try { > > pageContext.getOut().print("Got Here"); > > } catch (Exception e) { > > throw new JspException(e.toString()); > > } > > return EVAL_PAGE; > > } > > } > > > > The following is the TLD file. > > <?xml version="1.0" encoding="ISO-8859-1"?> > > <!DOCTYPE taglib PUBLIC > > "-//Sun Microsystems, Inc.//DTD JSP Tag > > Library 1.2//EN" > > > > > "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> > > <taglib> > > <tlib-version>1.0</tlib-version> > > <jsp-version>1.2</jsp-version> > > <short-name>PortalTags</short-name> > > <description>Tags for dynamic creation of portal > > pages.</description> > > <tag> > > <name>banner</name> > > > > > <tag-class>com.braggonline.portal.bannerTag</tag-class> > > </tag> > > </taglib> > > > > The following is the JSP file > > <%@ taglib uri="WEB-INF/portalTags.tld" > > prefix="portal" %> > > > > <% > > > > /* The DesktopDefault.jsp page is used to load > and > > populate each Portal View. It accomplishes > > this by reading the layout configuration of the > > portal from the Portal Configuration > > system, and then using this information to > > dynamically instantiate portal modules > > (each implemented as a custom tag), and then > inject > > them into the page. */ > > > > /* This scriplet capture the request parameters > > passed and uses them to > > determine how to process the page. */ > > > > String tabIndex = > request.getParameter("tabIndex"); > > String tabId = request.getParameter("tabId"); > > > > if (tabIndex == null){ > > session.setAttribute("tabIndex", "0"); > > }else{ > > session.setAttribute("tabIndex", tabIndex); > > } > > > > if (tabId == null){ > > session.setAttribute("tabId", "0"); > > }else{ > > session.setAttribute("tabId", tabId); > > } > > > > %> > > > > <html> > > <head> > > <title>BraggOnline Portal</title> > > <link href="braggonline.css" > type="text/css" > > rel="stylesheet" /> > > </head> > > <body leftmargin="0" bottommargin="0" > > rightmargin="0" topmargin="0" marginheight="0" > > marginwidth="0"> > > <form> > > <table width="100%" cellspacing="0" > > cellpadding="0" border="0"> > > <tr valign="top"> > > <td colspan="2"> > > <portal:banner/> > > </td> > > </tr> > > <tr> > > <td> > > <br> > > <table width="100%" > > cellspacing="0" cellpadding="4" border="0"> > > <tr height="*" > > valign="top"> > > <td width="5"> > > > > </td> > > <td id="LeftPane" > > Visible="false" Width="170"> > > </td> > > <td > width="1"> > === message truncated === __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]