"Percival Bragg" wrote in message news:20030223205634.38896.qmail@web11803.mail.yahoo.com... > 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(" cellspacing="0" class="HeadBg" > border="0">"); > out.append(""); > out.append(""); > out.append(""); > out.append(""); > out.append(""); > out.append("
class="SiteLink" > background="images/bars.gif" > align="right">"); > out.append(" id="Banner_WelcomeMessage" > style="color:#EEEEEE;">"); > out.append(" class="SiteLink">Braggonline Home"); > out.append(" class="Accent">|"); > out.append(" target="_blank" > class="SiteLink">Site Map"); > out.append(" class="Accent">|"); > out.append(" target="_blank"class="SiteLink">Logoff"); > out.append("  
rowspan="2"> "); > out.append(" class="SiteTitle">BraggOnline > Portal rowspan="2"> 
"); > out.append(" class="OtherTabsBg" > cellspacing="0" border="0" > style="border-collapse:collapse;">"); > out.append(""); > out.append(""); > out.append(""); > out.append(""); > out.append(""); > out.append("
style="border-width:1px;border-style:solid;height:25px;">"); > out.append("  class="SelectedTab">Home  style="border-width:1px;border-style:solid;height:25px;">  href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=1&tabid =2" > class="OtherTabs">JSP style="border-width:1px;border-style:solid;height:25px;">  href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=2&tabid =3" > class="OtherTabs">JavaBeans style="border-width:1px;border-style:solid;height:25px;">  href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=3&tabid =4" > class="OtherTabs">Discussions style="border-width:1px;border-style:solid;height:25px;">  href="http://www.ibuyspyportal.com/DesktopDefault.aspx?tabindex=4&tabid =5" > class="OtherTabs">About the > Portal
"); > try { > pageContext.getOut().print("Got Here"); > } catch (Exception e) { > throw new JspException(e.toString()); > } > return EVAL_PAGE; > } > } > > The following is the TLD file. > > "-//Sun Microsystems, Inc.//DTD JSP Tag > Library 1.2//EN" > > "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> > > 1.0 > 1.2 > PortalTags > Tags for dynamic creation of portal > pages. > > banner > > com.braggonline.portal.bannerTag > > > > 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); > } > > %> > > > > BraggOnline Portal > rel="stylesheet" /> > > rightmargin="0" topmargin="0" marginheight="0" > marginwidth="0"> >
> cellpadding="0" border="0"> > > > > > > >
> >
>
> cellspacing="0" cellpadding="4" border="0"> > valign="top"> > > > > > > > >
>   > Visible="false" Width="170">  >   > Visible="false" Width="*">  > Visible="false" Width="230">  > >   >
>
>
> > > > > and the follwing is the error log. > HTTP Status 500 - > > -------------------------------------------------------------------------- ------ > > type Exception report > > message > > description The server encountered an internal error > () that prevented it from fulfilling this request. > > exception > > org.apache.jasper.JasperException: > /braggonline/DesktopDefault.jsp(39,24) Unable to load > class banner > at > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler. java:94) > at > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428 ) > at > org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219 ) > at > org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:717) > at > org.apache.jasper.compiler.Parser.parseElements(Parser.java:809) > at > org.apache.jasper.compiler.Parser.parse(Parser.java:122) > at > org.apache.jasper.compiler.ParserController.parse(ParserController.java:199) > at > org.apache.jasper.compiler.ParserController.parse(ParserController.java:153) > at > org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:223) > at > org.apache.jasper.compiler.Compiler.compile(Compiler.java:351) > at > org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:4 74) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:1 84) > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) > at > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) > at > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:260) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:191) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > at > org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) > at > org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172 ) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:641) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) > at > org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok eNext(StandardPipeline.java:643) > at > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) > at > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) > at > org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432) > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne ction(Http11Protocol.java:386) > at > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav a:530) > at java.lang.Thread.run(Thread.java:536) > > > > -------------------------------------------------------------------------- ------ > > Apache Tomcat/4.1.18 > > The url for invoking the JSP page: > http://localhost/braggonline/DesktopDefault.jsp > > braggonline is a web application under > ROOT/braggonline. > The class is in > ROOT/braggonline/WEB-INF/classes/com/braggonline/portal > the TLD file is in ROOT/braggonline/WEB-INF > Well, this is your problem. It may be possible to configure something like this, but I sure don't want to try it :). If you put braggonline under 'webapps' you will probably have better luck (or at least fewer headaches :). e.g. "mv braggonline ..". > when the JSP is invoked tomcat gives the error > message. > > The path to servlet.jar is defined in the CLASSPATH > variable. > > Any help would be appreciated. > > __________________________________________________ > Do you Yahoo!? > Yahoo! Tax Center - forms, calculators, tips, more > http://taxes.yahoo.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org