JSP tag extention  problem

All,
We have jsp code:
<olr:pageNavigator href="<%=href%>" ccsClass="text" />
It works with SP2, but not with SP3. SP3 does not process <%=href%>,
instead, it pass string <%=href%> itself to the Tag class.
It is a bug !!

This isn't legal JSP syntax. If the SP2 compiler let you get away with
it, it shouldn't have. (This sp3 compiler is much more strict than the
old compiler.)
The error is more obvious when you look at the code in XML syntax:
<olr:pageNavigator href="<jsp:expression>href</jsp:expression>
ccsClass="text" />
Just try to get that one through an XML validator. So the bug is not in
iAS, it's in your code !! :-)
Seriously though, the right thing to do would be to write your custom
tag library so that it looks like this:
<olr:pageNavigator ccsClass="text">
<olr:NavigatorHREF>
<%=href%>
</olr:NavigatorHREF>
</olr:pageNavigator>
David
default wrote:
All,
We have jsp code:
<olr:pageNavigator href="<%=href%>" ccsClass="text" />
It works with SP2, but not with SP3. SP3 does not process <%=href%>,
instead, it pass string <%=href%> itself to the Tag class.
It is a bug !!

Similar Messages

  • JSP Tag extensions problem

    Hi there,In WLS 6.0 i am encountering a problem in using a JSP expression as a value to a custom tag's attribute. I've specified RTEXPRAL to be TRUE in the TLD. But still the tag is not being evaluated at all. But if i repalce the JSP expression with a hard coded value then everything seems to work perfectly fine. Is it that i have to enclose the JSP expression within double or single quotes?
              

    <%@ taglib uri="lib/esjsp.jar" prefix="es" %>
    <%@ taglib uri="pz.tld" prefix="pz" %>
    <%@ taglib uri="cm.tld" prefix="cm" %>The .tld files are the Tag Library Descriptors for JSP 1.1 tags. The .jar file
    is for a "pre-JSP1.1" Weblogic proprietary tag library extension. Weblogic
    Server looks for the older taglib jar files under the lib directory that is
    relative to the directory where the weblogic.properties file is located. If you
    start your Weblogic Commerce Server from a directory other than your default
    directory, then copy the following jar files to a lib directory under that new
    directory:
    esportal.jar
    pt_admin.jar
    esjsp.jar
    um_tags.jar
    wljsp.jar
    This will be fixed in a future release.
    Ture Hoefner
    BEA Systems, Inc.
    1655 Walnut Street; suite 200
    Boulder, CO 80302
    www.beasys.com

  • JSP tag libs problem

    Hi,
    I'm using iWS 4.1 on W2K. When I try to run jsp page that is using custom
    tags it crashes with com.sun.xml.tree.TextNode exception.
    In manuals I found that is becouse taglib.tld is broken
    but my is ok, I can use it with tomcat, so it must be iWS problem I gues.
    here are my logs:
    info ( 1300): Internal Info: loading servlet /jndi/listurl.jsp
    info ( 1300): JSP: JSP1x compiler threw exception
    org.apache.jasper.JasperException:
    Unable to open taglibrary /jndi/jndi.jar:
    com.sun.xml.tree.TextNode
    at org.apache.jasper.compiler.JspParseEventListener.handleDirective ( ... )
    at org.apache.jasper.compiler.DelegatingListener.handleDirective(...)
    at org.apache.jasper.compiler.Parser$Directive.accept(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Compiler.compile(...)
    at com.netscape.server.http.servlet.NSServletEntity.load(...)
    at com.netscape.server.http.servlet.NSServletEntity.update(....)
    at com.netscape.server.http.servlet.NSServletRunner.Service(...)

    Hi,
    I found why I coudn't use taglibs.
    It is becouse I added jaxp to classpath and iWS is using old xml parser.
    I moved jaxp from global server classpath to context classpath and
    now it works.
    yacek
    Hi,
    I'm using iWS 4.1 on W2K. When I try to run jsp page that is using custom
    tags it crashes with com.sun.xml.tree.TextNode exception.
    In manuals I found that is becouse taglib.tld is broken
    but my is ok, I can use it with tomcat, so it must be iWS problem I gues.
    here are my logs:
    info ( 1300): Internal Info: loading servlet /jndi/listurl.jsp
    info ( 1300): JSP: JSP1x compiler threw exception
    org.apache.jasper.JasperException:
    Unable to open taglibrary /jndi/jndi.jar:
    com.sun.xml.tree.TextNode
    at org.apache.jasper.compiler.JspParseEventListener.handleDirective( ... )
    at org.apache.jasper.compiler.DelegatingListener.handleDirective(...)
    at org.apache.jasper.compiler.Parser$Directive.accept(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Parser.parse(...)
    at org.apache.jasper.compiler.Compiler.compile(...)
    at com.netscape.server.http.servlet.NSServletEntity.load(...)
    at com.netscape.server.http.servlet.NSServletEntity.update(....)
    at com.netscape.server.http.servlet.NSServletRunner.Service(...)

  • Problems in developing custom JSP tags

    I have problems in debugging custom JSP tags. Sometimes the doStartTag is not called on tags but the doEndTag is called. I don't know why.
    Thanks.

    Fahr--
    A word of caution -- NetUI did not ship a JSP tag SDK in 8.x, and
    we're making no compatibility guarantees for custom JSP tags written on
    the 8.x release and future releases.
    You can accomplish the same sort of functionality with a combination
    of the <netui-data:getData> tag and JSTL 1.0. This solution would
    probably provide similar functionality and be more future-proof relative
    to JSTL and the NetUI tags currently being developed in Beehive.
    Hope that helps.
    Eddie
    Fahr Vegnugen wrote:
    We are in the midst of creating our own JSP tags to work with datasources.
    In an example where you would need to compare two different datasources how would you do this?
    ie.
    <prefix:isGreater dataSource="{pageflow.column1}" dataSourceToCompare="{pageFlow.column2}" />
    How would I evaluate what column2 is since the tag will only resolve one data source
    this.evaluateDataSource();
    Any pointers you can provide would be appreciated, or if there is a library of jsp tags that evaluate objects using datasources already created, that would even be better.

  • Problem with boolean attribute of JSP tag

    Hi,
    I've being trying to use a custom JSP tag, which has a boolean attribute, declared in the TLD as follows:
    <attribute>
    <name>checked</name>
    <required>false</required>
    <rtexprvalue>true</rtexprvalue>
    <type>boolean</type>
    </attribute>
    The JSP code snippet is:
    <ui:check checked="<%= myBean.isChecked() %>"/>
    where myBean.isChecked() returns a boolean value (primitive type).
    It works fine on some web containers, but it causes a JSP compilation error on Oracle9iAS 9.0.3 Java Edition, which looks like the following:
    Method toBoolean(boolean) not found in class test. _jsp_taghandler_57.setChecked( OracleJspRuntime.toBooleanObject( toBoolean( myBean.isChecked())));
    After decompiling the container's JSP parser, I found what I think it's a bug. The java class generated by the JSP parser does not define a toBoolean method, and neither do its superclasses. The method is defined on the OracleJspRuntime class! I think the correct code would have to be something like:
    OracleJspRuntime.toBooleanObject(OracleJspRuntime.toBoolean(...))
    If I'm correct, then the "convertExpression" method of the "oracle.jsp.parse.JspUtils" class must be changed, because it outputs such wrong code for not just boolean types, but for all the primitive types.
    So, has anyone ever faced this problem before? Does it have a workaround, or a patch? Is it included on the bug fixes for the 9.0.4 release?
    Thanks!

    Instead of:
    out.println("<body onload ="+strAlert+">");
    Try this:
    out.println("<body onload =\""+strAlert+\"">");
    Add two \" around the alert call.

  • Jsp & custom tag buffer problem

    Hi all,
    I have a tag that reads one of the txt file and renders the output on the JSP.
    The problem is, when I refresh the same page in it duplicates the output and append it to the previous output every time (mostly).
    I know there is no that there is no exception occurred, bcoz i have checked the log files. I am using tomcat 5.5.9
    I tired to use out.flush() but it gave me same thing.
    Any help would be appreciated.
    Thank you.
    The code:
    JspWriter out = pageContext.getOut();
    URL header = new URL(url);
    BufferedReader in = new BufferedReader
    (new InputStreamReader(header.openStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null){
    System.out.println(inputLine);
    fileContent = fileContent + inputLine;
    in.close();
    out.print(fileContent);
    out.flush();

    code_box wrote:
    You are genius. Tell that to the forum elite! Seriously, it's just a matter of practice. I've been using Java since 1998 so I better be able to spot that!
    A very basic mistake from me and you spotted it right away...As you get more experience you'll spot them esaily yourself, but as you write more and more complex code, the mistakes you DO make will be much harder to figure out. :)
    Thanks a lot. It resolved the problem.
    Cheers mate,
    /md.Any time. Good luck!

  • Problems with custom JSP Tag, can someone offer some advice?

    Greetings,
    I have a problem here that I am stumped on. I am trying to create a custom JSP tag, I created a simple "Hello World" JSP, however, I am coming up a bit short. I am running Apache Tomcat 6.0 on a Win XP environment.
    The code I have is as follows:
    TLDTest.tld:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>1.2</jspversion>
         <shortname>firstTag</shortname>
         <info>My First Tag</info>
    <!-- Here goes nothing!!! -->
    <tag>
         <name>hola</name>
         <tagclass>Hola</tagclass>
         <bodycontent>empty</bodycontent>
         <info>a simple hello tag</info>
    <!-- attributes -->
    <!-- Personalize the name -->
    <attribute>
         <name>name</name>
         <required>false</required>
         <rtexpvalue>false</rtexpvalue>
    </attribute>
    </tag>
    </taglib>
    The Hola.jsp is:
    <%@ taglib uri="/Hola" prefix="test" %>
    <html>
         <head>Just a little test on tags</head>
         <body>
              <hr />
              <test:Hola name="Woot Master" />
              <hr />
         </body>
    </html>
    And the source code for the .class file (named Hola) is:
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport
         private String name = null;
         public void setName(String value)
              name = value;
         public String getName()
              return(name);
    /* doStartTag is called and defined below here for the java tag */
         public int doStartTag()
              try
                   JspWriter out = pageContext.getOut();
                   out.println("<table border=1>");
                        if (name != null)
                             out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
                        else
                             out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
              catch (Exception ex)
                   throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
              return SKIP_BODY;
    /* doEndTag is defined here. */
         public int doEndTag()
              try
                   final JspWriter out = pageContext.getOut();
                   out.println("</table>");
              catch (final Exception ex)
                   throw new Error("Oops, it's broken, check your coding in the End tag!!!");
    What I keep getting is the following error:
    org.apache.jasper.JasperException: /Hola/Hola.jsp(6,2) No tag "Hola" defined in tag library imported with prefix "test"
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
    I've been back and forth on this, but I am lost. Obviously I am missing something, but what is it? It wouldn't be in the web.xml file would it? I am running a vanilla tomcat install. Any help that anyone can provide would be greatly appreciated.
    Sincerely,
    - Josh

    Ok
    1 - In the JSP, your tag should be "hola" not "Hola". Yes case matters.
      <test:hola name="Woot Master" />2 - Importing the taglibrary correctly.
    Either reference its tld <%@ taglib uri="/WEB-INF/Hola.tld" prefix="test" %>
    (and have the tld file sitting in /WEB-INF/Hola.tld )
    or
    Define a uri for it in the tld...
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>firstTag</shortname>
    <uri>http://mytag/hola</uri>
    ...and then use that uri to import it in your JSP
    <%@ taglib uri="http://mytag/hola" prefix="test" %>
    3 - Put your tag class in a package. Classes not in packages have a way of not being found.
    package mypackage
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport {
    ...That will move it in your folder structure to be /mypackage/Hola.java
    You would also need to update the tagclass element in the tld to reflect the change:
    <tagclass>mypackage.Hola</tagclass>4 - Mistake in your tld: You are missing an "r" in "rtexprvalue". <rtexpvalue> should be <rtexp*r*value>
    5 - In your Tag class, you should return something from the "doEndTag()" method.
    return super.doEndTag(); or maybe return EVAL_PAGE;
    Revised code:
    WEB-INF/hola.tld
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_2.dtd">
    <taglib>
         <tlibversion>1.0</tlibversion>
         <jspversion>1.2</jspversion>
         <shortname>firstTag</shortname>
         <uri>http://mytag/hola</uri>
         <info>My First Tag</info>
         <!-- Here goes nothing!!! -->
         <tag>
              <name>hola</name>
              <tagclass>mypackage.Hola</tagclass>
              <bodycontent>empty</bodycontent>
              <info>a simple hello tag</info>
              <!-- attributes -->
              <!-- Personalize the name -->
              <attribute>
                   <name>name</name>
                   <required>false</required>
                   <rtexprvalue>false</rtexprvalue>
              </attribute>
         </tag>
    </taglib>hola.jsp:
    <%@ taglib uri="http://mytag/hola" prefix="test"%>
    <html>
      <head>Just a little test on tags</head>
      <body>
        <hr />
        <test:hola name="Woot Master" />
        <hr />
      </body>
    </html>Hola.java. Compiles into WEB-INF/classes/mypackage/Hola.class
    package mypackage;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class Hola extends TagSupport {
         private String name = null;
         public void setName(String value) {
              name = value;
         public String getName() {
              return (name);
         /* doStartTag is called and defined below here for the java tag */
         public int doStartTag() {
              try {
                   JspWriter out = pageContext.getOut();
                   out.println("<table border=1>");
                   if (name != null)
                        out.println("<tr><td> Hola " + name + "!" + "</td></tr>");
                   else
                        out.println("<tr><td> Hola! Porque tu es una piquito perra? </td></tr>");
              } catch (Exception ex) {
                   throw new Error("Dio's Mio!, Esta No Va!, tu problema es en la StartTag!!!");
              return SKIP_BODY;
         /* doEndTag is defined here. */
         public int doEndTag() {
              try {
                   final JspWriter out = pageContext.getOut();
                   out.println("</table>");
                   return super.doEndTag();
              } catch (final Exception ex) {
                   throw new Error("Oops, it's broken, check your coding in the End tag!!!");
    }Cheers,
    evnafets

  • Sp9 / pre-release / problem with jsp tags

              WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
              JSP compile fails with the exception...
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library
              at: 'wl':
              The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter method
              corresponding to
              TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
              at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
              at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
              at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
              at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
              at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
              at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
              at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
              at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
              at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
              at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
              

              It could just be me - I an un-jarred a version of weblogic-tags-510.jar where WLS
              could find it.
              mike
              Kumar Allamraju <[email protected]> wrote:
              >Yes, my JSP is referring the tag libs. I 'm using counter example given
              >in
              >examples/jsp/tagext/counter directory
              >
              ><NT Performance Pack> NATIVE: created IoCompletionPort successfully.
              >I
              >oPort=0x000001d4
              >Sun Apr 01 12:44:00 PDT 2001:<I> <WebLogicServer> WebLogic Server star
              >ted
              >Sun Apr 01 12:44:40 PDT 2001:<I> <NT Performance Pack> Allocating: '2'
              > NT reader threads
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: init
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > verbose initialized to: true
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > packagePrefix initialized to: jsp_servlet
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > compileCommand initialized to: c:/java/java122/bin/javac.exe
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > srcCompiler initialized to weblogic.jspc
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > superclass initialized to null
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > workingDir initialized to: D:\releases\510\myserver\classfiles
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: param
              > pageCheckSeconds initialized to: 1
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: Using
              > Encoding : ISO-8859-1 when constructing PrintWriter instead of Servle
              >tOutputStream
              >Sun Apr 01 12:44:41 PDT 2001:<I> <ServletContext-General> *.jsp: initi
              >alization complete
              >Sun Apr 01 12:44:42 PDT 2001:<I> <ServletContext-General> looking for
              >taglib uri /counter.tld as resource /WEB-INF/counter.tld in Web Applic
              >ation root:
              >Sun Apr 01 12:44:43 PDT 2001:<I> <ServletContext-General> Generated ja
              >va file: D:\releases\510\myserver\classfiles\jsp_servlet\_pagehits.jav
              >a
              >Sun Apr 01 12:44:45 PDT 2001:<I> <ServletContext-General> file: init
              >
              >
              >what's the change number you get from weblogic.Admin VERSION?
              >
              >
              >--
              >Kumar
              >
              >Mike Reiche wrote:
              >
              >> From the zip file.
              >>
              >> It has to be a jsp that references those tag libraries.
              >> Other than that it works like a charm.
              >>
              >> Mike
              >>
              >> Kumar Allamraju <[email protected]> wrote:
              >> >Did you extracted the SP9 zip or exe?
              >> >I do not see the following errors when accessing a jsp with SP9? Could
              >> >you tell us how to
              >> >reproduce it?
              >> >
              >> >BTW, i will ask our docs folks to correct the startup scripts..
              >> >
              >> >--
              >> >Kumar
              >> >
              >> >Mike Reiche wrote:
              >> >
              >> >> I had to remove the 'async' attribute from taglib.tld
              >> >>
              >> >> And when I use WLCS I have to remove it from weblogic.tld
              >> >>
              >> >> And the startup scripts provided do not include weblogic-tags-510.jar
              >> >> in the classpath.
              >> >>
              >> >> Mike
              >> >>
              >> >> "Mike Reiche" <[email protected]> wrote:
              >> >> >
              >> >> >WLS 5.1, sp9 pre-release, solaris 2.7, WLCS 3.2
              >> >> >
              >> >> >JSP compile fails with the exception...
              >> >> >
              >> >> >weblogic.servlet.jsp.JspException: (line -1): Error in
              >> >> >tag library
              >> >> >at: 'wl':
              >> >> >The Tag class 'weblogicx.jsp.tags.CacheTag' has no setter
              >> >> >method
              >> >> > corresponding to
              >> >> >TLD declared attribute 'async', (JSP 1.1 spec, 5.4.1)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:138)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:264)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib.java:146)
              >> >> > at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              >> >> > at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:95)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:3873)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3623)
              >> >> > at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3484)
              >> >> > at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1817)
              >> >> > at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1658)
              >> >> > at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1548)
              >> >> > at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:888)
              >> >> > at weblogic.servlet.jsp.JspParser.doit(JspParser.java:69)
              >> >> > at weblogic.servlet.jsp.JspParser.parse(JspParser.java:125)
              >> >> > at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:109)
              >> >> > at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:242
              >> >
              >
              

  • Problem with jsp tag in jsf file c:import

    <!-- <c:import url="#{backing_Home.whichMenu}"/>-->
    <jsp:include page="#{backing_Home.whichMenu}"/>
    I am trying to use a JSF variable in jsp tag
    I am getting error like this
    javax.servlet.jsp.JspTagException: /#{backing_Home.whichMenu}     at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:318)     at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:186)     at _Home_2e_jsp._jspService(Home.jsp:24) I want to add a page dynamically using that variable
    Is there any other method

    This code works fine for me:
    <%@ taglib uri="/jstl-c" prefix="c" %>
    <html>
         <body>
         <%
              int array[] = new int[] {1,2};
              session.setAttribute("array", array);
              String arrayNames[] = new String[]{"One", "Two"};
              session.setAttribute("arrayNames", arrayNames);
         %>
              <form action="?">
              <select name="select">
                   <c:forEach items='${ sessionScope.array}' var="row">
                        <c:choose>  
                             <c:when test="${param.select== row}"> >
                                  <option value="<c:out value='${row}'/>" selected><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:when>   
                             <c:otherwise>
                                  <option value="<c:out value='${row}'/>"><c:out value="${sessionScope.arrayNames[row-1]}"/></option>
                             </c:otherwise>
                        </c:choose>
                   </c:forEach>
              </select>
              <input type="submit" name="submit" value="submit"></input>
              </form>
         </body>
    </html>
    good luck.
    MatrixPooh
    www.bizdisplay.com

  • JSP Tags problem

    I am using jsp tags and i have some text boxes defined like this:
    <html:text property="textbox"/>
    and from js i want to make some validations an i get the values from the text boxes like this: document.getElementById("textbox")
    I am testing my application from eclipse and from there it works just fine but when i try to run it under firefox document.getElementById("textbox") it doesn't work
    could some one tell me why
    thanks in advance,
    David

    View source, does the generated <input type="text" have an id of textbox? If not, then you need to change the custom tag attributes so it does (id="textbox" ?)
    Chris

  • Using scriplets in jsp-tag attribute

    I have a strange problem with a custom taglibrary that I'm trying to write.
    When I use the tag in a jsp like underneath the first outputs the right value (Welcome Hans), but the output of the second time shows: Welcome <%= test %>
    This is a part of the JSP:
    <% String test = "Hans"; %>
    <arto:hello name="Hans" />
    <arto:hello name="<%= test %>" />
    I realy don't know how to let the tag display the value of the string in my jsp.
    Can anyone give me some advice?
    Thanks,
    Hans
    The files are:
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class HelloTag extends TagSupport {
    private String name;
    public void setName(String name) {
    this.name = name;
    public int doStartTag() throws JspException {
    try {
    pageContext.getOut().print("Welcome " +name);
    } catch (IOException ioe) {
    throw new JspException("Error: IOException while writing to client");
    return SKIP_BODY;
    public int doEndTag() throws JspException {
    return SKIP_PAGE;
    The JSP:
    <%@ taglib uri="arto" prefix="arto" %>
    <%
    String test = "Hans";
    %>
    <arto:hello name="<%= test %>" />
    <arto:hello name="Hans" />
    The TLD:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname></shortname>
    <uri></uri>
    <info></info>
    <tag>
    <name>hello</name>
    <tagclass>HelloTag</tagclass>
    <bodycontent>empty</bodycontent>
    <info>Tag with Parameter</info>
    <attribute>
    <name>name</name>
    <required>false</required>
    <rtexprvalue>false</rtexprvalue>
    </attribute>
    </tag>
    </taglib>

    In the tld for the name attribute, use
    <rtexprvalue>true</rtexprvalue>
    This specifies that the attribute value can be a run-time expression. Otherwise, the value is taken as a literal.

  • JSP tags for managing MBeans??

    Hi,
    I'm trying to build a GUI for managing a custom MBean. The MBean implementation is a wrapper for a singleton class (specifically, a Configuration class for a web app). I've tried using WebJMX, but the problem there is that it relies heavily on MX4J, and has not kept up with JMX advances in the last two years (MX4J is a bit ahead of weblogic 8.1).
    Just as there is a set of console extension jsp tags, I suspect that a set of JSP tags exists for the developers of the Weblogic console to write their JSP pages to manage the weblogic MBeans. I coud just try to figure out the pattern of the INPUT and FORM tags in the html, but that leaves me with a possibly-inaccurate, version-dependent, non-dynamically-generated page to manage one MBean.
    Does such a set exist? Could someone point me to any information about how to use such a set of tags?
    I would like to be able to have the JSP I use for my console extension display an interface for modifying MBean configurable fields and executing MBean operations. What would the best way be to do this? I do not want to embed the Sun JMX RI in my web-app and launch a separate HtmlAdaptor listening on a different port. I would like the admin to the MBean be accessible through (and only through) the weblogic console.
    Thanks in advance for the help,
    Matt Geis

    Hi,
    I'm trying to build a GUI for managing a custom MBean. The MBean implementation is a wrapper for a singleton class (specifically, a Configuration class for a web app). I've tried using WebJMX, but the problem there is that it relies heavily on MX4J, and has not kept up with JMX advances in the last two years (MX4J is a bit ahead of weblogic 8.1).
    Just as there is a set of console extension jsp tags, I suspect that a set of JSP tags exists for the developers of the Weblogic console to write their JSP pages to manage the weblogic MBeans. I coud just try to figure out the pattern of the INPUT and FORM tags in the html, but that leaves me with a possibly-inaccurate, version-dependent, non-dynamically-generated page to manage one MBean.
    Does such a set exist? Could someone point me to any information about how to use such a set of tags?
    I would like to be able to have the JSP I use for my console extension display an interface for modifying MBean configurable fields and executing MBean operations. What would the best way be to do this? I do not want to embed the Sun JMX RI in my web-app and launch a separate HtmlAdaptor listening on a different port. I would like the admin to the MBean be accessible through (and only through) the weblogic console.
    Thanks in advance for the help,
    Matt Geis

  • Custom JSP Tags for Weblogic

    Hi,
              I have several questions regarding this topic:
              1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any known
              problems ?
              2) Does Weblogic come with any tag libraries (for loops, if, etc) and where
              can I get them ?
              3) Are there any tag libraries out there (JRun, for example) that have been
              successfully run on Weblogic ?
              Any help would be much appreciated.
              Thanks,
              Jamie
              

    As there seems to be general interest, a link would probably be a great
              help.
              Regards
              Daniel Hoppe
              -----Original Message-----
              From: Michael Girdley [mailto:[email protected]]
              Posted At: Friday, August 25, 2000 8:03 AM
              Posted To: jsp
              Conversation: Custom JSP Tags for Weblogic
              Subject: Re: Custom JSP Tags for Weblogic
              Please see the documentation:
              http://www.weblogic.com/docs51/resources.html
              Michael Girdley
              BEA Systems Inc
              "Jamie" <[email protected]> wrote in message
              news:[email protected]...
              > Update
              > =======
              >
              > Weblogic Portal has some Tag libraries. I've downloaded the trial
              version
              > of
              > the Weblogic Commerce Server. How do I get the tag libraries and use
              them
              > on WL 5.1 ?
              >
              > Answers to original post still wanted
              >
              > Thanks,
              >
              > Jamie
              >
              > Jamie <[email protected]> wrote in message
              > news:[email protected]...
              > > Hi,
              > >
              > > I have several questions regarding this topic:
              > >
              > > 1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any
              known
              > > problems ?
              > >
              > > 2) Does Weblogic come with any tag libraries (for loops, if, etc)
              and
              > where
              > > can I get them ?
              > >
              > > 3) Are there any tag libraries out there (JRun, for example) that
              have
              > been
              > > successfully run on Weblogic ?
              > >
              > >
              > > Any help would be much appreciated.
              > >
              > > Thanks,
              > >
              > > Jamie
              > >
              > >
              >
              >
              

  • JSP tag for import

    Hi,
    I have a problem while trying to import java classes using
    <jsp:directive.page import....... tag.
    though the <%@page import = ....... tag works fine...
    any help would be appreciated..

    I can just tell you that this is not working.
    Some of the XML JSP tags are simply not implemented by all servlet engines.

  • How html textfield use i jsp tag

    hi master
    sir see my php code i get input in name and fname text box and pass in php tag for insertion into database
    <html>
    <body>
    <form action="mfa.php" method="post">
    First Name<input type="text" name="fname">
    Second Name<input type="text" name="lname">
    <input type="submit" name"Insert">
    </form>
    <?php
    //Inserting records into database
    $firstname=$_POST['fname'];
    $lastname=$_POST['lname'];
    mysql_connect("localhost","root","") or die(mysql_error());
    mysql_select_db("test1");
    mysql_query("INSERT INTO persons (Firstname, Lastname) VALUES ('$firstname','$lastname')");
    echo "Data Inserted";
    ?>
    <?php
    //showing resutls in browser
    mysql_connect("localhost", "root", "") or die(mysql_error());
    mysql_select_db("test1") or die(mysql_error());
    $result = mysql_query("SELECT * FROM persons") or die(mysql_error());
    echo "<table border='1'>
    <tr>
    <th>First Name</th>
    <th>Last Name</th>
    </tr>";
    while($row = mysql_fetch_array( $result ))
    echo "<tr>";
    echo "<td>" . $row['Firstname'] . "</td>";
    echo "<td>" . $row['Lastname'] . "</td>";
    echo "</tr>";
    echo "</table>";
    ?>
    </body>
    </html>
    how i use html text box and pass to jsp tag for insertion data into database
    please give me sample code
    thank's
    aamir

    I have never had any problems mixing straight HTML (without the verbatim tag) and JSF tags. OTOH, I use facelets, not JSPs, so my experience may not be applicable.

Maybe you are looking for

  • Error message while activating a function

    Hello guys I have just written a simple function and am trying to activate it. When I click on check button it says 'no syntax error'. However, when I click on activate button, I get the following error. Any feedback on this will be greatly appreciat

  • How to access Infocube content using an ABAP program

    Hi,    I am trying to access infocube contents using a ABAP program in BW.    It is easy to access ODS content as we have NEW DATA or ACTIVE DATA    tables. Is there any way we can access Infocube content.    I tried using the FACT table but it has o

  • Is their a way to disable the Battery MacPro15inch 2008/9

    And yes i have seen the relevant responses here. They do not mention the FACT that the Battery expands and since it is directly below the track pad can AND HAS expanded , making the track pad useless . I know for i've had to replace mine. I will note

  • Which powerbook should I buy??

    I am feeling compelled to buy a brand new powerbook 12 incher .... according to the cards money is coming my way and if it does I'm thinking of spending it on getting my iMac 400mhz machine repaired because it has that horrid CRT display condition th

  • Mini to stereo receiver for music only vs. CD player or ipod

    Thinking of ditching my CD player and just ripping 'em all to itunes on my Mini and connecting it directly to my stereo receiver. I figure that with an external HD I can pip them at CD quality rather than mp3 with an ipod. Any problems with this thin