All custom tags fail in JBoss3.2.3/Tomcat 5.0.16 (works in Tomcat 4.x)

All pages that contain a custom tag fail with the following exception: HTTP Status 500 -
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
java.lang.NullPointerException
     org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:153)
     uploadQS1_jsp._jspx_meth_strutshtml_hidden_0(uploadQS1_jsp.java:225)
     uploadQS1_jsp._jspService(uploadQS1_jsp.java:100)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
     org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
     org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
     org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
     org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
note The full stack trace of the root cause is available in the Tomcat logs.Even a simple <struts-html: hidden ... /> tag causes this exception. As long as the page has no custom tags, it is served fine. The same web-app works as expected in JBoss3.2.3/Tomcat4.x.
It almost looks as if Tomcat is looking in a object pool for a custom tag object reference and when it fails to find one, throws a null-pointer instead of instantiating a new one to work with. (This is pure speculation on my part).
Did the TLD's req's change, or the setup for Tomcat? It's not my tags, even Struts tags fail. Any ideas why my tags aren't "resolving"?

Has anyone had any luck getting this to run or run into this problem? It fails even with a fresh JBoss install using tomcat 5.0.16.

Similar Messages

  • Custom tag fails to under Tomcat 5.0.16

    I have just upgraded to Tomcat 5.0.16 from 4.1.x.
    Any JSP page that contains a custom tag fails to build; error message:
    org.apache.jasper.JasperException: /jsp/CustomReport.jsp(62,20) Unknown attribute type (String) for attribute name.
    The tags work under �Tomcat 4.x�. All other pages build and function correctly.
    Specs:
    Java 2 version: 1.4.2_03
    Tomcat 5.0.16 or Tomcat 4.1.x

    Try updating your web.xml to use the Servlet 2.4 schema. You will have to change your tld declarations to sit inside the new <jsp-config> tags but see if it works for Servlet 2.4. Could be a backwards compatible bug?
    Anthony

  • JSP Custom tag issues.

    Hi all,
    When my JAVA_HOME env variable is pointing to C:\jdk1.3, the JSP below which contains some custom tags fails to compile in Weblogic 5.1. However, when i change my JAVA_HOME env variable to C:\weblogic\jre1_2\jre, the same JSP compiles and deploys with no problems. I was of the opinion that the jre in jdk 1.3 is the same as jre1_2 which is bundled with weblogic 5.1. Does anyone know of any differences btw the Jre's or why the JSP below cannot be compiled when i use JDK1.3. Thanks for the help.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <%@ page import="java.util.Vector" %>
    <%@ page import="com.spcs.premiere.common.framework.errorhandling.ErrorUtility" %>
    <%@ page import="com.spcs.premiere.common.framework.errorhandling.PremiereLogger" %>
    <%@ page import="org.grnds.structural.web.GrndsServletException" %>
    <%@ taglib uri="/tlds/profiling/profile.tld" prefix="profile" %>
    <%@ page import="com.spcs.premiere.web.common.HTMLListBuilder" %>
    <%@ page import="com.spcs.premiere.web.common.ListParametersDomain" %>
    <%@ page import="com.spcs.premiere.web.common.PremiereConstants" %>
    <%@ page import="com.spcs.premiere.ejb.authentication.LoginDomain" %>
    <html>
    <head>
         <title>Premiere Business...Assign Credit Class</title>
         <LINK HREF="<%= request.getContextPath()%>/stylesheets/premiere.css" REL="stylesheet" TYPE="text/css">
         <SCRIPT LANGUAGE="javascript">
              var winHandle=window.dialogArguments;
         function userFocus()
              window.document.SupervisorLoginForm.SupervisorUserName.focus();
         </SCRIPT>
    </head>
    <body onload="userFocus();">
    <%
    try{
    %>
    <TABLE WIDTH="100%" HEIGHT="100%" CLASS="groupbox">
    <TR>
              <TABLE WIDTH="100%" HEIGHT="75%" CLASS="groupbox">
              <TR HEIGHT="15%"></TR>
              <FORM NAME="SupervisorLoginForm" ACTION="<%= request.getContextPath() %>/Premiere/AddAccountConversation/SupervisorLogin" METHOD="post" TARGET="_self">
    <TR HEIGHT="15%">
    <TD align=center><LABEL NAME="SupervisorUserNameLabel">User ID:</LABEL></TD></TD>
    <TD align=left><INPUT TYPE="text" NAME="SupervisorUserName" MAXLENGTH="20" SIZE="20" TABINDEX="1"></TD></TR>
              </TR>
              <TR>
    <TD align=center>    <LABEL NAME="SupervisorPasswordLabel">Password:</LABEL></TD></TD>
    <TD align=left><INPUT TYPE="password" NAME="SupervisorPassword" TABINDEX="2" MAXLENGTH="20" SIZE="20" ENABLED></TD>
              </TR>
              <TR>
              <TD COLSPAN="2" ALIGN="center"><BUTTON TYPE="submit" NAME="Login" TABINDEX="3" Class="button">Login</BUTTON></TD>
              <TD></TD>
              </TR></FORM>
              <FORM NAME="CreditClassForm" ACTION="<%= request.getContextPath() %>/Premiere/AddAccountConversation/AssignCreditManually" METHOD="post">
    <TR HEIGHT="60%">
    <TD align=center>        <LABEL NAME="SupervisorCreditClassLabel">Credit Class:</LABEL></TD></TD>
    <TD align=left>
              <profile:user WidgetName="CreditClass" Context="JSP" SubContext="SupervisorLogin" Evaluate="SUPERVISOR">
              <%= HTMLListBuilder.buildHTMLList((ListParametersDomain)session.getAttribute("CreditClassCodes")) %></TD>
              </profile:user>
              <TD></TD>          
              </TR>
              <TR></TR>
              </TR></TBODY></TABLE>
    </TR>
              <TR>
              <TABLE WIDTH="100%" HEIGHT="25%" CLASS="groupbox">
              <TD></TD>
              <TD align=right><BUTTON NAME="Cancel" Class="button" TABINDEX="4" ONCLICK="window.close()">Cancel</BUTTON>  
              <profile:user WidgetName="Save" Context="JSP" SubContext="SupervisorLogin" Evaluate="SUPERVISOR">
                   <BUTTON TYPE="submit" NAME="Save" TABINDEX="6" Class="button">Save</BUTTON>  
                   </profile:user>
              </TD>
              </TR></TBODY></TABLE>
              </TR></TBODY></TABLE>
              </FORM>
    <%
    catch (Exception e)
    LoginDomain loginDomain = (LoginDomain)session.getAttribute(PremiereConstants.LOGIN_DOMAIN);
    PremiereLogger.log( "ERROR", loginDomain.getUserName()+" General Exception Error: ", e );
    request.setAttribute(ErrorUtility.ERROR_CONDITION, ErrorUtility.getMessage(PremiereConstants.GENERIC_JSP_EXCEPTION_ERROR_ID) );
    throw new GrndsServletException();
    %>          
    </body>
    </html>

    UUh, interesting.
    Try to use the last Service Pack for 5.1 - i think it is sp9.
    Hope it'll work. I've had some problems with XML parsing but they resolved when I installed the last SP...

  • Trying to store a custom tag in a database field

    I have a simple custom tag that displays an image.  We'll call it <cf_checkmark>.  All it does is display a nice little checkmark.  Saves me from having to rewrite the <img src="...."> tag over and over and over.  I want to store this tag in a database field, so it is returned as a value in my query results.  (I'm not storing the code in the database, just the text "<cf_checkmark>").  Only problem is coldfusion doesn't render the custom tag when I output the result.  The tag is there, it's just not rendering or executing.  If I do a View Source I can see <cf_checkmark> in the source.  It just doesn't execute or render.
    My guess is that ColdFusion executes all the cf code before it outputs the query results.  Therefore it doesn't recognize the text in the query result as a custom tag.  Is there any way to get this to work?

    Write it to a file and cfinclude the file.
    But for one line of code, why bother.

  • Nested custom tag-jsp

    Hi,
    How can I use nested custom tags in jsp?

    Note that not all custom tags will work like this. The tag must be designed to work this way. Some tags will not accept a body, others will accept a body, but will not process it through the JSP compiler, rather handling it as text/html.
    Have you tried nesting them and you're not getting the expected results? Have you written these tags yourself and they're not working?

  • Quotes in attributes in a custom tag are failing in weblogic 5.1

    This seems to be on and off behaviour but when my tags are failing I
              have traced it down to the fact that my attributes have quotes in
              them. (By the way I'm running weblogic 5.1 with service pack 10)
              ie:
              <a:foo bar="<%=req.getParemeter("biz")%>">. Escaping the internal
              quotes doesn't seem to help the matter at all.
              After many hours of racking my brain to try and figure out why the
              tags were failing I found a message somewhere in this group which said
              they had the same issue and worked around it by using single qoutes
              around any attribute with a qoute in it ie: <a:foo
              bar='<%=req.getParemeter("biz")%>'>. This work around worked for me as
              well but leaves me with 2 important questions.
              a) According to weblogic this is issue (and I quote from their
              website) "CR 34389: Escaping Quotes was not working in the value tag
              for JSP params; The JSP spec says that quotations (") are to be
              escaped with \" . Fixed quoting problems for double and single quotes.
              " This was supposedly fixed in service pack 9, I'm running service
              pack 10 so what gives???
              b) Since this single qoute thing is not in the JSP spec if I keep it
              like this to get my tags working under my current setup and then we
              eventually migrate to weblogic 6x is there a risk all my tags will
              break?
              

    This seems to be on and off behaviour but when my tags are failing I
              have traced it down to the fact that my attributes have quotes in
              them. (By the way I'm running weblogic 5.1 with service pack 10)
              ie:
              <a:foo bar="<%=req.getParemeter("biz")%>">. Escaping the internal
              quotes doesn't seem to help the matter at all.
              After many hours of racking my brain to try and figure out why the
              tags were failing I found a message somewhere in this group which said
              they had the same issue and worked around it by using single qoutes
              around any attribute with a qoute in it ie: <a:foo
              bar='<%=req.getParemeter("biz")%>'>. This work around worked for me as
              well but leaves me with 2 important questions.
              a) According to weblogic this is issue (and I quote from their
              website) "CR 34389: Escaping Quotes was not working in the value tag
              for JSP params; The JSP spec says that quotations (") are to be
              escaped with \" . Fixed quoting problems for double and single quotes.
              " This was supposedly fixed in service pack 9, I'm running service
              pack 10 so what gives???
              b) Since this single qoute thing is not in the JSP spec if I keep it
              like this to get my tags working under my current setup and then we
              eventually migrate to weblogic 6x is there a risk all my tags will
              break?
              

  • Failed to fetch a list of all custom record types

    Hi,
    I tried to fetch a list of all custom record types. I tried with below piece of code, but failed with below error message. Can anybody help me to resolve this issue:
    CustomRecordTypeReadAll_Input cusRecTypeAllIn = new CustomRecordTypeReadAll_Input();
    CustomRecordTypeServiceProxy proxy = new CustomRecordTypeServiceProxy(endpoint);
                   CustomRecordTypeReadAll_Output out = proxy.customRecordTypeReadAll(cusRecTypeAllIn);
    Detail error message:
    AxisFault
    faultCode: {http://xml.apache.org/axis/}HTTP
    faultSubcode:
    faultString: (400)Bad Request
    faultActor:
    faultNode:
    faultDetail:
         {}:return code: 400
    &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;soap:Envelope xmlns:soap=&quot;http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;&lt;soap:Body&gt;&lt;soap:Fault&gt;&lt;faultcode&gt;soap:Client&lt;/faultcode&gt;&lt;faultstring&gt;Client&lt;/faultstring&gt;&lt;detail&gt;&lt;ErrorCode&gt;SBL-ODU-01007&lt;/ErrorCode&gt;&lt;ErrorMessage&gt;The HTTP request did not contain a valid SOAPAction header. The value of the header was &amp;quot;document/urn:crmondemand/ws/odesabs/CustomRecordType/:CustomRecordTypeReadAll&amp;quot;&lt;/ErrorMessage&gt;&lt;/detail&gt;&lt;/soap:Fault&gt;&lt;/soap:Body&gt;&lt;/soap:Envelope&gt;
         {http://xml.apache.org/axis/}HttpErrorCode:400
    (400)Bad Request
    //////////////////////////////////////////////////////////////////////////////////

    Thank you very much for valuable reply.
    I am now using WS-Security to include credentials in request. I have also ensured that "Customization - Customize Application" setting is enable for my OCOD account. But now, i am getting following exception:
    java.lang.IllegalArgumentException: faultCode argument for createFault was passed NULL at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl.createFault(SOAPFactory1_1Impl.java:55)
         at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:169)
         at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:111)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
         at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
         at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107)
         at $Proxy28.customRecordTypeRead(Unknown Source)
         at Main.main(Main.java:75)
    I have also tried customRecordTypeReadAll API butgetting the same exception.
    Can you please suggest me what can be the reason behind above exception?
    For reference: The complete SOAP request message:
    <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
    <S:Header>
    <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" S:mustUnderstand="1">
    <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1298986875153522346527">
    <wsse:Username>myusername</wsse:Username>
    <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">mypassword</wsse:Password>
    <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">pRkWQ9ZcOrJngcGijmok0skB</wsse:Nonce><wsu:Created>2011-03-01T13:43:19.669Z</wsu:Created></wsse:UsernameToken></wsse:Security></S:Header><S:Body><ns2:CustomRecordTypeRead_Input xmlns="urn:/crmondemand/xml/customrecordtype/data" xmlns:ns2="urn:crmondemand/ws/odesabs/customrecordtype/" xmlns:ns3="urn:/crmondemand/xml/customrecordtype/query">
    <ns3:CustomRecordType>
    <ns3:Name>Custom Object 01</ns3:Name>
    <ns3:SingularName>TestCustom</ns3:SingularName>
    <ns3:PluralName>TestCustom</ns3:PluralName>
    <ns3:ShortName>TestCustom</ns3:ShortName>
    </ns3:CustomRecordType>
    </ns2:CustomRecordTypeRead_Input>
    </S:Body>
    </S:Envelope>
    Thanks
    Ravish
    Edited by: 833189 on Mar 1, 2011 6:02 AM

  • Custom Tag Capitalization Problem..

    All,
              OS: Windows 2000
              App Server: Weblogic 6.0 sp 2
              JDK: 1.3 (and tried 1.3.1)
              I have a set of custom tags that run fine when I use them on an app server (such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which weblogic 6.x requires, they suddenly start generating errors with attributes which have capitalized letters in them. For example, in my taglib I have:
              <attribute>
              <name>closeConnection</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              </attribute>
              and in the support class I have:
              * Get the value of closeConnection.
              * @return value of closeConnection.
              public boolean getCloseConnection() {
              return closeConnection;
              * Set the value of closeConnection.
              * @param v Value to assign to closeConnection.
              public void setCloseConnection(String v) {
              if(v.toUpperCase().equals("TRUE")){
              this.closeConnection = true;
              } else {
              this.closeConnection = false;
              When I go to the page that this tag is on, I get the following output:
              Parsing of JSP File '/index.jsp' failed:
              /index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks': There is no setter method for property 'closeconnection', for Tag class 'net.cwerks.taglib.MyTag'
              probably occurred due to an error in /index.jsp line 1:
              <%@ taglib uri="/cwerks" prefix="cwerks" %>
              Thu Aug 02 19:06:52 PDT 2001
              Note that the 'closeconnection' is all lowercase despite the fact that it is upper case in the tld and in the class itself.
              I came across a similar problem in weblogic 5.1 when I upgraded from JDK 1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2, but a dll was missing. I also tried switching it to 1.3.1, but that did not help. It seems like introspection may have changed slightly between the two version. I'm shocked, and a bit suspicious, that I haven't seen this problem all over the newsgroups. Anyone else seen this?
              Thank you,
              Carson Gross
              [email protected]
              [att1.html]
              

    A solution presents itself:
              The problem was NOT with capitalization. Instead, the problem was as
              follows:
              My method was for setting a boolean, but I took a string so that people
              wouldn't have to type:
              <mytags:tag foo="<%=true%>" />
              instead, they could type:
              <mytags:tag foo="true" />
              which would call the setter method with a string "true", which would be then
              converted to a boolean within my class.
              So my setter has this signature:
              public void setFoo(String s)
              and my getter has this signature:
              public boolean getFoo() /* I know this isn't standard, but isFoo doesn't
              sound good to me*/
              I can't tell if it's because JavaBeans changed slightly between jdk 1.2.2
              and 1.3.x, or if Weblogic changed the way that they do things (I suspect the
              latter, since I had things working fine in WL 5.2 w/ jdk 1.2.2 and then
              things broke with WL 5.2 w/ jdk 1.3), but this no longer returns foo as a
              valid property to be set, and since weblogic 6.x relies on JavaBeans,
              instead of straight up introspection, it barfs. (I found this out by using
              jad/emacs, a wicked combination for those who want to poke around in jars).
              Anyway, I hope I can save someone else who has this same, albeit
              specialized, problem a lot of pain by my discovery. Your getters and
              setters better be of the same type with custom tags, or weblogic w/ jdk1.3.x
              is gonna barf when parsing the tld.
              Cheers, and thank God that's behind me,
              Carson Gross
              [email protected]
              ====================================================
              "Carson Gross" <[email protected]> wrote in message
              news:[email protected]...
              The plot grows thicker...
              The tags work fine on Tomcat 3.2.2
              I deploy the example tags that came with wl60 that have more than one
              capital letter in thier attributes, and they work fine. But my tag library
              stubbornly insists on not working so long as I keep the attributes with more
              than one capital letter in. If I remove the offending attributes, or change
              them to have only one capital letter, they work, but this is not an
              acceptable solution. (I guess.)
              I even created an simple introspection class to make sure that the acutal
              methods were there. They were.
              I am at a complete loss here... I guess it's tomcat for now.
              Cheers,
              Carson Gross
              [email protected]
              "Carson Gross" <[email protected]> wrote in message
              news:[email protected]...
              All,
              OS: Windows 2000
              App Server: Weblogic 6.0 sp 2
              JDK: 1.3 (and tried 1.3.1)
              I have a set of custom tags that run fine when I use them on an app server
              (such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which
              weblogic 6.x requires, they suddenly start generating errors with attributes
              which have capitalized letters in them. For example, in my taglib I have:
              <attribute>
              <name>closeConnection</name>
              <required>false</required>
              <rtexprvalue>true</rtexprvalue>
              </attribute>
              and in the support class I have:
              * Get the value of closeConnection.
              * @return value of closeConnection.
              public boolean getCloseConnection() {
              return closeConnection;
              * Set the value of closeConnection.
              * @param v Value to assign to closeConnection.
              public void setCloseConnection(String v) {
              if(v.toUpperCase().equals("TRUE")){
              this.closeConnection = true;
              } else {
              this.closeConnection = false;
              When I go to the page that this tag is on, I get the following output:
              Parsing of JSP File '/index.jsp' failed:
              /index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks':
              There is no setter method for property 'closeconnection', for Tag class
              'net.cwerks.taglib.MyTag'
              probably occurred due to an error in /index.jsp line 1:
              <%@ taglib uri="/cwerks" prefix="cwerks" %>
              Thu Aug 02 19:06:52 PDT 2001
              Note that the 'closeconnection' is all lowercase despite the fact that it is
              upper case in the tld and in the class itself.
              I came across a similar problem in weblogic 5.1 when I upgraded from JDK
              1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2,
              but a dll was missing. I also tried switching it to 1.3.1, but that did not
              help. It seems like introspection may have changed slightly between the two
              version. I'm shocked, and a bit suspicious, that I haven't seen this
              problem all over the newsgroups. Anyone else seen this?
              Thank you,
              Carson Gross
              [email protected]
              

  • Custom tag - setProperties() not called

    Hi all,
    I've created my first custom tag with it's own component class, Tag Class, Renderer and TLD. However, when the JSP first loads, the encode() method fails in trying to get the attribute values from the attribute Map - the Map is empty. Upon further debugging I can see that the Tag class is called and the setter methods are called for each attribute but the setProperties() method is never called before release(), so the attributes are never stored in the UIComponent's attribute Map.
    Anybody know what I'm doing wrong?
    Some code:
    Tag Class...
    public class ListShuttleTag extends UIComponentTag
    public void setProperites(UIComponent component)
      super.setProperties(component);
      ComponentTagHelper.setString(component, "sourceValue", sourceValue);
      ComponentTagHelper.setString(component, "targetValue", targetValue);
      ComponentTagHelper.setInteger(component, "size", size);
      ComponentTagHelper.setInteger(component, "targetListWidth", targetListWidth);
      ComponentTagHelper.setInteger(component, "sourceListWidth", sourceListWidth);
      ComponentTagHelper.setString(component, "sourceCaption", sourceCaption);
      ComponentTagHelper.setString(component, "targetCaption", targetCaption);
    ...TLD...
      <taglib>
        <tlib-version>1.1</tlib-version>
        <jsp-version>2.1</jsp-version>
        <tag>
          <name>listShuttle</name>
          <tag-class>com.katun.jsf.tag.ListShuttleTag</tag-class>
          <description>A listShuttle allows the moving of items from one listBox to another</description>
          <!-- General component attributes -->
          <attribute>
            <name>binding</name>
            <description>
                 A binding that points to a bean property
            </description>     
          </attribute>
          <attribute>
            <name>id</name>
            <description>The client id of this component</description>     
          </attribute>
          <attribute>
            <name>rendered</name>
            <description>Is this component rendered?</description>     
          </attribute>
          <attribute>
            <name>disabled</name>
            <description>Is this component disabled?</description>     
          </attribute>
          <attribute>
            <name>required</name>
            <description>Is this component required?</description>     
          </attribute>
          <!-- listShuttle specific attributes -->
          <attribute>
            <name>sourceValue</name>
            <required>true</required>
            <description>A binding for the items in the source list</description>
          </attribute>
          <attribute>
            <name>targetValue</name>
            <description>A binding for the items in the target list</description>
          </attribute>
          <attribute>
            <name>size</name>
            <description>Defines the number of items visible in each list</description>
          </attribute>
          <attribute>
            <name>sourceListWidth</name>
            <description>Width of the source list</description>
          </attribute>
          <attribute>
            <name>targetListWidth</name>
            <description>Width of the target list</description>
          </attribute>
          <attribute>
            <name>sourceCaption</name>
            <description>Label displayed above the source list</description>
          </attribute>
          <attribute>
            <name>targetCaption</name>
            <description>Label displayed above the target list</description>
          </attribute>
        </tag>
    ...

    Gotcha........
    First, this is what the jsp spec has to say in sec 1.14.1
    When using scriptlet expressions, the expression must
    appear by itself (multiple expressions, and mixing of expressions and string
    constants are not permitted). Multiple operations must be performed within the
    expression.Simple, isnt it ? All you have to is evaluate the expression as a whole.
    <form:toolbaritem id="icon_cancelar" action="<%="javascript:listingAction('" + request.getContextPath() + "/logout.do;')"%>" icon<%= request.getContextPath() + " /images/toolbar/Cancelar_32.gif " %>"/>cheers,
    ram.

  • Escaping HTML in a Custom Tag

    Hello, all. I am sadly failing to find a library function to escape HTML in Java. I'm writing a tag that used to use JSTL as a custom tag and don't know exactly where to find the functionality the JSTL is using. Consider the old JSP:
    <c:forEach items="${versions}" var="version">
         <tr>
             <td><c:out value="${version.version}"/></td>
             <td><c:out value="${version.releaseDate}"/></td>
        </tr>
    </c:forEach>and the new custom tag class:
    public class VersionTableTag implements Tag
        private PageContext context;
        private Tag parent;
        public int doEndTag() throws JspException
            return EVAL_PAGE;
        public int doStartTag() throws JspException
            JspWriter out = context.getOut();
            List versions;
            try
                versions = (List)(context.getVariableResolver().resolveVariable("versions"));
            } catch (ELException e)
                versions = new ArrayList();
            try
                out.println("<table>");
                out.println("<tr>");
                out.println("<th>Version</th>");
                out.println("<th>Release Date</th>");
                out.println("</tr>");
                for (Object o : versions)
                    VersionVO version = (VersionVO)o;
                    out.println("<tr>");
                    out.println("<td>");
                    out.println(version.getVersion()); // NOTE: not properly escaped
                    out.println("</td><td>");
                    out.println(version.getReleaseDate().toString()); // NOTE: not properly escaped
                    out.println("</td>");
                    out.println("</tr>");
                out.println("</table>");
            } catch (IOException e)
                throw new JspException(e);
            return SKIP_BODY;
    }My questions are as follows:
    *1.* Is it possible to define a tag using a JSP document rather than a Java class? All I'm really after is something similar to an include but I want to be able to provide attributes to it in the long run.
    *2.* Is there some library function I can use to escape the HTML in the VO above?

    1. Is it possible to define a tag using a JSP document rather than a Java class? All I'm really after is something similar to an include but I want to be able to provide attributes to it in the long run.Yes. It was introduced with JSP2.0: tag files.
    Just like a JSP lets you write a servlet easily, a tag file lets your write a Custom tag class easily.
    http://java.sun.com/javaee/5/docs/tutorial/doc/bnama.html
    2. Is there some library function I can use to escape the HTML in the VO above?
    There is one provided in the jakarta commons "lang" library.
    http://commons.apache.org/lang/
    They provide a class "StringEscapeUtils" which will do most of the common escaping that you require.
    How hard is it to write something that replaces & < and > though?

  • Custom Tag Problems

    Hello Everyone,
    I am using iPlanet 4.1 as my web server and am having some problems with using custom tags. I try to access a jsp that uses my custom tags and I get a 500 Internal Server error. Then when I check the web server logs all it has is this one very esoteric message: "[26/Sep/2002:08:35:51] warning ( 8042): Internal error: Failed to get GenericServlet. uri=/BUYS/sep_accts.jsp,SCRIPT_NAME=/BUYS/sep_accts.jsp)" Usually I get this message when I make changes to a servlet and do not restart the web server, but that is not the problem this time.
    I am trying to use a very simple tag called SayHelloTag which just prints hello to the browser. I have a foundation tag which extends tag support and then SayHelloTag extends the foundation tag. Then I have it all JARd up and in the classpath like I'm supposed to. If anyone could take a look at my code and tell me if you see anything wrong I would be most appriciative!
    BuysFoundationTag
    package com.nf.buys.tags;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import java.io.*;
    import com.nf.buys.lists.*;
    public class BuysFoundationTag extends TagSupport
    SayHelloTag
    package com.nf.buys.tags;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    import java.io.*;
    import com.nf.buys.lists.*;
    public class SayHelloTag extends BuysFoundationTag
        public int doStartTag()
        {   System.out.println("Starting do Start tag");
            try
                System.out.println("start the try statement");
                JspWriter out = pageContext.getOut();
                System.out.println("output the hello message");
                out.println("Say Hello");
            catch(Exception e)
                e.printStackTrace();
            finally
                return SKIP_BODY;
    TLD File
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://cheerios2.nfs.nwie.net:5050/BUYS/web-jsptaglibrary_1_1.dtd">
    <taglib>
      <!-- after this the default space is "jsptaglibrary_1_2.dtd" -->
      <tlibversion>1.0</tlibversion>
      <jspversion>1.1</jspversion>
      <shortname>buyslib</shortname>
      <info>
        A custom tag library for use by the Nationwide Financial,
        Financial Systems, Automated Buy/Sell System.
      </info>
      <tag>
        <name>SayHello</name>
        <tagclass>com.nf.buys.tags.SayHelloTag</tagclass>
        <bodycontent>JSP</bodycontent>
        <info>A test tag</info>
      </tag>
    </taglib>
    finally, my JSP page
    <html>
      <head>
        <title>Automated BUY/SELL System</title>
        <link rel=stylesheet href="buys_styles.css" type="text/css">
        <%@ taglib uri="/BUYS/buys-tags.jar" prefix="buystag" %>
      </head>
      <body bgcolor='#FFFFF'>
        <div id='heading'>
          This is the heading information
        </div>
        <div id='navigation'>
         <table width='100%'>
          <tr>Nav Option 1</tr>
          <tr>Nav Option 2</tr>
          <tr>...</tr>
          <tr>Nav Option n</tr>
         </table>
        </div>
        <div id='optionalMessage'>
          This is the optional message
        </div>
        <div id='listArea'>
          <buystag:SayHelloTag>
        </div>
      </body>
    </html>I get no compilation errors when I compile any of the tag handler classes. But when the web server can't compile the jsp page. Am I doing something obviously wrong? Please help!!
    Chris

    OMG I am a moron. I just have the name of the tag wrong.

  • Help! pageContext is NULL in custom tag constructor!

    I'm having a problem with a custom tag class, and I'm not sure whether it's because I'm doing something wrong, or because I'm running into a bug with Tomcat, JDK1.4b2, or something else. Basically, I'm finding that the pageContext object is null in the constructor of a custom tag class... something that I'm pretty sure is NOT supposed to happen.
    I'm running JDK1.4b2 with Forte CE 3.1 (the bug predates the jumbo fix that brought it up to 3.0) and using Forte's embedded Tomcat.
    I'm not sure whether it matters, but here's the sequence of events:
    A servlet gets launched,
    instantiates an object of type Error_list,
    binds Error_list to the request object, and
    forwards to a JSP that uses the custom tag defined by ListErrorsTag.
    Unfortunately, pageContext is null in ErrorListTag's constructor, so the attempt to get the request object from the pageContext object generates a NullPointerException.
    The SERVLET: *****************************************
    // relevant lines from the servlet instantiating the object, binding it, and forwarding...
         Error_list errors = new Error_list("BAD_THINGS", "crash and burn");
         request.setAttribute("errors",errors);
         ServletContext sc = this.getServletContext();
         RequestDispatcher rd = sc.getRequestDispatcher("admin_category_create.jsp");
         rd.forward(request,response);
    The JSP: ************************************************
    In the JSP "admin_category_create.jsp" itself, I specify the taglib:
         <%@ taglib uri='/WEB-INF/AdminTags.tld' prefix = 'admin' %>
    and reference it:
         <admin:listErrors>The errors will be listed here</admin:listErrors>
    The Explosion of the Taglib: ************************
    // beginning of Taglib class:
    public class ListErrorsTag extends BodyTagSupport {
        private Error_list errors;
        public ListErrorsTag() {
        super()
        try {
             if (pageContext == null)
                 System.out.println("uh oh! pageContext is null");
             ServletRequest request = pageContext.getRequest();
             errors = (Error_list)request.getAttribute("errors");
        catch (NullPointerException e) {
             System.out.println("boom!");
    The Result: **************************************
    Tomcat's error log:
    uh oh! pageContext is null
    boom!
    if I eliminate the try/catch and allow the NullPointerException to take place, I get:
    Error: 500
    Location: /admin_category_create.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:459)
         at _0002fadmin_0005fcategory_0005fcreate_0002ejspadmin_0005fcategory_0005fcreate_jsp_0._jspService(_0002fadmin_0005fcategory_0005fcreate_0002ejspadmin_0005fcategory_0005fcreate_jsp_0.java:338)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
         at org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
         at admin.processRequest(admin.java:126)
         at admin.doPost(admin.java:144)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:539)
    Root cause:
    java.lang.NullPointerException
         at AdminTags.ListErrorsTag.(ListErrorsTag.java:32)
         at _0002fadmin_0005fcategory_0005fcreate_0002ejspadmin_0005fcategory_0005fcreate_jsp_0._jspService(_0002fadmin_0005fcategory_0005fcreate_0002ejspadmin_0005fcategory_0005fcreate_jsp_0.java:272)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391)
         at org.netbeans.modules.web.tomcat.JspServlet.service(JspServlet.java:91)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:194)
         at admin.processRequest(admin.java:126)
         at admin.doPost(admin.java:144)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
         at org.apache.tomcat.core.Handler.service(Handler.java:286)
         at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
         at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210)
         at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
         at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
         at java.lang.Thread.run(Thread.java:539)

    Doing a little more experimentation, I discovered that pageContext is null in the constructor, but not null in the otherDoStartTagOperations() method (called by the doStartTag() method of the tag's class... it's something Forte forces you to do).
    Is this normal? I was under the impression that pageContext is supposed to be defined EVERYWHERE in any class that extends BodyTagSupport... including the class' own constructor.
    On a related topic, is there documentation somewhere as to what, exactly, Forte is doing behind the scenes when it's managing a taglib (how it keeps track of them, where it puts config files, how the entries it makes in them are different or extended from the normal layout, etc.)? At the moment, I suspect that half of the grief I'm having with writing taglibs is caused by Forte itself forcing me to do things in a roundabout way that bears little resemblance to the ways shown in different books on the topic (and in fact all but ensures that nearly every published example will fail and require major rewriting because of the way it forces tag classes to be structured), but I don't see any easy way to let Forte handle compiling the classes and testing them with its embedded Tomcat, but do the config file housekeeping myself I can be in control of it.

  • Confusing execution sequence in Custom tag

    I have a custom tag file with the name make_red.cfm that
    makes a text passed to it to the color red.
    The calling code looks like this:
    Main page<br>
    <cf_make_red result="myVar">
    Dont mess with the Zohan!!!
    </cf_make_red>
    back to the main page<br>
    The code in make_red.cfm looks something like this:
    <cfoutput>
    <hr>
    ThisTag.ExecutionMode is #ThisTag.ExecutionMode#<br>
    ThisTag.GeneratedContent is
    #ThisTag.GeneratedContent#<br>
    <hr>
    <cfif ThisTag.ExecutionMode IS "Start">
    Tag start<br>
    <cfif structkeyexists(attributes,"result")>
    <cfset evaluate("caller.#attributes.result# =
    ""CUSTOM_TAG_COMPLETED""")>
    </cfif>
    Tag processing<br>
    <cfelseif ThisTag.ExecutionMode IS "End">
    Tag processed<br>
    <cfset ThisTag.GeneratedContent = "<font
    color=""red"">"&ThisTag.GeneratedContent&"</font><br>">
    The tag ends here<br>
    </cfif>
    </cfoutput>
    The output looks like this:
    Main page
    ThisTag.ExecutionMode is start
    ThisTag.GeneratedContent is
    Tag start
    Tag processing
    Dont mess with the Zohan!!!
    ThisTag.ExecutionMode is end
    ThisTag.GeneratedContent is Dont mess with the Zohan!!!
    Tag processed
    The tag ends here
    back to main page
    My question is this:
    As per the sequence of the statements in the custom tag code,
    the text that appears in the beginning of tag file will be printed
    after which the processing for the end tag happens in the
    <cfif>. The text passed between the <cf_make_red> and
    </cf_make_red> i.e. "Dont mess with the Zohan!!!" appears to
    be printing before the end tag executes.
    Shouldnt the text passed between the <cf_make_red> and
    </cf_make_red> come after the end tag is processed? Because
    thats where i am making the text red.
    Could someone please explain this?

    Doing a little more experimentation, I discovered that pageContext is null in the constructor, but not null in the otherDoStartTagOperations() method (called by the doStartTag() method of the tag's class... it's something Forte forces you to do).
    Is this normal? I was under the impression that pageContext is supposed to be defined EVERYWHERE in any class that extends BodyTagSupport... including the class' own constructor.
    On a related topic, is there documentation somewhere as to what, exactly, Forte is doing behind the scenes when it's managing a taglib (how it keeps track of them, where it puts config files, how the entries it makes in them are different or extended from the normal layout, etc.)? At the moment, I suspect that half of the grief I'm having with writing taglibs is caused by Forte itself forcing me to do things in a roundabout way that bears little resemblance to the ways shown in different books on the topic (and in fact all but ensures that nearly every published example will fail and require major rewriting because of the way it forces tag classes to be structured), but I don't see any easy way to let Forte handle compiling the classes and testing them with its embedded Tomcat, but do the config file housekeeping myself I can be in control of it.

  • IOException when flush is called from a custom tag

    Thanks is advance for the help. I've encountered an oddity in OC4J 10.1.3 Standalone using java 1.5 the 2.4 servlet spec and struts 1.1 and I'm wondering how to resolve it. In our current application we use custom tags to define certain fields. Every tag in our web front end does the same thing.
    <pre>
    JspWriter writer = pageContext.getOut();
    writer.print(sb.toString());
    writer.flush();
    </pre>
    I would understand if the tag was calling a commit then flush and then trying to write to the buffer again. That should raise this exception. We have tags that do the same thing without issue, But some others fail. This is the stack trace we see in the logs.
    <pre>
    WARN - SpecialReviewTag.doStartTag() IOException:
    java.io.IOException: InValid to flush BodyContent: no backing stream behind it
    at com.evermind.server.http.EvermindBodyContent.flush(EvermindBodyContent.java:213)
    at xxx.xxxx.xxxxx.xxxxxx.receiving.struts.tag.SpecialReviewTag.doStartTag(SpecialReviewTag.java:198)
    at receiving.item__receipt__items._jspService(_item__receipt__items.java:897)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:724)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    </pre>
    Here is where the oddity comes into play. The page still renders all the needed information for the user. The problem lies with this exception being flooded into our production logs.
    This is the web.xml file being used to define our .jsp configuration
    <pre>
    <jsp-property-group>
    <display-name>Ignore EL</display-name>
    <url-pattern>*.jsp</url-pattern>
    <el-ignored>true</el-ignored>
    <scripting-invalid>false</scripting-invalid>
    <is-xml>false</is-xml>
    </jsp-property-group>
    </pre>
    One other not these tags worked fine in the OC4J 10.1.2 Container this happened after the conversion to OC4J 10.1.3
    Thanks alot for the help,
    Charles
    Edited by: CharMow on Feb 11, 2009 5:14 AM

    Hi,
    I am also getting the same error, when we move to OC4J 10.1.3.
    If you find any solution for this please let me know, Thanks in advance.
    Following the stack trace..
    Can't insert page '/main.jsp' : InValid to flush BodyContent: no backing stream behind it java.io.IOException: InValid to flush BodyContent: no backing stream behind it at com.evermind.server.http.EvermindBodyContent.flush(EvermindBodyContent.java:213) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:878) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473) at layouts.leftLayout._jspService(_leftLayout.java:126) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259) at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51) at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193) at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259) at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51) at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193) at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283) at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274) at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:254) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:309) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453) at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Unknown Source)
    Thanks,
    Jam

  • Cannot find CFML template for custom tag

    Why am I getting this error when my code looks like this?
    Cannot find CFML template for custom tag UPSPrice.
    ColdFusion attempted looking in the tree of installed custom tags but did not find a custom tag with this name. If you are using per-applica
    <Cfif NOT form.shipzip IS "">
    <CF_UPSPrice SERVICE="#form.upsshiptype#" FROM="#shopshipzip#" TO="#FORM.shipzip#" WEIGHT="#getshipweight.totwei#">
    <cfelse>
    <CF_UPSPrice SERVICE="#form.upsshiptype#" FROM="#shopshipzip#" TO="#FORM.zip#" WEIGHT="#getshipweight.totwei#">
    </cfif>

    UPSPrice.cfm file:
    <!---
    NAME:
    CF_UPSPrice
    DESCRIPTION:
    Cold Fusion custom tag obtain UPS shipping costs from ups.com.
    ATTRIBUTES:
    CALLTAG   - (optional) Electronic or basic call tag issued, valid options
                           are NONE BASIC or ELECTRONIC, defaults to NONE.
    COD       - (optional) Package is being sent C.O.D., valid options are YES
                           and NO, defaults to NO.
    FROM      - (required) Source (ship from) postal code.
    HANDLING  - (optional) Requires special handling (eg. - any article that
                           is not fully encased in an outside shipping container,
                           or any package that exceeds 60 inches in length).
    HAZARD    - (optional) Package contains hazardous material, valid options are YES
                           and NO, defaults to NO.
    HEIGHT    - (optional) Height (in inches) of oversized package.
    LENGTH    - (optional) Length (in inches) of oversized package.
    OVERSIZED - (optional) Package is oversized, valid options are YES and NO,
                           defaults to NO.
    RESPONSE  - (optional) Delivery confirmation service, valid options are
                           NONE BASIC SIGNATURE ALTERNATE or ALL, defaults to
                           NONE.
    SATDELIV  - (optional) Saturday delivery, valid options are YES and NO,
                           defaults to NO.
    SATPICKUP - (optional) Saturday pickup, valid options are YES and NO,
                           defaults to NO.
    SERVICE   - (required) UPS Service ID, valid service IDs are:
                           1DM    - Next Day Air Early AM
                           1DML   - Next Day Air Early AM Letter
                           1DA    - Next Day Air
                           1DAL   - Next Day Air Letter
                           1DP    - Next Day Air Saver
                           1DPL   - Next Day Air Saver Letter
                           2DM    - 2nd Day Air A.M.
                           2DA    - 2nd Day Air
                           2DML   - 2nd Day Air A.M. Letter
                           2DAL   - 2nd Day Air Letter
                           3DS    - 3 Day Select
                           GNDCOM - Ground Commercial
                           GNDRES - Ground Residential
    SHIPNOT1  - (optional) First ship notification, valid options are NONE
                           DOMESTIC or INTERNATIONAL, defaults to NONE.
    SHIPNOT2  - (optional) Second ship notification, valid options are NONE
                           DOMESTIC or INTERNATIONAL, defaults to NONE.
    TOCOUNTRY - (optional) Destination country code, defaults to US if not
                           specified. Visit the UPS site for a complete list of
                           valid two letter country codes.
    TO        - (required) Destination (ship to) postal code.
    VALUE     - (optional) Declared value for carrier liability, carrier assumes
                           $100 by default.
    VERBCONF  - (optional) Verbal confirmation of delivery, valid options are YES
                           and NO, defaults to NO.
    WEIGHT    - (required) Weight (in pounds) of package, fractions may be used.
    WIDTH     - (optional) Width (in inches) of oversized package.
    NOTES:
    This tag submits a shipping cost request to UPS for processing, and returns
    price and shipping information. CF_UPSPrice sets the following variables that
    you may use within your template after the call to CF_UPSPrice:
    UPS_BaseCharge     - Base shipping charge.
    UPS_Charge         - Total charge.
    UPS_Error          - Error message, if there was one.
    UPS_ErrorCode      - Error code, if there was one.
    UPS_FromCountry    - Source country code.
    UPS_FromPostal     - Source postal code.
    UPS_GuaranteedBy   - Guranteed delivery time.
    UPS_OptionalCharge - Total of optional charges.
    UPS_Service        - UPS service ID.
    UPS_Success        - YES if request was successful, NO if not.
    UPS_ToCountry      - Destination country code.
    UPS_ToPostal       - Destination postal code.
    UPS_ToZone         - Destination zone.
    UPS_Weight         - Billed weight.
    USAGE:
    To use just call <CF_UPSPrice> from within your Cold Fusion template,
    passing at least the required attributes TO FROM SERVICE and WEIGHT.
    EXAMPLES:
    Obtain price for next day package from NY to CA:
      <CF_UPSPrice SERVICE="1DA" FROM="11213" TO="90046" WEIGHT="1.5">
      <CFOUTPUT>Cost is #DollarFormat(UPS_Charge)#</CFOUTPUT>
    Sending a oversized package C.O.D. via second day air:
      <CF_UPSPrice SERVICE="2DA" FROM="11213" TO="90046"
       WEIGHT="1.5" HEIGHT="13" WIDTH="12" LENGTH="20" COD="Yes">
    Using form fields:
      <CF_UPSPrice SERVICE="#service#" FROM="#from#" TO="#to#" WEIGHT="#weight#">
    AUTHOR:
    Ben Forta ([email protected]) 10/14/97
    With help from Dave Beckstrom ([email protected])
    --->
    <!--- Initialize variables --->
    <CFSET proceed = "Yes">
    <CFSET error_message = "">
    <!--- Get UPS service --->
    <CFIF proceed>
    <CFIF IsDefined("ATTRIBUTES.service")>
      <CFSET product = ATTRIBUTES.service>
    <CFELSE>
      <CFSET proceed = "No">
      <CFSET error_message = "SERVICE must be specified!">
    </CFIF>
    </CFIF>
    <!--- Get destination postal code --->
    <CFIF proceed>
    <CFIF IsDefined("ATTRIBUTES.to")>
      <CFSET destPostal = ATTRIBUTES.to>
    <CFELSE>
      <CFSET proceed = "No">
      <CFSET error_message = "TO postal code must be specified!">
    </CFIF>
    </CFIF>
    <!--- Get source postal code --->
    <CFIF proceed>
    <CFIF IsDefined("ATTRIBUTES.from")>
      <CFSET origPostal = ATTRIBUTES.from>
    <CFELSE>
      <CFSET proceed = "No">
      <CFSET error_message = "FROM postal code must be specified!">
    </CFIF>
    </CFIF>
    <!--- Get weight --->
    <CFIF proceed>
    <CFIF IsDefined("ATTRIBUTES.weight")>
      <CFSET weight = ATTRIBUTES.weight>
    <CFELSE>
      <CFSET proceed = "No">
      <CFSET error_message = "WEIGHT postal code must be specified!">
    </CFIF>
    </CFIF>
    <!--- If all okay, process other options --->
    <CFIF proceed>
    <!--- Get destination country --->
    <CFSET destCountry = "US">
    <CFIF IsDefined("ATTRIBUTES.tocountry")>
      <CFSET destCountry = ATTRIBUTES.tocountry>
    </CFIF>
    <!--- Get oversized --->
    <CFSET oversized = "0">
    <CFIF IsDefined("ATTRIBUTES.oversized")>
      <CFIF ATTRIBUTES.oversized>
       <CFSET oversized = "1">
      </CFIF>
    </CFIF>
    <!--- Get COD --->
    <CFSET cod = "0">
    <CFIF IsDefined("ATTRIBUTES.cod")>
      <CFIF ATTRIBUTES.cod>
       <CFSET cod = "1">
      </CFIF>
    </CFIF>
    <!--- Get hazard --->
    <CFSET hazard = "0">
    <CFIF IsDefined("ATTRIBUTES.hazard")>
      <CFIF ATTRIBUTES.hazard>
       <CFSET hazard = "1">
      </CFIF>
    </CFIF>
    <!--- Get handling --->
    <CFSET handling = "0">
    <CFIF IsDefined("ATTRIBUTES.handling")>
      <CFIF ATTRIBUTES.handling>
       <CFSET handling = "1">
      </CFIF>
    </CFIF>
    <!--- Get calltag --->
    <CFSET calltag = "0">
    <CFIF IsDefined("ATTRIBUTES.calltag")>
      <CFIF ATTRIBUTES.calltag IS "BASIC">
       <CFSET calltag = "1">
      <CFELSEIF ATTRIBUTES.calltag IS "ELECTRONIC">
       <CFSET calltag = "2">
      </CFIF>
    </CFIF>
    <!--- Get Saturday delivery --->
    <CFSET saturdaydelivery = "0">
    <CFIF IsDefined("ATTRIBUTES.satdeliv")>
      <CFIF ATTRIBUTES.satdeliv>
       <CFSET saturdaydelivery = "1">
      </CFIF>
    </CFIF>
    <!--- Get Saturday pickup --->
    <CFSET saturdaypickup = "0">
    <CFIF IsDefined("ATTRIBUTES.satpickup")>
      <CFIF ATTRIBUTES.satpickup>
       <CFSET saturdaypickup = "1">
      </CFIF>
    </CFIF>
    <!--- Get response --->
    <CFSET response = "0">
    <CFIF IsDefined("ATTRIBUTES.response")>
      <CFIF ATTRIBUTES.response IS "BASIC">
       <CFSET response = "1">
      <CFELSEIF ATTRIBUTES.response IS "SIGNATURE">
       <CFSET response = "2">
      <CFELSEIF ATTRIBUTES.response IS "ALTERNATE">
       <CFSET response = "3">
      <CFELSEIF ATTRIBUTES.response IS "ALL">
       <CFSET response = "4">
      </CFIF>
    </CFIF>
    <!--- Get vcd --->
    <CFSET vcd = "0">
    <CFIF IsDefined("ATTRIBUTES.verbconf")>
      <CFIF ATTRIBUTES.verbconf>
       <CFSET vcd = "1">
      </CFIF>
    </CFIF>
    <!--- Get first ship notify --->
    <CFSET firstshipnotify = "0">
    <CFIF IsDefined("ATTRIBUTES.shipnot1")>
      <CFIF ATTRIBUTES.shipnot1 IS "DOMESTIC">
       <CFSET firstshipnotify = "1">
      <CFELSEIF ATTRIBUTES.shipnot1 IS "INTERNATIONAL">
       <CFSET firstshipnotify = "2">
      </CFIF>
    </CFIF>
    <!--- Get second ship notify --->
    <CFSET secondshipnotify = "0">
    <CFIF IsDefined("ATTRIBUTES.shipnot2")>
      <CFIF ATTRIBUTES.shipnot2 IS "DOMESTIC">
       <CFSET secondshipnotify = "1">
      <CFELSEIF ATTRIBUTES.shipnot2 IS "INTERNATIONAL">
       <CFSET secondshipnotify = "2">
      </CFIF>
    </CFIF>
    </CFIF> <!--- End process params --->
    <!--- If have all params, process request --->
    <CFIF proceed>
    <CFHTTP
      URL="http://www.ups.com/using/services/rave/qcostcgi.cgi"
      METHOD="POST"
    >
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="accept_UPS_license_agreement" VALUE="yes">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="10_action" VALUE="3">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="13_product" VALUE="#product#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="15_origPostal" VALUE="#origPostal#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="19_destPostal" VALUE="#destPostal#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="22_destCountry" VALUE="#destCountry#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="23_weight" VALUE="#weight#">
      <CFIF IsDefined("ATTRIBUTES.value")><CFHTTPPARAM TYPE="FORMFIELD" NAME="24_value" VALUE="#ATTRIBUTES.value#"></CFIF>
      <CFIF IsDefined("ATTRIBUTES.length")><CFHTTPPARAM TYPE="FORMFIELD" NAME="25_length" VALUE="#ATTRIBUTES.length#"></CFIF>
      <CFIF IsDefined("ATTRIBUTES.width")><CFHTTPPARAM TYPE="FORMFIELD" NAME="26_width" VALUE="#ATTRIBUTES.width#"></CFIF>
      <CFIF IsDefined("ATTRIBUTES.height")><CFHTTPPARAM TYPE="FORMFIELD" NAME="27_height" VALUE="#ATTRIBUTES.height#"></CFIF>
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="29_oversized" VALUE="#oversized#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="30_cod" VALUE="#cod#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="33_hazard" VALUE="#hazard#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="34_handling" VALUE="#handling#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="35_calltag" VALUE="#calltag#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="37_saturdaydelivery" VALUE="#saturdaydelivery#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="38_saturdaypickup" VALUE="#saturdaypickup#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="39_response" VALUE="#response#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="43_vcd" VALUE="#vcd#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="44_firstshipnotify" VALUE="#firstshipnotify#">
      <CFHTTPPARAM TYPE="FORMFIELD" NAME="45_secondshipnotify" VALUE="#firstshipnotify#">
    </CFHTTP>
    <!--- Check if succeeded --->
    <CFIF ListFirst(CFHTTP.FileContent, "%") IS "UPSOnLine3">
      <!--- Success, set variables --->
      <CFSET CALLER.UPS_Success = "Yes">
      <CFSET CALLER.UPS_Service = ListGetAt(CFHTTP.FileContent, 2, "%")>
      <CFSET CALLER.UPS_FromPostal = ListGetAt(CFHTTP.FileContent, 3, "%")>
      <CFSET CALLER.UPS_FromCountry = ListGetAt(CFHTTP.FileContent, 4, "%")>
      <CFSET CALLER.UPS_ToPostal = ListGetAt(CFHTTP.FileContent, 5, "%")>
      <CFSET CALLER.UPS_ToCountry = ListGetAt(CFHTTP.FileContent, 6, "%")>
      <CFSET CALLER.UPS_ToZone = ListGetAt(CFHTTP.FileContent, 7, "%")>
      <CFSET CALLER.UPS_Weight = ListGetAt(CFHTTP.FileContent, 8, "%")>
      <CFSET CALLER.UPS_BaseCharge = ListGetAt(CFHTTP.FileContent, 9, "%")>
      <CFSET CALLER.UPS_OptionalCharge = ListGetAt(CFHTTP.FileContent, 10, "%")>
      <CFSET CALLER.UPS_Charge = ListGetAt(CFHTTP.FileContent, 11, "%")>
      <CFSET CALLER.UPS_GuaranteedBy = ListGetAt(CFHTTP.FileContent, 12, "%")>
      <CFSET CALLER.UPS_Error = "">
      <CFSET CALLER.UPS_ErrorCode = "">
    <CFELSE>
      <!--- Failed, set variables and error message --->
      <CFSET CALLER.UPS_Success = "No">
      <CFSET CALLER.UPS_Service = "">
      <CFSET CALLER.UPS_FromPostal = "">
      <CFSET CALLER.UPS_FromCountry = "">
      <CFSET CALLER.UPS_ToPostal = "">
      <CFSET CALLER.UPS_ToCountry = "">
      <CFSET CALLER.UPS_ToZone = "">
      <CFSET CALLER.UPS_Weight = "">
      <CFSET CALLER.UPS_BaseCharge = "">
      <CFSET CALLER.UPS_OptionalCharge = "">
      <CFSET CALLER.UPS_Charge = "">
      <CFSET CALLER.UPS_GuaranteedBy = "">
      <CFSET CALLER.UPS_Error = ListGetAt(CFHTTP.FileContent, 2, "%")>
      <CFSET CALLER.UPS_ErrorCode = ListGetAt(CFHTTP.FileContent, 3, "%")>
    </CFIF>
    <CFELSE>
    <!--- Failed, display error message, and abort --->
    <CFOUTPUT><H1>Error: #error_message#</H1></CFOUTPUT>
    <CFABORT>
    </CFIF>

Maybe you are looking for

  • To Windows Users Considering Mac Pro

    When I first was considering a mac pro ( I have just bought one a week ago - end of june 2011 ) My first few posts prior to purchasing on here were probably very defensive and pushing for reasoning. Only after purchasing do I understand why I got the

  • I got a virus, how do i remove it?

    I just got a virus a week ago. I had the spyware sweeper asking to sweep it up. It said it had detected 3 virus'. how can i remove the virus?

  • How can I get Category, Tags info into new PC?

    Old PC (Vista) crashed - the most recent backup was a system backup - it was not a Catalog backup utilizing PhotoShop Elements 6.  However, I have a PSE 6 catalog backup done 6 months prior.  But, can I get the more recent info from a Catalog folder?

  • Why is Aperture 3.1.1 trying to connect to google?

    I've done nothing to try to get online anywhere, yet Aperture 3.1.1 is trying to connect to buttons.googlesyndication.com as well as id.google.com. Why is it doing this?

  • Is it possible to use AAMEE for Lightroom 4?

    I'm trying to find a better solution to installing Lightroom 4 in a computer lab (30 stations). Right now I need to manually enter the serial number and Adobe ID on each station to activate. Then I have to move that license file to the main library (