Scripting variables and custom tags

Hello,
I wonder how I could use a scripting variable in a custom tag? I have written a tag that formats number and dates, and would like to be able to do somethin like
<% double x = 12,345; %>
<x:write name="x" format="xyz" />
Also I wonder how best to implement tags with parameters? I don't suppose it's possible to nest tags or scriplets in a way like <x:bla name="test" value="<%= 12345 %>" />? It seems tedious having to create an Object just to pass a Parameter.
Many thanks in advance for any help!
Bjoern

I think I found the solution,
pageContext.setAttribute(...,...)

Similar Messages

  • RH10 variable and build tag source file names

    I'm using RH10 and outputting to WebHelp. My company requires that I archive project source files to our CVS via Eclipse. I am not using RoboSource_Control and must use the company's development resources for archiving.
    Since archiving the initial project, I have been uploading only source files with modified dates.
    However, I have discovered that the files I thought were storing user variables and build tags are not the correct files to archive. Since I am uploading all files with a newer date and that's not working, I need to know the user variable source file name and the build tag source file name that stores the currently defined variables and build tags.
    I have already tried the WebHelp forum and was directed to this forum to pose the question because I'm looking for source file information instead of output file information.
    Thanks for your help!
    karen

    Yes, Eclipse does work that way. However, we do not use our development directory as the local Eclipse repository. I need to move changed files to the local repository (stores all source files in the project) so that Eclipse can upload changes to the server. Yes, this is planned redundancy.
    That said, it is not acceptable to spend the time copying all files in the large projects from the work folder to the local repository. I simply need to know which individual files to copy that include the currently defined variables and build tags. Note, we do not copy the SSL folder output files to our local source file repository, or other associated reference files that are not actually project source files.
    Can you find someone who knows which files I need?
    Thanks,
    karen

  • Query about tag extensions and custom tags

    Hello,
    Can u please clarify me where are these tag extensions and custom tags are actually used. (in which conditions)
    What are the advantages in using them...
    thanks in advance..
    Jaagy.

    You have to remember that .tag are, in a way, jsp pages, so you can use other custom tags, etc.
    We use them when we need template that are mostly html, with a little bit of logic in them that we want to reuse.
    For example, we made one for or header and footer. In header.tag, we set all of our http info, from doctype to body, including default css, title, etc if they are not supplied as parameter, and in our footer we put the /body and /html tags. Now, our typical pages look like
    <%@ taglib tagdir="/WEB-INF/tags" prefix="custom" %>
    <custom:header title="Page title" />
    ... page content
    <custom:footer />Now, if we want to change some attribute for the whole page, or to put a signature in each page, we just have to change the corresponding .tag file and the whole site is update.
    Also, .tag file can be used to display selectively page fragment.
    Take a look at Sun's tutorial for more info:
    http://java.sun.com/webservices/docs/1.3/tutorial/doc/JSPTags5.html#wp89664
    Hope this helps!
    Patrick

  • How can I use evaluate to get the instance variable in customized tag

    1.
    At first , I create a class called bean,and declared several params in it and do not define any getter function for the param.
    class bean{
    String param = "test";
    SomeClass scObj = new SomeClass();
    2.
    The second ,I use
    request.setAttribute("beanObj",new bean());
    3.
    And then I wanna use the customized tag to show a text box , then initialize it's value.
    <salt:text name="param" value="beanObj.param">
    <salt:text name="obj" value="beanObj.scObj.func()">
    4.
    I tried the evaluator provided by JexlContext ,Struts, JSTL and it seems that if I do not define the getter for the variable ,I can not get the bean's instance variable's value.
    Expression e = ExpressionFactory.createExpression( value );
    JexlContext jc = JexlHelper.createContext();
    jc.getVars().put(strInitBeanName, request.getAttribute("beanObj"));
    Object obj = e.evaluate(jc);
    the result of the obj is null....
    Can anybody recommand some other evaluator can get the value of a instance variable from an object?

    do you have any other suggestion ? Nops, somebody else may have though. AFAIK, all lookups of the type
    beanName.propertyNameuse reflection on the getXXX() methods to access the property.
    Having said that, I guess you could write one though in a custom tag, using the same - reflection (you will ahve to rely on the java.lang.reflect.Field class quite heavily) - but that would be reinventing the wheel for most other functionality that you would have to include (like looking up the bean in scope etc)
    cheers,
    ram.

  • Question: TLD and custom Tag Usage.

    Hi, I am new to the custom tags and I am confused with one of the examples.
              The TLD has
              <tag>
              <name>item</name>
              <tagclass>com.taglib.wdjsp.mut.OutlineItemTag</tagclass>
              <bodycontent>JSP</bodycontent>
              <info>
              Delineates an item, possibly including subitems,
              within a nested outline.
              </info>
              <attribute>
              <name>text</name>
              <required>true</required>
              <rtexprvalue>true</rtexprvalue>
              </attribute>
              </tag>
              This TLD specifies that the tag has body content that is JSP and not empty.
              The author uses the tag in the JSP page in the following way..
              <mut:item text="What is JSP"/>
              <mut:item text="Evolution of dynamic content technologies">
              <mut:item text="Common Gateway Interface"/>
              </mut:item>
              I wonder why the usage "<mut:item text="What is JSP"/>" - where the
              bodycontent is empty - does not violate the TLD.
              Is the bodycontent optional even if it is specified in TLD. What if it is
              tagdependent?
              thanks - Sri
              

    then in your code
    public void setEnabled(String enabled) {
    this.enabled = true;
    in your endtag reset the boolean to false;
    IMO, a cleaner approach would be
    private boolean enabled = false;
    public void setEnabled(boolean enabled) {
         this.enabled = enabled;
    }The advanatge is that
    <foo other_attributes enabled= "false"/> and
    <foo other_attributes/> will both evaluate to false;
    <foo other_attributes enabled= "true"/> will evaluate to true
    <foo other_attributes enabled= "will_this_work"/> will give an exception
    as the container cannot resolve it to a boolean value so that users will
    be forced to use true or false (or skip the attribute) which is how it
    should be.
    Also note the container cannot convert runtime expressions to boolean
    values. So if there's a String variable,say prompt in scope that has the
    value true, then<%
    String prompt = "true";
    pageContext.setAttribute("prompt", prompt);
    %>
    <foo other_attributes enabled= "<%=prompt>"/>
    will throw an error. (to do this you would have to specify rtexpr value of
    this attribute to true)
    For the above to work, your tag should be coded as shown below
    private boolean enabled = false;
    //note rtexpr value will always be Strings
    //container does not provide auto conversions
    public void setEnabled(String enabled) {
         this.enabled = new Boolean(enabled).booleanValue();
    }cheers,
    ram.

  • Access to variable in custom tag

    I have a custom tag called sendmail and I use it like this:
    <cc:sendmail smtpServer="..." to="..." ....>
    </cc:sendmail>
    While the SendMailTag are processing the tag, it sets a boolean variable based on if the mail was sent or not. My tag extends BodyTagSupport, and everything works like it is supposed to. What I want to do now, is to allow the developer using the tag to have access to the boolean in the tag representing the status of the mail, inside the body of the tag, so he can do "this" if the mail was sent and "that" if it failed. Something like this:
    <cc:sendmail smtpServer="..." to=".." ..>
    if(status) {
    // tell the user that the message was sent
    else {
    // present an error message
    </cc:sendmail>
    Yeah, I can use the bodyContent object to output the variable value, but I want to give the jsp developer the possibility to do whatever he like, based on that boolean value.
    Anyone know how I can do this?

    Well, your sendmail tag could add the boolean value to the session scope. For example inside your sendmail tag code after you send the mail message, do this..boolean ok = sendMailRoutine();
    pageContext.setAttribute("isSent",ok,PageContext.SESSION_SCOPE);then in your jsp page after you call the send mail tag, you can get the boolean value by typing...boolean ok = (boolean)session.getAttribute("isSent");Alternativley, you can create another function in your sendmail tag library to get the isSent boolean value. Say for example you had<cc:isSent messageId="">  or whateverthen the tag code would beboolean ok = pageContext.getAttribute("isSent",PageContext.SESSION_SCOPE);This tag could then send a message back to the browser if the boolean value is false.pageContext.getOut().println("Failed to send message.");Now if your not confused... you don;t have to hard code the value "isSent". You can pass that in through your tag just like you did with the smtpServer and to IDs.
    Hope this helps.
    -S-

  • Accessing JSP Variables in Custom Tag Handler.

    Hi,
    I am creating a custom tag which builds a list view. I have certain String array in my JSP and I need to pass the same into my Tag Handler class. I tried following ways :
    1. In doStartTag() implementation I used
       public int doStartTag() {
             String[] myArray = (String[])pageContext.getAttribute("mystringarray", PageContext.PAGE_SCOPE;
       }This is not recognizing the String array variable defined in my JSP.
    2. I used separate attribute which is passed from the JSP to the custom tag as parameter having "rtexprvalue" as true. But I cann't pass a Sting array into my tag handler class. I can pass only String.
    How can I access variables which are defined in the JSP using declaration block. i.e.
    <%!
    String[] myArray = new String[100];
    %>
    Thanks for the time.

    You should be able to pass any type you like as an attribute to the tag.
    You just have to define its type as String[] in your tld:
    <attribute>
    <name>stringArray</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>java.lang.String[]</type>
    </attribute>
    Alternatively, If you declare your array like:
    <%!
    String[] myArray = new String[100];
    %>You can do this:
    pageContext.setAttribute("mystringarray", myArray);
    which will put it into the page context for you to pick up in your custom tag.
    Hope this helps,
    evnafets

  • JSF dynamic include and custom tag

    Anybody has experience to enclude custom tags between <f:verbatim> </f:verbatim> ? The custom code embeded this tags won't work, my code as below:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <%-- jsf:pagecode language="java" location="/JavaSource/pagecode/jsp/Server_request.java" --%><%-- /jsf:pagecode --%>
    <%@taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <%@taglib uri="/WEB-INF/mytaglib.tld" prefix="first" %>
    <HTML>
    <HEAD>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META name="GENERATOR" content="IBM Software Development Platform">
    <META http-equiv="Content-Style-Type" content="text/css">
    <LINK href="../theme/Master.css" rel="stylesheet"
         type="text/css">
    <TITLE>server_request.jsp</TITLE>
    <LINK rel="stylesheet" type="text/css" href="../theme/stylesheet.css"
         title="Style">
    </HEAD>
    <f:view>
         <BODY><hx:scriptCollector id="scriptCollector1">
         <P><hx:outputLinkEx styleClass="outputLinkEx" value="header"
                   id="linkEx1">
                   <h:outputText id="text1" styleClass="outputText" value="Header"></h:outputText>
              </hx:outputLinkEx><BR></P>
    <jsp:include page="server_req.jsp"/>
              <hx:outputLinkEx styleClass="outputLinkEx" value="Footer" id="linkEx2">
                   <h:outputText id="text2" styleClass="outputText" value="Footer"></h:outputText>
              </hx:outputLinkEx>
         </hx:scriptCollector></BODY>
    </f:view>
    </HTML>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="/WEB-INF/mytaglib.tld" prefix="first"%>
    <f:subview id="server_req">
    <f:verbatim>
    <first:hello/>
    </f:verbatim>
    </f:subview>

    I don't know if there is a solution to the problem you are having with JSP 1.1. If you look in the spec, it actually warns you that dynamic includes can not be done inside a body tag. The spec actually states that the included code shout write directly to the response and not to the BodyContent.
    I was excited to find out they had fixed this in JSP 1.2, but they seem to have foiled me again. If my tag calls PageContext.include(), the spec says that include must call the flush method, which causes BodyContent to throw an exception since flush is not a valid call.

  • 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...

  • Composing mail from email web application using jsp and custom tags

    here is the send.jsp file
    <%@ page language="java" %>
    <%@ page errorPage="errorpage.jsp" %>
    <%@ taglib uri="http://java.sun.com/products/javamail/demo/webapp"
    prefix="javamail" %>
    <html>
    <head>
         <title>JavaMail send</title>
    </head>
    <body bgcolor="white">
    hi
    <javamail:sendmail
    recipients="<%= request.getParameter(\"to\") %>"
    sender="<%= request.getParameter(\"from\") %>"
    subject="<%= request.getParameter(\"subject\") %>">
    <%= request.getParameter("text") %>
    </javamail:sendmail>
    <h1>Message sent successfully</h1>
    </body>
    </html>
    Here is the java file i.e used to refer to this custom tag
    package taglib;
    import java.util.*;
    import java.net.*;
    import javax.mail.*;
    import javax.mail.Authenticator;
    import javax.mail.internet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    * Custom tag for sending messages.
    public class SendTag extends BodyTagSupport {
    private String body;
    private String cc;
    private String host;
    private String recipients;
    private String sender;
    private String subject;
    * host attribute setter method.
    public void setHost(String host) {
    this.host = host;
    System.out.println("Host is : " +host);
    * recipient attribute setter method.
    public void setRecipients(String recipients) {
    this.recipients = recipients;
    System.out.println("recipients is " +recipients );
    * sender attribute setter method.
    public void setSender(String sender) {
    this.sender = sender;
    System.out.println("Sender is : " +sender);
    * cc attribute setter method.
    public void setCc(String cc) {
    this.cc = cc;
    * subject attribute setter method.
    public void setSubject(String subject) {
    this.subject = subject;
    System.out.println("subject is : " +subject);
    * Method for processing the end of the tag.
    public int doEndTag() throws JspException {
         System.out.println(" ** In do end tag");
    Properties props = System.getProperties();
    try {
    if (host != null)
    props.put("mail.smtp.host", host);
    else if (props.getProperty("mail.smtp.host") == null)
    props.put("mail.smtp.host", InetAddress.getLocalHost().
    getHostName());
    } catch (Exception ex) {
    throw new JspException(ex.getMessage());
    Session session = Session.getDefaultInstance(props,null);
         Message msg = new MimeMessage(session);
         InternetAddress[] toAddrs = null, ccAddrs = null;
    try {
         if (recipients != null) {
         toAddrs = InternetAddress.parse(recipients, false);
         msg.setRecipients(Message.RecipientType.TO, toAddrs);
         } else
         throw new JspException("No recipient address specified");
    if (sender != null)
    msg.setFrom(new InternetAddress(sender));
    else
    throw new JspException("No sender address specified");
         if (cc != null) {
    ccAddrs = InternetAddress.parse(cc, false);
         msg.setRecipients(Message.RecipientType.CC, ccAddrs);
         if (subject != null)
         msg.setSubject(subject);
         if ((body = getBodyContent().getString()) != null)
         msg.setText(body);
    else
    msg.setText("");
    Transport.send(msg);
    } catch (Exception ex) {
    throw new JspException(ex.getMessage());
    return(EVAL_PAGE);
    all the entries in taglib.tld and web.xml are correct.
    It is one of the article given at this url:
    http://java.sun.com/developer/technicalArticles/javaserverpages/emailapps/

    First, you should not take copyrighted code and post it without a copyright.
    The code you posted is copyright Sun Microsystems.
    Second, why did you post it? Did you have a question?

  • Changing data in XML variable and appending tags in XML  document

    Hi all,
    I am new to weblogic Integrator . can any one help me concerning following problem
    1. I get input XML message to my workflow which I stores in XML variable. after
    some processing i want to change value of one tag in XML stored in XML variable.
    How I can do thaat ?
    2. I have some XML like
    <root>
    <child>
    <a> </A>
    </child>
    <child>
    </child>
    </root>
    and i want to append multiple such tag at run time . how i can do the same
    in wli
    Please let me know your suggestion
    Kiran

    For both cases I suggest you use XSLT.
    Mike
    "Kiran" <[email protected]> wrote in message
    news:3c720cd2$[email protected]..
    >
    Hi all,
    I am new to weblogic Integrator . can any one help me concerning followingproblem
    1. I get input XML message to my workflow which I stores in XML variable.after
    some processing i want to change value of one tag in XML stored in XMLvariable.
    How I can do thaat ?
    2. I have some XML like
    <root>
    <child>
    <a> </A>
    </child>
    <child>
    </child>
    </root>
    and i want to append multiple such tag at run time . how i can do thesame
    in wli
    Please let me know your suggestion
    Kiran

  • Creating variables and customer Exits on calculated KF

    Hi All,
    I am lakshmi, i am a BW consultant with Accenture.. will it be possible to create a variable on calculated KF please let me know the procedure to <b>[email protected]</b>
    and also is it possible to write code in customer exit to popup the window with two check boxes and if we select one it should display that field values in Report if it is not selected by the user it should not get display.... let me have the code if anybody have worked such type of scenerios......
    very urgent!!!!!!!!!!!!!!!!!!!!!!!
    Thanks in advance if you could help me...

    You can't filter by key figures consequently, you can do variables on KF.
    About check boxes i don't know if that can be done, i don't think so. You should find an alternative, for example 2 views from the same query or a column hideable.
    Assign points = thanks in sdn.

  • Variable declaration in the custom tag

    Hey,
    I am using JSP2.0 to write a custom tag. and I need to declare a script variable in my tag so that it can be referenced in a jsp file. At the beginning, I used name-given and my tag works as it supposed to do. But I don't like to make the variable name hard-coded in my tag so that I changed name-given to name-from-attribute as folllows:
    <jsp:directive.variable name-from-attribute="var" alias="local" variable-class="java.util.ArrayList" scope="AT_END"/>
    <jsp:scriptlet>
    out.println(local.getClass().getName());
    </jsp:scriptlet>     
    According to my understanding, variable "local" should be able to be referenced in my tag file and when the tag created in a jsp file
    <tags:myTag var="myTest" />
    the variable myTest should be able to be referenced in this jsp file too. But whenever I try this in jsp: out.println(myTest.getClass().getName());
    I always got this error" myTest cannot be resolved"
    I am totally stuck here. Someone could please give me some hints? thanks a lot!

    Do you have a getter method to match that property?
    Post some example code - what does your tld define for this property, and what get/set methods have you defined for it?

  • Custom Tag and CFC : Nate Weiss

    Hi,
    being a beginner I'm trying with some marginal degree of
    success to understand CFC's and Custome Tags.
    In the CFMX7 W.A.C.K. There is an example shopping cart. This
    start off as a basic affair then expands into more object based
    principles using a custom tag add products to the cart
    (ShoppingCart.cfc) and later on the same page uses a custome Tag to
    display the cart items, calling it once for each item to display.
    I am using the MVC structure under Fusebox 4, so this method
    of using the same template, (reloading etc) is alien to me as with
    MVC you usually have the data type intructions in different files
    (anyway, I digress)
    Now that I have the thing adding products and generally
    working with my "shop", I thought about having a "special offer"
    facility. With these "Hot Deals" being stored in another database
    table, with their productID and new price.
    However, obviously the shopping cart needs to be made aware
    of this. With I would have thought an extra variable in the array
    telling the custom tag to retrieve the special price and the
    product information using a diufferent inner join query to normal.
    I have attemtped this by adding an additional URL parameter
    thus /..../HSOP/Y ("Has Special Offer Price" being set to "Y")
    When this reloads the page the CFC invoke is set thus
    <CFIF IsDefined("URL.HSOP") AND #URL.HSOP# EQ "Y">
    <CFINVOKE
    COMPONENT="#SESSION.MyShoppingCart#"
    METHOD="Add"
    MERCHID="#URL.AddMerchID#"
    SOPH="Y">
    <cfelse>
    This successfully passes
    Add(SOPH = Y, MERCHID = xxxx)
    to the CFC. However I get this error......,
    ..................Element SOPH is undefined in ARGUMENTS.
    the CFC simpley isnt adding the new variable to the array...
    I think... it wont do a CFDump so there is no way of telling
    <CFFUNCTION
    NAME="Add"
    HINT="Adds an item to the shopping cart">
    <!--- Three Arguments: MerchID, Quantity and SOPH (flag
    to state if there is a special price) --->
    <CFARGUMENT NAME="MerchID" TYPE="numeric"
    REQUIRED="Yes">
    <CFARGUMENT NAME="Quantity" TYPE="numeric" REQUIRED="No"
    DEFAULT="1">
    <CFARGUMENT NAME="SOPH" type="string">
    <!--- Get structure that represents this item in cart,
    --->
    <!--- then set its quantity to the specified quantity
    --->
    <CFSET CartItem = GetCartItem(MerchID)>
    <CFSET CartItem.Quantity = CartItem.Quantity +
    Arguments.Quantity>
    <CFSET CartItem.SOPH = Arguments.SOPH>
    </CFFUNCTION>
    I cant see why this wouldn't create the variable
    "CartItem.SOPH" and set it to "Y" as passed to it.
    I notice the CFC performs an iteration of sorts to put the
    cart items into an array. But I'm afraid I cant fathom what this
    problem might be.
    Any ideas. I have attached the whole CFC code (post editing
    by me)
    MAny thanks and Happy new Year

    Hi,
    As for me, I am testing the related pdf-417 barcode scanner these days. Do you have any ideas about it? Or any good suggestion? I am totally a green hand on barcode field. Any suggestion will be appreciated. Thanks in advance.
    Best regards,
    Arron

  • List of variables and their classes from working script?

    I have a working script that has many variables containing finder references and file path descriptions as strings or Unicode text. It is not easy to remember what these variables refer to. Is it possible to get a listing of all of a scripts variables and their respective class?

    The only way I've seen to do this is with Script Debugger, an alternative script editor that has significant debugging tools such as breakpoints, stepping, variable inspection and more.

Maybe you are looking for

  • Best average bit rate & max bit rate for DVDs playing on laptops...

    I encode and burn many DVDs for use in regular DVD players....usually in the half hour range and have been encoding with Compressor 3 using these specs: 6.6 average bit rate 7.8 max bit rate Those same DVDs, which play flawlessly in the DVD players,

  • Content switch & Content Engine

    The documentation for COntent Engine says that it can interface with ICAP server to scan the incoming URL request. Is that possible to do the same on the CSS switches? if not what is the method you can use on CSS switches to be able to scan incoming

  • Error -50 on start

    Dear community, I tried to google solutions for this problem, but of no use. Some people seem to have faced a similar error -50, but the solution is no close to what I'm facing. When I start iTunes v10.5, I get the following error.

  • IPad 4 TV Out

    I'm currently using an iPad 4 running iOS 6.1.3 which I connect to my TV (Sony Bravia KDL-26V4000) using an Apple Lightning to HDMI Digital AV Adapter.  When I connect the iPad to the TV I get video playback and sound but I do not get the TV Out sett

  • Conversion exit refbt

    Hi all, I'm using the datasource 0co_om_wbs_7. I need the field REFBT in this datasource. However there is a conversion exit on this field (also named REFBT) and SAP doesn't document anywhere what this conversion exit does. Does anybody have any idea