Using EL in custom tag with JSP1.2 container

I search the the Forum here and Google for a method how I can use expression language in my custom tag. But I have to use a JSP1.2 container which makes it quite difficult. What I need is startsWith-Tag which looks like this.
<str:startsWith condition1="${sql.rows[0].MY_COLUMN}" condition2="MyCondition">
</str:startsWith>Right now my tag works, but instead of the database of MY_COLUMN the string ${sql.rows[0].MY_COLUMN} is submitted.
In the TLD I specified rtexprvalue with true. My custom tag extends javax.servlet.jsp.jstl.core.ConditionalTagSupport.
What I read here was that I have to evaluate the el expression myself, but how do I do this? I hope someone can give me a hint how to make the tag working correctly.
TIA
Axel

You might find the source code of MicroNova YUZU (http://sourceforge.net/projects/micronova-yuzu) useful. It is an EL-based tag library that supports both JSP 1.2 and 2.0. See "jsp12" and "jsp20" subdirectories for version-specific EL handling. Hope this helps.

Similar Messages

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

  • Taglib problem: Cannot parse custom tag with short name table

    Hello!
    I am having problems deploying a jsp tag in web as. The same war file works fine on websphere, jboss. SAP web as seems to be complaining about the short name in the tld.
    Can any body me to any known web as issues with jsp tags?
    Thanks
    [code]
    Application error occurs during processing the request.
    Details: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: Internal error while parsing JSP page /usr/sap/J2E/JC00/j2ee/cluster/server0/apps/sap.com/dispear/servlet_jsp/disp/root/test.jsp.
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:85)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.getClassName(JSPServlet.java:207)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.compileAndGetClassName(JSPServlet.java:369)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:164)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Cannot parse custom tag with short name table.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:129)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.ElementCollection.action(ElementCollection.java:52)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.initParser(JSPParser.java:307)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:74)
         ... 18 more
    Caused by: com.sap.engine.services.servlets_jsp.lib.jspparser.exceptions.JspParseException: Unknown class name java.lang.Object.
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.convertString(TagBeginGenerator.java:365)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:187)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:212)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:269)
         at com.sap.engine.services.servlets_jsp.lib.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:127)
         ... 21 more
    [/code]

    Hi Ray,
    I am facing similar kind of issue.
    Can you please help to resolve it?
    Thanks in advance.
    Logs are as below [Here I am using standard tag lib]::
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name [out].
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:183)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspIncludeDirective.action(JspIncludeDirective.java:51)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.customTagAction(JspElement.java:994)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.action(JspElement.java:228)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:69)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.GenerateJavaFile.generateJavaFile(GenerateJavaFile.java:72)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:270)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.generateJavaFile(JSPProcessor.java:194)
         at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:126)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassName(JSPChecker.java:319)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.compileAndGetClassName(JSPChecker.java:248)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassNameForProduction(JSPChecker.java:178)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.processJSPRequest(JSPChecker.java:109)
         at com.sap.engine.services.servlets_jsp.jspparser_api.JspParser.generateJspClass(JspParser.java:154)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:193)
         ... 47 more
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Attribute [value] of [<c:out>] can accept only static values.
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.calculateAttributeValue(TagBeginGenerator.java:476)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:394)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:562)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:678)
         at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:181)
         ... 64 more
    Regards,
    Sankalp

  • .exception.JspParseExcept Cannot parse custom tag with short name [out].

    Hi
         I have almost migrated an application from jboss to CE 7.1 sp3 maxdb 32 bit
         however I am getting the following error on c:out tag of standard jslt.
    Runtime error in processing of the JSP file [C:\usr\sap\CE1\J00\j2ee\cluster\apps\<....>\servlet_jsp\<application_context_name>\root\jsp\view\<jsp_name>.jsp].
    Line:----
    The error is: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name [out].02004C4F4F50001F0000002D000012B000B0688132009833
    Line:----
    Do anybody have some idea why is it happening.
    My guess would be because of jslt version mismatch. but its working fine in jboss. I am not sure what version cE 7.1 support may be 1.2. any idea how to chek the supported version in the server.
    The jsp code is something like
    Line:----
    <code>
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="c_rt" uri="http://java.sun.com/jstl/core_rt" %>
    <c:url var="thumbnailStream" value="/do/<action_tag>">
               <c_rt:param name="stream_id"      value="<%= <variable1> %>"/>
               <c:param    name="stream_id_type" value="<variable2>"/>
               <c:param    name="content_kind"   value="<variable3>"/>
            </c:url>
    <img border="0" src="<c:out value="$"/>">
    </code>
    Line:----
      from the SAP help text its said that jslt is being overrided by server to use from global library rather than local webapplication library. Couls woud explain where is this global library located in the server directory.
    Thx.
    Ashutosh

    Hi are you able to solve this issue.I am getting similar kind of issue.
    Logs for the same are ::
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Cannot parse custom tag with short name out.
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:183)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspIncludeDirective.action(JspIncludeDirective.java:51)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.customTagAction(JspElement.java:994)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.JspElement.action(JspElement.java:228)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:59)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.ElementCollection.action(ElementCollection.java:69)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.GenerateJavaFile.generateJavaFile(GenerateJavaFile.java:72)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:270)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.generateJavaFile(JSPProcessor.java:194)
    at com.sap.engine.services.servlets_jsp.server.jsp.JSPProcessor.parse(JSPProcessor.java:126)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassName(JSPChecker.java:319)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.compileAndGetClassName(JSPChecker.java:248)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.getClassNameForProduction(JSPChecker.java:178)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JSPChecker.processJSPRequest(JSPChecker.java:109)
    at com.sap.engine.services.servlets_jsp.jspparser_api.JspParser.generateJspClass(JspParser.java:154)
    at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:193)
    ... 47 more
    Caused by: com.sap.engine.services.servlets_jsp.jspparser_api.exception.JspParseException: Attribute value of <c:out> can accept only static values.
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.calculateAttributeValue(TagBeginGenerator.java:476)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateSetters(TagBeginGenerator.java:394)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generateServiceMethodStatements(TagBeginGenerator.java:562)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.taglib.TagBeginGenerator.generate(TagBeginGenerator.java:678)
    at com.sap.engine.services.servlets_jsp.jspparser_api.jspparser.syntax.xmlsyntax.CustomJspTag.action(CustomJspTag.java:181)
    ... 64 more

  • Tomcat 4.1.12 and custom tags with body

    Hi,
    I had deployed one application in tomcat 3.3.1 which used custom tags with body, and it worked fine, However recently I upgraded that application to tomcat-4.1.12
    and the tags with body stopped giving expected behaviour, however the tags without body are giving expected behaviour, I had a look at generated jsp file...
    I am pasting the generated output here
    jp.co.nttdata.sk._webtier.tagext.FormTag jspxth_sk_form_0 = (jp.co.nttdata.sk._webtier.tagext.FormTag) jspxtagPool_sk_form_action.get(jp.co.nttdata.sk._webtier.tagext.FormTag.class);
    jspxth_sk_form_0.setPageContext(pageContext);
    jspxth_sk_form_0.setParent(null);
    jspxth_sk_form_0.setAction(SKScreenDefinition.SK_I0100 );
    int jspxeval_sk_form_0 = jspxth_sk_form_0.doStartTag();
    if (_jspx_eval_sk_form_0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
    if (_jspx_eval_sk_form_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
    javax.servlet.jsp.tagext.BodyContent _bc = pageContext.pushBody();
    _bc.clear();
    out = _bc;
    jspxth_sk_form_0.setBodyContent(_bc);
    jspxth_sk_form_0.doInitBody();
    do {
    out.write("\r\n<input type=\"hidden\" name=\"rpt_no\" value=\"<%= rpt_no %>\">\r\n<input type=\"hidden\" name=\"optnOpen\" value=\"0\">\r\n<table border=0 cellspacing=0 cellpadding=0 class=\"bdsyl\">\r\n<tr>\r\n<td class=\"innframe\">\r\n\r\n\t<table border=0 cellspacing=0 cellpadding=5 class=\"bgcol_1\">\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������E/td>\r\n\t<td>\r\n\t\t\t<select name=\"rptDivCombo\">\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOskCodeNameRptDiv != null) nLen = arrOskCodeNameRptDiv.length;\r\n%>\r\n<%\r\n\tfor(int i=0;i<nLen;i++) \r\n\t{\r\n\t\tString cd = arrOskCodeNameRptDiv.getCode();\r\n\t\tString nm = arrOskCodeNameRptDiv[i].getName();\r\n\t\tString value = cd + SKConstants.SEPARATOR + nm;\r\n\r\n\t\tstrSelected = \"\";\r\n\t\tif(cd.equals(rpt_div)) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%=value%>\"><%= nm%></option>\r\n<%\r\n\t}//for loop\r\n%>\r\n\t\t\t</select>\r\n\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ��� ���E���</td>\r\n\t<td>\r\n\t\r\n\t\t\t<select name=\"prortyCombo\">\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOskCodeNameProrty != null) nLen = arrOskCodeNameProrty.length;\r\n");
    out.write("%>\r\n<%\r\n\tfor(int i=0;i<nLen;i++) \r\n\t{\r\n\t\tString cd = arrOskCodeNameProrty[i].getCode();\r\n\t\tString nm = arrOskCodeNameProrty[i].getName();\r\n\t\tString value = cd + SKConstants.SEPARATOR + nm;\r\n\r\n\t\tstrSelected = \"\";\r\n\t\tif(cd.equals(prorty)) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= value %>\"><%= nm %></option>\r\n<%\r\n\t}//for loop\r\n%>\r\n\t\t\t</select>\r\n\t\r\n\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������E/td>\r\n\t<td><input type=\"text\" size=4 maxlength=4 name=\"rpt_dt_yyyy\" value=\"<%= rpt_dt_yyyy %>\">��� <input type=\"text\" size=2 maxlength=2 name=\"rpt_dt_mm\" value=\"<%= rpt_dt_mm %>\">���E<input type=\"text\" size=2 name=\"rpt_dt_dd\" maxlength=2 value=\"<%= rpt_dt_dd %>\">��� <input type=\"text\" maxlength=2 size=2 name=\"rpt_dt_hh\" value=\"<%= rpt_dt_hh %>\">���E<input type=\"text\" size=2 maxlength=2 name=\"rpt_dt_mi\" value=\"<%= rpt_dt_mi %>\">���E<span class=\"fsyl_2\">�E����������������E/span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ��� ���E���E</td>\r\n\t<td><input type=\"text\" size=20 name=\"rpt_user\" value=\"<%= Util.forHidden(rpt_user) %>\"></td>\r\n");
    out.write("\t</tr>\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���������������E/td>\r\n\t<td>\r\n\t\r\n\t\t\t<select name=\"rptRegiUserCombo\">\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOfUserName != null) nLen = arrOfUserName.length;\r\n\r\n\tfor(int i=0;i<nLen;i++){\r\n\t\tString[] arrTemp = UzUtil.extractTokens(arrOfUserName[i], SKConstants.SEPARATOR);\r\n\t\t\r\n\t\tstrSelected = \"\";\r\n\t\tif(arrTemp[0].equals(rpt_regi_user)) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= arrOfUserName[i] %>\"><%= arrTemp[1] %></option>\r\n<%\r\n\t}//for loop\r\n%>\r\n\t\t\t</select>\r\n\r\n\t\r\n\t</td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������������</td>\r\n\t<td><input type=\"text\" size=70 name=\"rpt_title\" value=\"<%= UzString.forHidden(rpt_title)%>\"> <span class=\"fsyl_2\">�E�E00���E�����E/span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ��������E���</td>\r\n\t<td nowrap><textarea wrap=\"physical\" rows=10 cols=72 name=\"rpt_txt\"><%= UzString.htmlEncodeForHidden(rpt_txt) %></textarea> <span class=\"fsyl_2\">�E�E000���E�����E/span>      </td>\r\n");
    out.write("\t</tr>\r\n\t<tr>\r\n\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���������E��</td>\r\n\t<td><textarea rows=5 cols=72 name=\"rpt_effct_lmt\"><%= UzString.htmlEncodeForHidden(rpt_effct_lmt) %></textarea> <span class=\"fsyl_2\">�E�E00���E�����E/span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���E��� ���</td>\r\n\t<td><textarea rows=5 cols=72 name=\"reappr_cnd\"><%= UzString.htmlEncodeForHidden(reappr_cnd)%></textarea> <span class=\"fsyl_2\">�E�E00���E�����E/span></td>\r\n\t</tr>\r\n\t<tr>\r\n\t<td nowrap class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������������E/td>\r\n\t<td><input type=\"text\" size=4 name=\"rply_prf_dt_yyyy\" maxlength=4 value=\"<%= rply_prf_dt_yyyy %>\">��� <input type=\"text\" size=2 name=\"rply_prf_dt_mm\" maxlength=2 value=\"<%= rply_prf_dt_mm %>\">���E<input type=\"text\" maxlength=2 size=2 name=\"rply_prf_dt_dd\" value=\"<%= rply_prf_dt_dd %>\">��� <input type=\"text\" maxlength=2 size=2 name=\"rply_prf_dt_hh\" value=\"<%= rply_prf_dt_hh %>\">���E<input type=\"text\" maxlength=2 size=2 name=\"rply_prf_dt_mi\" value=\"<%= rply_prf_dt_mi %>\">���E<span class=\"fsyl_2\">�E����������������E/span></td>\r\n");
    out.write("\t</tr>\r\n\t<tr>\r\n\t<td>���</td>\r\n\t<td align=right><input type=\"button\" value=\"���������������\" onClick=\"openOptn()\"></td>\r\n\t</tr>\r\n<!---- ��������������������������������������� ----->\r\n\t<tr id=\"com\" style=\"display:none\">\r\n\t<td colspan=2>\r\n\t\t<table border=0 cellspacing=0 cellpadding=5>\r\n\t\t<tr>\r\n\t\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���������������E/td>\r\n\t\t<td>\r\n\t\t\t<select name=\"crrspndUserCombo\">\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOfUserName != null) nLen = arrOfUserName.length;\r\n\r\n\tif(crrspnd_user.equals(\"\")) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= SKConstants.NOTSPECIFIED %>\">���������������������E/option>\r\n<%\r\n\tfor(int i=0;i<nLen;i++){\r\n\t\tString[] arrTemp = UzUtil.extractTokens(arrOfUserName[i], SKConstants.SEPARATOR);\r\n\t\t\r\n\t\tstrSelected = \"\";\r\n\t\tif(arrTemp[0].equals(crrspnd_user)) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= arrOfUserName[i] %>\"><%= arrTemp[1] %></option>\r\n<%\r\n\t}//for loop\r\n%>\r\n\t\t\t</select>\r\n\t\t\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������������E/td>\r\n");
    out.write("\t\t<td>\r\n\t\t\t<select name=\"fndngDivCombo\">\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOskCodeNameFndngDiv != null) nLen = arrOskCodeNameFndngDiv.length;\r\n\r\n\tif(fndng_div.equals(\"\")) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= SKConstants.NOTSPECIFIED %>\">���������������������E/option>\r\n<%\r\n\tfor(int i=0;i<nLen;i++) \r\n\t{\r\n\t\tString cd = arrOskCodeNameFndngDiv[i].getCode();\r\n\t\tString nm = arrOskCodeNameFndngDiv[i].getName();\r\n\t\tString value = cd + SKConstants.SEPARATOR + nm;\r\n\r\n\t\tstrSelected = \"\";\r\n\t\tif(cd.equals(fndng_div)) strSelected = \"selected\";\r\n%>\r\n\t\t\t\t<option <%= strSelected %> value=\"<%= value %>\"><%= nm %></option>\r\n<%\r\n\t}//for loop\r\n%>\r\n\t\t\t</select>\r\n\t\t\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������E��������</td>\r\n\t\t<td><input type=\"text\" maxlength=4 size=4 name=\"crrspnd_fin_pln_dt_yyyy\" value=\"<%= crrspnd_fin_pln_dt_yyyy %>\">��� <input type=\"text\" maxlength=2 size=2 name=\"crrspnd_fin_pln_dt_mm\" value=\"<%= crrspnd_fin_pln_dt_mm %>\">���E<input maxlength=2 type=\"text\" size=2 name=\"crrspnd_fin_pln_dt_dd\" value=\"<%= crrspnd_fin_pln_dt_dd %>\">��� <span class=\"fsyl_2\">�E����������������E/span></td>\r\n");
    out.write("\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������E��</td>\r\n\t\t<td><input type=\"text\" maxlength=4 size=4 name=\"crrspnd_fin_dt_yyyy\" value=\"<%= crrspnd_fin_dt_yyyy %>\">��� <input type=\"text\" maxlength=2 size=2 name=\"crrspnd_fin_dt_mm\" value=\"<%= crrspnd_fin_dt_mm %>\">���E<input type=\"text\" size=2 maxlength=2 name=\"crrspnd_fin_dt_dd\" value=\"<%= crrspnd_fin_dt_dd %>\">��� <span class=\"fsyl_2\">�E����������������E/span></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������</td>\r\n\t\t<td><textarea rows=8 cols=72 name=\"cause_txt\"><%= UzString.htmlEncodeForHidden(cause_txt) %></textarea> <span class=\"fsyl_2\">�E�E000���E�����E/span></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���������E��</td>\r\n\t\t<td><textarea rows=10 cols=72 name=\"crrspnd_txt\"><%= UzString.htmlEncodeForHidden(crrspnd_txt) %></textarea> <span class=\"fsyl_2\">�E�E000���E�����E/span></td>\r\n\t\t</tr>\r\n\t\t<tr>\r\n\t\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ���������������E/td>\r\n\t\t<td><textarea rows=8 cols=72 name=\"rlps_prvnt_schm\"><%= UzString.htmlEncodeForHidden(rlps_prvnt_schm) %></textarea> <span class=\"fsyl_2\">�E�E000���E�����E/span></td>\r\n");
    out.write("\t\t</tr>\r\n\t\t</table>\r\n\t</td>\r\n\t</tr>\r\n<!---- ��������������������������������������� ���E----->\r\n\t<tr>\r\n\t<td valign=top class=\"fsyl_1\"><font class=\"fsyl_6\">���</font> ������������������E/td>\r\n\t<td>\r\n\t\t<table border=0 cellspacing=0 cellpadding=0>\r\n\t\t<tr valign=top>\r\n\t\t<td><input type=\"radio\" name=\"mail_sendto_div_radio\" checked onClick=\"mailCheck(true)\" value=\"<%= SKConstants.CD_ONE + SKConstants.SEPARATOR + \"������\" %>\">��������������� <input type=\"radio\" name=\"mail_sendto_div_radio\" onClick=\"mailCheck(false)\" value=\"<%= SKConstants.CD_ZERO + SKConstants.SEPARATOR + \"���������E��\" %>\">���������E��Enbsp; </td>\r\n\t\t<td>\r\n<%\r\n\tstrSelected = \"\";\r\n\tnLen = 0;\r\n\tif(arrOskCodeNameGroup != null) nLen = arrOskCodeNameGroup.length;\r\n\tint nExtra = (nLen/2) + (nLen%2);\r\n%>\r\n<%\r\n\tfor(int i=0;i<nLen;i++) \r\n\t{\r\n\t\tString cd = arrOskCodeNameGroup[i].getCode();\r\n\t\tString nm = arrOskCodeNameGroup[i].getName();\r\n\t\tString value = cd + SKConstants.SEPARATOR + nm;\r\n%>\r\n\t\t\t\t<input type=\"checkbox\" name=\"send_mail\" value=\"<%= value %>\"><%= nm %><br>\r\n<%\r\n\t\tif((i+1) == nExtra)\r\n\t\t{\r\n%>\r\n\t\t\t</td>\r\n\t\t\t<td>    </td>\r\n");
    out.write("\t\t\t<td>\r\n<%\r\n\t\t}\r\n\t}//for loop\r\n%>\r\n\t\t</td>\r\n\t\t</tr>\r\n\t\t</table>\r\n\t</td>\r\n\t</tr>\r\n\t<td>���</td>\r\n\t<td align=right><br><input type=\"submit\" value=\"������������\" name=\"saveReport\">���<input type=\"submit\" value=\"���������������������\" name=\"regReport\"></td>\r\n\t</tr>\r\n\t</table>\r\n\r\n</td>\r\n</tr>\r\n</table>\r\n");
    int evalDoAfterBody = jspxth_sk_form_0.doAfterBody();
    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
    break;
    } while (true);
    if (_jspx_eval_sk_form_0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE)
    out = pageContext.popBody();
    What I found out that scriptlets are also encluded in string however they should not be enclosed.
    Is it a bug? or do I need to change my taghandler class...?
    Any suggestion, any help ll be really helpful
    Regards,
    Susheel

    Hi,
    I am able to resolve it,
    Actually I was using the body content as tagdependent instead of jsp.
    However the body content tagdependent works in Tomcat 3.3.1 and weblogic 5.1, 6.0.
    Anyway...

  • Integrating a legacy custom tag with facelets webapp

    Hi
    I have an external custom tag ( a handler that had extended javax.servlet.jsp.tagext.TagSupport ). I am trying to use that custom tag in my .xhtml file(mine is facelets webapp). Please see the xhtml content below
    <html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:tGrid="http://java.pershing.com/tGrid">
    <tGrid:gridFields viewname="view1" isDefault="true" fields="Symbol,Quantity,Security Description,Account Type"/>
    </html>
    The problem here, the tag handler class is not getting invoked, i do not get the HTML content from it.
    I understand like we need to add 'taglib.xml' file as below, and register as config files in servlet context param.
    <tag>
    <tag-name>gridFields </tag-name>
    <handler-class>
    xyz.Grid
    </handler-class>
    </tag>
    I have collected the attributes and kept as TagAttribute in Grid handler class..
    But how could i invoke the custom handler class that had implemented TagSupport and start its own life cycle.
    Please help me out.
    Thanks
    -vijay

    Okay. so we cannot use any legacy custom tags and we need to duplicate the code into a new facelets handler class and add into tablig.xml file. is my understanding correct.?
    By the way, JSTL tags like <c:out> <c:if> are being identified by facelets view handler. How this cud have been supported by it?
    Thanks
    -vijay

  • Custom tag with rendered attribute

    Is it possible to create a custom tag that operates similar to a JSF tag with the rendered attribute? Wrapping output with c:if test="..." is not as nice as the JSF rendered option, but I don't want to use JSF for this particular project.
    Edited by: black_lotus on Nov 23, 2007 12:13 PM

    TLD File, per your previous recommendation:
    <attribute>
         <name>disabled</name>
         <required>false</required>
         <rtexprvalue>true</rtexprvalue>
         <type>boolean</type>
    </attribute>My Tag class (snippet):
    public class ButtonTag extends TagSupport
      private boolean disabled;
      public ButtonTag() {}
      public boolean isDisabled()
         return disabled;
      public void setDisabled(boolean b)
        disabled = b;
    }A sample of the jsp file invoking it:
    <c:set var="result" value="${computedValue}"/>
    <ltm:button disabled="${result}"/>Regardless of the value of result, ("true" or "false") it always passes false to the setDisabled method of the button tag class.

  • How do I configure portal desktop to use my own custom tag in template?

    I seem to have tried everything. I want to use a custom tag from a jar file on a template JSP. I keep getting error saying tag library not found. I have the tld in the meta-inf of the jar. I tried putting the jar in the desktop classes, the deployed WEB-INF lib directory for portal, in the web-src directory for the portal. I tried configuring the uri in the web.xml for the portal webapp. None of these have worked. Does someone know how to do this? If someone could help out that would be great. I tries the jar from a web application and it worked fine. I just need to get this working with Portal Server.
    Thanks,
    Frank

    Thank you for the reply Alex. We are using the Dynamics AX 2012 R3 ISO for our installation. In the software requirement documentation for Dynamics AX it says that is able to run on Windows Server 2012 R2. I believe the prerequisites for Dynamics AX and
    Dynamics CRM are different. We received a response from another forum that you can change the .NET version that Sharepoint 2010 uses through IIS in the application pool, but even after setting it to .NET v2.0, we still receive the error in the Dynamics log
    that says it is not compatible with .NET v4.0. So I suppose the question is, where does the Dynamics AX 2012 R3 prerequisite checker look to see which version of .NET Sharepoint is using?
    Thanks again for the reply!

  • Custom Tag with open body loop

    Hi
    I'm fairly new to custom tags. I want to do something like the following
    index.jsp
    <mytag:allItems>
    ${item.name} ${item.url}
    </mytag:allItems>
    At the moment I have the following which works fine
    menu.tag
    <jsp:useBean id="items" class="com.content.urls"/>
    <c:forEach var="menuItem" items="${items.attachedItems}">
    ${menuItem.name}
    </c:forEach>
    index.jsp
    <mytags:menu />
    The bean returns a list and the tag file produces the urls which is great. However what I would like to do is using the example above not have the content of the loop fixed. For exmaple I could do
    <mytag:allItems>
    ${item.name}
    </mytag:allItems>
    or
    <mytags:menu>
    <li>${item.name}</li>
    </mytags:menu>
    I would also like to leave it so that closing the tag would still produce the list of urls as a default.
    any help much appreciated.

    Rob - replace your forEach with:
    <c:forEach var="menuItem" items="${items.attachedItems}">
        <%@ variable name-given="menuItem" scope="NESTED" %>
        <jsp:doBody />
    </c:forEach>The key here is that the menuItem variable is then exposed to the tag body before it is output.
    then your jsp will be:
    <mytag:allItems>
        <a href="${menuItem.url}">${menuItem.name}</a>
    </mytag:allItems>To do the last bit - you just need to define a variable for the body and then test whether it is set:
    <jsp:doBody var="body" />
    <c:forEach var="menuItem" items="${items}">
        <c:if test="${not empty body}">
            <%@ variable name-given="menuItem" scope="NESTED" %>
            <jsp:doBody />
        </c:if>
        <c:if test="${empty body}">
             <a href="${menuItem.path}">${menuItem.name}</a>
        </c:if>
    </c:forEach>Peter.

  • Custom tag with struts

    Hi
    I would like to create a custom tag that will print this section of html with struts:<tr>
         <td class="f_name"><bean:message bundle="fields" key="firstName" /></td>
         <td class="f_value"><html:text property="firstName" /></td>
    </tr>This means that i sould pass to the custom tag the folowing attributes:
    1. bundle - the bundle name to use ("fields").
    2. property - the name of the submitted filed and the key in the bundle resource ("firstName").
    This is how i want to use it:<html:form action="/register.do" enctype="UTF-8">
    <table cellspacing="0" cellpadding="0" border="0" class="t_details">
    <mytld:text bundle="fields" key="firstName"/>
    <mytld:text bundle="fields" key="lastName"/>
    </html:form>For me, this way looks much easier to develop my application/s, don't you agree?
    The problem is that i can't (or i don't know how) to use custom tags in other a custom tag, and if i include a jsp file (with pageContext.indlude("url");), how do i pass the attributes to the jsp page?
    Thanks a lot
    mamtz

    Interesting answer, i'll put it in my mind, but this is not what i ment :) (nice thinking...)
    what i ment was, html:text tag has many attributes like: property, name, alt, size, maxLength and so on...
    i would like sometimes to use size or maxLength and sometimes not.
    take a look at what i wrote:<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%
         String property=""+request.getAttribute("property");
         String bundle=""+request.getAttribute("bundle");
         Object max=request.getAttribute("maxLength");
         String maxLength= max==null ? "" : ""+max;
         Object s=request.getAttribute("size");
         String size= s==null ? "" : ""+s;
    %>
         <tr>
              <td class="f_name"><bean:message bundle="<%=bundle%>" key="<%=property%>" /></td>
    <%     if(max!=null && s!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" maxlength="<%=maxLength%>" size="<%=size%>" /></td>
    <%     }else if(max!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" maxlength="<%=maxLength%>" /></td>
    <%     }else if(s!=null){
    %>          <td class="f_value"><html:text property="<%=property%>" size="<%=size%>" /></td>
    <%     }else{
    %>          <td class="f_value"><html:text property="<%=property%>" /></td>
    <%     }
    %>     </tr>pretty complicated, is'nt it?
    think what would happen if i would like to add just one more attribute...

  • Custom Tag with script in attribute.

    Hi,
              I use a custom tag in which an attribute is generated dynamicly.But it
              doesn't work.
              Here is the sample:
              <tlt:MyTag MyAttr="<%= "abc"%>" />
              the result is MyTag doesn't work correctly but output <tlt:MyTag
              MyAttr="abc" /> in the browser source file.My server is wls5.1 sp6.
              Can I use this approach?
              Pan
              

    Pan YangBin wrote:
              >
              > Hi,
              > I use a custom tag in which an attribute is generated dynamicly.But it
              > doesn't work.
              >
              > Here is the sample:
              > <tlt:MyTag MyAttr="<%= "abc"%>" />
              That's because the value of MyAttr attribute is included in the same
              quotes as the value of the expression. Change the line to:
              <tlt:MyTag MyAttr='<%= "abc"%>' />
              and it should do the trick.
              >
              > the result is MyTag doesn't work correctly but output <tlt:MyTag
              > MyAttr="abc" /> in the browser source file.My server is wls5.1 sp6.
              Oh, I see. You didn't specify that the page uses the Tag Library which
              is done by
              <%@ taglib uri="/uri_to_your_TLD" prefix="tlt" %>
              Another mistake is that the name of the "MyAttr" attribute begins with
              the uppercase letter, so at the end the page compilation will result
              with an error saying that appropriate attribute won't be found or so.
              Change the name of "MyAttr" to "myAttr" or whatever you like, but it
              must start with the lowercase letter.
              Take a look at JavaServer Pages specification available at
              http://java.sun.com/products/jsp. There you can find loads of answers,
              esp. a chapter about Tag Extenstions.
              > Pan
              Jacek Laskowski
              HP Consulting
              

  • Can I use c:out JSTL tag with int values?

    I am attempting to c:out an int variable in my JSP using a JSTL core tag. First is it possible to do c:out an int? Second, if it is...can anyone see anything wrong with my code?
    This is the error log I am getting:
    <Oct 7, 2008 10:20:29 AM MDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=20
    462449,name=rconnect,context-path=/rconnect)] Root cause of ServletException.
    javax.servlet.jsp.JspException: ServletException in '/WEB-INF/pages/signup/summa
    ry.jsp': An error occurred while evaluating custom action attribute "value" with
    value "${orderForm.numOtaModulesSelected}": Unable to find a value for "numOtaM
    odulesSelected" in object of class "com.echostar.rconnect.struts.formbeans.Order
    FormBean" using operator "." (null)
    This is the code:
    <c:out value="${orderForm.numOtaModulesSelected}" />where numOtaModulesSelected is defined as a private member variable of the OrderFormBean
    I have included the taglib.
    Thanks to anyone who can help

    Your OrderFormBean class needs to implement a getNumOtaModulesSelected method for that to work. The expression language won't let you get at fields, you need to access it via JavaBeans properties.

  • How can i use JSTL inside custom tag attribute

    Hi,
    I have one button tag which displays the button with round corner. I will show the button like this:
    <ep:button key="buttons.submit" name="submitBtn" styleClass="But"
              onClick='submitPage(''<c:out value='${buttonName}' />)' />
    I am getting the problem with the above code. how can i use JSTL inside the custom tags.
    Thanks in Advance,
    LALITH

    No. The details are given below:
    I have included the follwing line in web.xml file:
    <taglib>
        <taglib-uri>/tags/button</taglib-uri>
        <taglib-location>/WEB-INF/button.tld</taglib-location>
      </taglib>button.tld file
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>2.0</jspversion>
         <shortname>button</shortname>
         <tag>
              <name>button</name>
              <tagclass>com.ksi.ep.web.taglib.ButtonTag</tagclass>
              <bodycontent>empty</bodycontent>
              <attribute>
                   <name>name</name>
                   <required>true</required>
                   <rtexprvalue>false</rtexprvalue>
              </attribute>
              <attribute>
                   <name>key</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
              <attribute>
                   <name>onClick</name>
                   <required>true</required>
                   <rtexprvalue>true</rtexprvalue>
              </attribute>
    </taglib>ButtonTag.java :
    public class ButtonTag extends TagSupport {
       private static final long serialVersionUID = 6837146537426981407L;
         * Initialise the logger for the class
        protected final transient Log log = LogFactory.getLog(ButtonTag.class);
         *  holds the Value of the button tag
        protected String onClick = null;
         *  holds message resources key
        protected String key = null;
         * The message resources for this package.
        protected static MessageResources messages =
                             MessageResources.getMessageResources
                                       ("ApplicationResources");
          *  (non-Javadoc)
          * @see javax.servlet.jsp.tagext.TagSupport#doStartTag()
         public int doStartTag() throws JspException {    
            StringBuffer label = new StringBuffer();         
            HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
            try {             
                   log.debug("in doStartTag()");
                   Locale locale = pageContext.getRequest().getLocale();
                 if (locale == null) {
                     locale = Locale.getDefault();
                 log.info("");
                 label.append("<a border=\"0\" style=\"text-decoration:none;color:#FFFFFF\" href=\"JavaScript:");
                 label.append(onClick);
                 label.append("\" >");
                   label.append("<table  onClick=\"");
                   label.append(onClick);               
                   label.append("\" ");
                   if(onmouseout!=null && !"".equalsIgnoreCase(onmouseout))
                    label.append(" onmouseout=\"");
                    label.append(onmouseout);               
                    label.append("\" ");
                   if(onmouseover!=null && !"".equalsIgnoreCase(onmouseover)){
                    label.append(" onmouseover=\"");
                    label.append(onmouseover);               
                    label.append("\" ");
                   if(title!=null && !"".equalsIgnoreCase(title)){
                    label.append(" title=\"");
                    label.append(title);               
                    label.append("\" ");
                   label.append("style=\"cursor:hand\" tabindex=\"1\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"");
                   label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));
                   label.append("background1.jpg\" > ");
                 label.append("<tr><td width=\"10\"><img  border=\"0\" src=\"");
                 label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));
                 label.append("leftcorner.jpg\" ></td> ");
                 label.append("<td valign=\"middle\"  style=\"padding-bottom:2px\"><font color=\"#FFFFFF\" style=\"");
                 label.append(styleClass);
                 label.append("\">");
                 label.append(messages.getMessage(key));
                 label.append("</font></td>");
                 label.append("<td width=\"10\" align=\"right\"><img src=\"");
                 label.append(request.getContextPath());
                   label.append(System.getProperty("file.separator"));
                   label.append("images");
                   label.append(System.getProperty("file.separator"));            
                 label.append("rightcorner.jpg\" border=\"0\"  ></td>");
                 label.append("</tr></table></a>");
                 pageContext.getOut().print(label.toString());
              } catch (Exception e) {               
                   log.error("Exception occured while rendering the button", e);
                   throw new JspException(e);
            return (SKIP_BODY);
         * Release all allocated resources.
        public void release() {       
            this.name=null;
            this.key=null;
            this.onClick=null;
    }In my JSP I have mentioned the taglib directive as
    <%@ taglib uri="/tags/button" prefix="ep"%>and
    <ep:button key="buttons.submit" name="submitBtn" styleClass="But"
         onClick='overwritePreApprovals('<c:out value='${transactionalDetails['inPrepList']}' />')' />Servlet.service() for servlet action threw exception
    org.apache.jasper.JasperException: /pages/pms/coordinator/Dashboard.jsp(325,48) Unterminated <ep:button tag
    Thanks,
    LALITH

  • How to prepare Custom tag with scope as  session  like Struts tag

    Hi
    All Struts tags having the feature of Automatic Scoping.
    Automatic Scoping: Struts tags check all contexts (namely page, request, session, application) and use the first instance found. Developers do not have to explicitly "retrieve" objects from a particular scope. They may, however, specify a context.
    same as like struts tag I want to preapre 'select custom tag'.which will retrieve its previous selected value automatically and display.And one important thing is I dont want to set the selected value of custom tag in session expicitly.I mean the custom tag it self should take care to set the session vale and retrieve the sesion value and display like Struts tag . For struts select tag we wont set any selected value in session though it will retrieve the previous value and display when scope of form = session
    regards
    jagan

    Hi
    All Struts tags having the feature of Automatic Scoping.
    Automatic Scoping: Struts tags check all contexts (namely page, request, session, application) and use the first instance found. Developers do not have to explicitly "retrieve" objects from a particular scope. They may, however, specify a context.
    same as like struts tag I want to preapre 'select custom tag'.which will retrieve its previous selected value automatically and display.And one important thing is I dont want to set the selected value of custom tag in session expicitly.I mean the custom tag it self should take care to set the session vale and retrieve the sesion value and display like Struts tag . For struts select tag we wont set any selected value in session though it will retrieve the previous value and display when scope of form = session
    regards
    jagan

  • Embedding inline HTML data in XML using the mx:XML tag with &lt; and &gt;

    What is best practice for embedding HTML within the
    <mx:XML> tag? Programmatically, I can implement this
    successfully:
    [Bindable]
    public var xmlDP:XML = <component data="&lt;" />;
    However, I get the following error if I try to store the same
    data inline in an mx:XML tag, as such:
    <mx:XML id="xmlDP">
    <component data="&lt;" />
    </mx:XML>
    Error #1095: XML parser failure: Unterminated attribute.
    If I change the MXML tag as follows, it works fine:
    <mx:XML id="xmlDP">
    <component data="&amp;lt;" />
    </mx:XML>
    Unfortunately, I also can not source the mx:XML tag to an XML
    file which uses &lt; or &gt; codes, as it yields the same
    results. This leads me to believe that the <mx:XML> tag does
    not support the special character codes for < and >, but why?
    Incidentally, this code also gives a 1095 error:
    <mx:XML id="xmlDP">
    <component data="&#0060;" />
    </mx:XML>
    This is causing an issue with my source data as it is not
    hand typed into Flex, and standard XML supports the &lt; and
    &gt; codes. I have tried a full HTML string, as shown below,
    but this also generates the error:
    <mx:XML id="xmlDP">
    <component data="&lt;b&gt;Test&lt;/b&gt;"
    />
    </mx:XML>
    Many thanks for any input you may have!

    I’m generating the XML source file with
    Microsoft’s XML Notepad 2007. It will encode invalid special
    characters automatically. My understanding is that this is the
    proper way to handle the less than symbol in a XML string, that is
    to say using the &lt; code.
    With respect to the escape and un-escape methods, I am able
    to successfully implement these in AS, but not in MXML. This makes
    sense considering they are AS methods, but I was hoping to be able
    to do something like:
    <mx:XML id="xmlDP">
    <component data="escape('<');" />
    </mx:XML>
    This gives the following compilation error:
    The value of attribute "data" must not contain the '<'
    character.
    As does using the escape character as such:
    <mx:XML id="xmlDP">
    <component data="\<" />
    </mx:XML>
    Below is an example of what the escape character may be used
    for in AS:
    var myString:String = "\"";
    trace(myString);
    // result: "
    Likewise, I can escape the < character as such:
    var myString:String = escape("<");
    trace(myString);
    // result: %3C
    <mx:XML id="xmlDP">
    <component data="%3C" />
    </mx:XML>
    trace(un-escape(xmlDP.@data));
    // result: <
    As you can see, using %3C and unescaping in AS will yield the
    correct result; however, this is not a practical method of
    representing the data in MXML as I would have to write an AS method
    to un-escape the XML string anyway, so I might as well just store
    the data in AS to begin with. I was hoping for a way to source an
    mx:XML object, without having to load it into ActionScript
    manually. Here’s an example of the functionality I would
    expect:
    <mx:XML id="xmlDP">
    <component data="&gt;" />
    </mx:XML>
    trace(xmlDP.@data);
    // result: >
    Only this does not work for the less than symbol. I’m
    assuming at this point that this is a bug in the Flex compiler.
    Thanks again for your help troubleshooting this one!

Maybe you are looking for

  • Itunes wont open, no flashing or user agreement

    ive seen a lot of posts when itunes wone open, but they say that there is flashing itunes and quicktimes or a user agreement comes on to the screen. but my itunes just doesnt open. i just installed itunes 6.0 and now my itunes wont open and there is

  • Game center games not showing up

    I'm running iOS 4.1 and no games show up in Game Center for me. A few things of note: All of my games are currently updated I have several compatible games (Fieldrunners and Flight Control for example) People can add me as a friend and I can view the

  • How to set a Object value by JDI

    How to set a Object value using JDI? For example: class User{   private String name;   private String id; set and get method; public static void main(String[] args) throws Exception {         VirtualMachineManager vmm = Bootstrap.virtualMachineManage

  • Image in datatgrid(table)

    Hi, I am using Datagrid where one of my column should contain some images .I could display images during my design time but at runtime the images are not displayed .could any one help on this. thanks in advance regards Amutha

  • Tiger installation disc for Intel Proc

    Greetings, does anyone know where I may be able to pick up an installation disc for Tiger that will work on my new intel based mac book pro? I have a family pack of Tiger licenses but it's for the Power PC chipset (all my other macs are the older chi