JSP 2.0 Tag variable

I'm running Tomcat 5 and I've added a simple tag to use with some JSP pages. The tag appears to be working except for the variable it's trying to set. The doTag function is executed ok, but setting a variable doesn't seem to work when you try it from the JSP:
... doTag() ... {
getJspContext().setAttribute("myvar", "somestring");in the JSP
<tags:mytag>
${myvar}
</tags:mytag>I do have the variable referenced in the taglib's tld file:
        <variable>
            <description>my variable</description>
            <name-given>myvar</name-given>
        </variable>Could anyone explain to me what I need to do to fix this?
Thanks.
duke

I am using the tag you specified but Tomcat throws an
error stating that the attribute xmlns is not
declared. I checked the DTD and there are no
attributes listed for element <web-app>. I could not
find another DTD. Any suggestions?
Thanks.
carli.
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,
Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
Carli, You should take out the DOCTYPE spec since that is used only for DTDs whereas you are using XML schema for defining the web.xml

Similar Messages

  • In the *.tld,what's the use of the tag " variable "

    For the jsp taglib technology.
    In the *.tld file,accroding to the "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"
    there is an optional tag "<variable>".
    In some document , i saw an example as below:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
    <tlib-version>1.0</tlib-version>
    <jsp-version>1.2</jsp-version>
    <short-name>map</short-name>
    <tag>
    <variable>
    <name-from-attribute>id</name-from-attribute>
    <variable-class>java.util.Map</variable-class>
    <scope>AT_BEGIN</scope>
    </variable>
    </tag>
    </taglib>
    What use of this?
    Can anybody give me an simple example to explain this?
    Thank u!

    Thank u very much?
    But i want to know, if I had set the <attribute> tag
    as the example i had given.Do you mean attribute, or variable in the example you gave?
    Here, I will give you a full example. This tag will set a new variable (given by an attribute name) a value provided by another attribute, and puts that variable into one of the four scopes (page, request, session, application)
    You would use this tag like this:
    <custom:setValue var="theVar" value="What I want" scope="page"/>
    Where var = the name of the variable that will be exported
    value = The value to assign to the variable
    scope = the scope to put the variable into.
    package tags;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.http.jsp.*;
    import javax.servlet.http.jsp.tagext.*;
    public class SetValueTag extends SimpleTagSupport
      private String varName, scope, value;
      public void setVar(String var) { varName = var; }
      public void setScope (String s) { scope = s; }
      public void setValue(String val) { value = val; }
      public void doTag() throws JspException, IOException
        PageContext context = (PageContext)getJspContext();
        if ("application".equals(scope)) context.setAttribute(varName, value, PageContext.APPLICATION_SCOPE);
        else if ("session".equals(scope)) context.setAttribute(varName, value, PageContext.SESSION_SCOPE);
        else if ("request".equals(scope)) context.setAttribute(varName, value, PageContext.REQUEST_SCOPE);
        else context.setAttribute(varName, value, PageContext.PAGE_SCOPE);
    }The tag in your tld would look like this:
      <tag>
        <description>Set the value of a scoped variable</description>
        <name>setValue</name>
        <tag-class>tags.SetValueTag</tag-class>
        <body-content>empty</body-content>
        <attribute>
          <description>The name of the exported variable</description>
          <name>var</name>
          <required>true</required>
          <rtexprvalue>false</rtexprvalue>
          <type>java.lang.String</type>
        </attribute>
        <attribute>
          <description>The value to give the exported variable</description>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <type>java.lang.String</type>
        </attribute>
        <attribute>
          <description>The the scope of the exported variable</description>
          <name>scope</name>
          <required>false</required>
          <rtexprvalue>false</rtexprvalue>
          <type>java.lang.String</type>
        </attribute>
        <variable>
          <name-from-attribute>var</name-from-attribute>
          <variable-class>java.lang.String</variable-class>
          <scope>AT_BEGIN</scope>
          <declare>true</declare>
        </variable>
      </tag>>
    Then what should i do in the TagHandler programme(A
    javabean handle the tag)?
    And what should i do in the JSP page ?
    Can u give me an simple example?

  • Error while running JSP with custom tag

    I am trying to run a jsp with a tag and I am getting the following error when I run the jsp:
    "Unable to open taglibrary /WEB-INF/jsp/mytaglib.tld : Parse Error in the tag library descriptor: External parameter entity "%(DOCTYPE);" has characters after markup."
    I have no idea what this is, can anyone help me here?
    tx
    -AB

    Its difficult to tell without looking at your TLD file i.e. mytaglib.tld
    However, a guess is that you may be refering to an invalid or otherwise corrupted DTD from your TLD.
    Check that out.
    The official DTD for TLDs in JSP 1.1 is http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd
    and the official DTD for TLDs in JSP 1.2 is http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd

  • Jsp 1.2 tags in weblogic 5.1?

    Is there any patch to get JSP 1.2 tags to work in weblogic 5.1? I'm
              itching to play with the new standardized tag library under
              development thats been released on the Sun site. Unfortunately my
              company is using weblogic 5.1 and is not planning on moving anytime
              soon. What exactly about JSP 1.2 tags would not workn in the 5.1
              server?
              

    Mike,
              WLS 5.1 only supports JSP 1.1. There is no patch available to get JSP
              1.2 tags to work. WLS 6.1 includes some features for JSP 1.2. For
              specifics on what is supported see:
              http://e-docs.bea.com/wls/docs61/notes/new.html#1047732
              Regards,
              Velvet
              Mike Lomage wrote:
              > Is there any patch to get JSP 1.2 tags to work in weblogic 5.1? I'm
              > itching to play with the new standardized tag library under
              > development thats been released on the Sun site. Unfortunately my
              > company is using weblogic 5.1 and is not planning on moving anytime
              > soon. What exactly about JSP 1.2 tags would not workn in the 5.1
              > server?
              

  • JSP : Tiles Error �tag.getAsString� : component context is not defined

    JSP : Tiles Error �tag.getAsString� : component context is not defined
    I�m working with Struts 1.1 and Tiles, under Tomcat 5.0.16
    My application works fine using Struts 1.1 alone, however, when attempting to run the application in a �Tiles� environment, I get an error:

    javax.servlet.jsp.JspException: Error - tag.getAsString : component context is not defined. Check tag syntax

    I have �defined� this in my �tiles-defs.xml� file, and as far as I can tell, everything else is configured properly (I have looked over the included Struts document examples, and others on the web, and I seem to have everything configured identically).
    What am I missing???
    I have created a series of �mostly� empty JSP files, for simplicity sake.
    JSP FILES:
    -     header.jsp
    -     footer.jsp
    -     menu.jsp
    -     rootLayout.jsp
    -     user.jsp
    -     show_user.jsp
    -     error.jsp
    -     defaultContentPage.jsp
    All JSP files contain:
    <%@ taglib uri="/WEB-INF/lib/struts-tiles.tld" prefix="tiles" %>
    and

    <title>
    <tiles:getAsString name="title"/>
    </title>

    My �tiles-defs.xml�: =================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <!-- ================ RootLayout ======================= -->
    <definition name=".root.layout" path="/jsp/rootLayout.jsp" >
    <put name="title" value="Default title"/>
    <put name="header" value="/jsp/header.jsp"/>
    <put name="menu" value="/jsp/menu.jsp"/>
    <put name="content" value="/jsp/defaultContentPage.jsp"/>
    <put name="footer" value="/jsp/footer.jsp"/>
    </definition>
    <!-- ================ Extentions ======================= -->
    <!-- User -->
    <definition name=".view.user" extends=".root.layout">
    <put name="title" value="Welcome to the User Form."/>
    <put name="content" value="/jsp/user.jsp"/>
    </definition >
    <!-- Save -->
    <definition name=".view.save" extends=".root.layout">
    <put name="title" value="Welcome to the Show User Form."/>
    <put name="content" value="/jsp/show_user.jsp"/>
    </definition >
    <!-- Error -->
    <definition name=".view.error" extends=".root.layout">
    <put name="title" value="Error Message."/>
    <put name="content" value="/jsp/error.jsp"/>
    </definition >
    </tiles-definitions>
    My �struts-config.xml�: ==============================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <!-- ========== FormBeans =================================== -->
    <form-beans>
    <form-bean name="userForm" type="biz.seamrog.strutstest.model.state.UserForm"/>
    </form-beans>
    <!-- ========== Action Mapping Definitions=================== -->
    <action-mappings>
    <!-- Action using normal forward syntax...
    <action path="/user"
    forward="/jsp/user.jsp">
    </action>
    -->
    <!-- Action using a "Tiles" forward syntax...
    The "forward" path mappings are defined in a file named
    "../WEB-INF/tiles-defs.xml
    -->
    <action path="/user"
    forward=".view.user">
    </action>
    <!-- Action using normal forward syntax...
    <action path="/save"
    type="biz.seamrog.strutstest.model.logic.SaveAction"
    name="userForm" scope="request"
    input="/jsp/user.jsp">
    <forward name="success" path="/jsp/show_user.jsp"/>
    <forward name="failure" path="/jsp/error.jsp"/>
    </action>
    -->
    <!-- Tiles syntax -->
    <action path="/save"
    type="biz.seamrog.strutstest.model.logic.SaveAction"
    name="userForm" scope="request"
    input="/jsp/user.jsp">
    <forward name="success" path=".view.show_user"/>
    <forward name="failure" path=".view.error"/>
    </action>
    </action-mappings>
    <!-- ============== Global Forwards ======================== -->
    <global-forwards>
    <!-- NOTE: paths with "." syntax are Tiles defined paths,
    all other paths follow conventional "/path/to/file.jsp syntax
    -->
    <forward name="user" path=".view.user"/>
    <forward name="show_user" path=".view.show_user"/>
    <forward name="error" path=".view.error"/>
    <forward name="cssBase" path="/stylesheets/common.css"/>
    </global-forwards>
    <!-- ============= Plug-ins =============== -->
    <!-- Tiles Plug-in -->
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
    <set-property property="definitions-parser-validate" value="true" />
    <set-property property="moduleAware" value="true" />
    </plug-in>
    </struts-config>
    My �web.xml�: =====================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
    <servlet>
    <!--
    MyController extends org.apache.struts.action.ActionServlet
    NOTE: The servlet could also be specified specifying the
    default Struts ActonServlet...
    <servlet-name>controller</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    ...I have chosen to extend here just for practice sake.
    -->
    <!--
    <servlet-name>MyController</servlet-name>
    <servlet-class>biz.seamrog.strutstest.controller.MyController</servlet-class>
    -->
    <servlet-name>MyController</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <!--
    Point to Struts configuration file(s)
    -->
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <!-- Tiles config -->
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <!-- This is the added Application parameter: -->
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResource</param-value>
    </init-param>
    <!-- end -->
    <load-on-startup>5</load-on-startup>
    </servlet>
    <!--
    All incoming requests that end in .do, send to MyController.
    -->
    <servlet-mapping>
    <servlet-name>MyController</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--
    Send initial requests to the login page for this application
    -->
    <welcome-file-list>
    <welcome-file>/jsp/user.jsp</welcome-file>
    </welcome-file-list>
    <!--
    Make all of the necessary related Struts JSP custom tag libraries
    available and define where to find them.
    -->
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-tiles.tld</taglib-location>
    </taglib>
    </web-app>
    My �rootLayout.jsp�: ================================================
    <%@page contentType="text/html"%>
    <%@ taglib uri="/WEB-INF/lib/struts-tiles.tld" prefix="tiles" %>
    <html>
    <header>
    <title>
    <tiles:getAsString name="title" />
    </title>
    <body>
    <tiles:get name="header"/>
    <tiles:get name="menu"/> <tiles:get name="content"/>
    <tiles:get name="footer"/>
    </body>
    </html>

    I found an entry in the Mail Archive for Struts. I got it working. My working code is below. You need to in the base JSP import the header and put the 'title' out to it.
    tiles:def file:
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <definition name=".petstore.Base" path="/common/petstorecommon.jsp">
    <put name="title" value ="${title}"/>
    <put name="header" value="/common/header.jsp"/>
    <put name="message" value="/common/message.jsp"/>
    <put name="content" value="${content}"/>
    <put name="navbar" value="/common/navbar.jsp"/>
    </definition>
    <definition name="petstore.Login" extends=".petstore.Base" >
    <put name="title" value="Login Page" />
    <put name="content" value="/Logon.jsp"/>
    <put name="test1" value="test1value"/>
    </definition>
    base tile def:
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html:html>
    <head>
    <html:base/>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>pet store common (jsp)</title>
    </head>
    <body>
    <tiles:insert attribute="header">
    <%-- both of these attributes are accessible from header.jsp It works!!! --%>
    <tiles:put name="title" beanName="title" beanScope="tile" />
    <tiles:put name="test1" beanName="test1" beanScope="tile" />
    </tiles:insert>
    <%-- <tiles:get name="header" /> --%>
    <tiles:get name="message" />
    <tiles:get name="content" />
    <tiles:get name="navbar" />
    </body>
    </html:html>
    Getting access to the title value in the header.jsp file:
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
    <html>
    <head>
    <tiles:getAsString name="title" />
    <tiles:getAsString name="test1" />
    </head>
    <body>
    </body>
    </html>

  • JSPs using Custom Tag with Boolean attribute cannot compile

    Hi,
    In Oracle9iAS(9.0.3), a jsp using a tag extension, which has a Boolean attribute, caused the following compile error, although the jsp is valid in other web containers.
    ERROR:
    /opt/oracle/j2ee/home/application-deployments/simple/simple/persistence/_pages/_test.java:56: Method toBoolean(java.lang.Boolean) not found in class _test.
    __jsp_taghandler_1.setExists( OracleJspRuntime.toBooleanObject( toBoolean( b)));
    JSP:
    <%@ page language="java" %>
    <%@ page errorPage="error.jsp" %>
    <%@ taglib prefix="jnpr" uri="/WEB-INF/testtag.tld" %>
    <%
    Boolean b = Boolean.valueOf("true");
    %>
    <jnpr:TestTag exists="<%= b%>"/>
    The boolean value is <%= b %>
    Tag Handler:
    package defaultpak;
    import javax.servlet.jsp.tagext.*;
    import javax.servlet.jsp.*;
    public class TestTag extends TagSupport{
    private Boolean exists = null;
    private java.lang.Boolean getExists() {
    return exists;
    public void setExists(java.lang.Boolean newExists) {
    exists = newExists;
    public int doStartTag() throws JspException {
    return super.doStartTag();
    Is this a known problem? Is there a way to get around this?
    Thanks in advance.
    Fred

    This is a known issue with 903, fixed in coming 904.
    In 903 the workaround is to use primitive type "boolean" instead of Object type "java.lang.Boolean" in user's getter and setter code for the taglib.
    -Prasad

  • Prob in  working with jsp 2.0 tags fil

    hi all
    i am facing a prob working with jsp 2.0 tags files and hope to receive a possitive responce from your good self:-
    <p>
    how could i create a instance of a user defined class in a tags files .
    <p>eg.
    <tb:firsttag tableName="customer" className="createtable" packagename="package1">
    <BR>
    </tb:firsttag>
    what code i have to write in tag file to create a object of class createtable </br>
    thanks in advance, waiting for ur cooperation

    I'm not sure I understand your question, but...
    If you want to create a custom tag that will contain a body (data between the start and end tags) you will extend BodyTagSupport.
    HTH.

  • Jsf 1s phase of life cycle how knows ths components of the jsp with jsf tag

    i wish to know how faces servlet knows the jsp s view components while creaTI NG component tree at first request to input jsp which may have jsf tags.in the first phase faces servlet doesnot know input jsp with jsf tags what componnets it has. it is actually atthe response send or forward time which is the final phase when the tag ge executed and output is sent to client.i did understandin jsf life cycle in 1 st phase component tree is created at first request in 1 st phase .

    Hi,
    though a FacesContext holds the values used by a request, it doesn't mean it lives for as long as the request. The best explanation I found is from the JavaDocs
    release
    public abstract void release()
    +Release any resources associated with this FacesContext instance. Faces implementations may choose to pool instances in the associated FacesContextFactory to avoid repeated object creation and garbage collection. After release() is called on a FacesContext instance (until the FacesContext instance has been recycled by the implementation for re-use), calling any other methods will cause an IllegalStateException to be thrown.+
    The implementation must call setCurrentInstance(javax.faces.context.FacesContext) passing null to remove the association between this thread and this dead FacesContext instance.
    Throws:
    java.lang.IllegalStateException - if this method is called after this instance has been released
    Frank

  • JSP in custom tag attributes...

    Sirs,
              A very nice feature from a development perspective, would be the ability
              to use JSP code within custom tags. Say I have a page on which I wish
              to give all the information on a widget. Say further that I have
              implemented a tag that writes out all the info of a widget as HTML
              table. I would like to write something like this:
              <mytaglib:widgetTag widgetID="<%=request.getParameter("widget_id")%>"
              />
              As far as I know, in the current implementation of custom taglibs this
              does not seem to be possible. Instead you end up writing something like
              this:
              <mytaglib:widgetTag>
              <mytaglib:getWidget><%=request.getParameter("widget_id")%>"</mytaglib:getWidget>
              <mytaglib:displayWidget />
              </mytaglib:widgetTag>
              Which is much more like a scripting language than a heirarchical XML .
              Now, I could always just use the request object within the tag helper
              classes, but this gives up flexibility and can introduce security
              issues, and it also makes the tags much more difficult to work with...
              In short, we should push for JSP evaluation of tag attributes. Weblogic
              could leap ahead of other app servers in this area (making up for the
              custom tag performance issues, to be solve in sp6) and Sun would, once
              again, follow Weblogic's lead and rewrite the standard to include this
              functionality.
              Regards,
              Carson Gross
              

    Carson,
              Perhaps the problem is that you are treating custom tags like one would
              construct an imperative language. I have never had to put Java or use beans
              or %= or even parameters to tags into a JSP because of custom tags.
              The real problem is writing/packaging/maintaining all those tags; sure could
              use a tool that did just that ;-)
              Peace,
              Cameron Purdy
              [email protected]
              http://www.tangosol.com
              WebLogic Consulting Available
              "Carson Gross" <[email protected]> wrote in message
              news:[email protected]...
              > Sirs,
              >
              > A very nice feature from a development perspective, would be the ability
              > to use JSP code within custom tags. Say I have a page on which I wish
              > to give all the information on a widget. Say further that I have
              > implemented a tag that writes out all the info of a widget as HTML
              > table. I would like to write something like this:
              >
              > <mytaglib:widgetTag widgetID="<%=request.getParameter("widget_id")%>"
              > />
              >
              > As far as I know, in the current implementation of custom taglibs this
              > does not seem to be possible. Instead you end up writing something like
              > this:
              >
              > <mytaglib:widgetTag>
              >
              >
              <mytaglib:getWidget><%=request.getParameter("widget_id")%>"</mytaglib:getWid
              get>
              >
              > <mytaglib:displayWidget />
              > </mytaglib:widgetTag>
              >
              > Which is much more like a scripting language than a heirarchical XML .
              > Now, I could always just use the request object within the tag helper
              > classes, but this gives up flexibility and can introduce security
              > issues, and it also makes the tags much more difficult to work with...
              >
              > In short, we should push for JSP evaluation of tag attributes. Weblogic
              > could leap ahead of other app servers in this area (making up for the
              > custom tag performance issues, to be solve in sp6) and Sun would, once
              > again, follow Weblogic's lead and rewrite the standard to include this
              > functionality.
              >
              > Regards,
              > Carson Gross
              >
              

  • JSP 2.0 tags with JSF

    Hi! I'm trying to mix jsf template with JSP 2.0 tag.
    I almost did it, but still have some trouble.
    MyForm.jspf:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib prefix="tmpl" tagdir="/WEB-INF/tags" %>
    <tmpl:date bean="${MyForm}" property="date" />
    date.tag
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ attribute name="bean" type="java.lang.Object" %>
    <%@ attribute name="property" %>
    <c:set var="form" value="${bean}" scope="session"/>
    <c:set var="property" value="${property}" scope="session"/>
    <f:subview id="time">
    <h:inputText id="date" value="#{form[property]}">
    <f:convertDateTime pattern="dd/MM/yyyy" />
    </h:inputText>
    because I have to use JSP EL (${MyForm}) to pass a parameter to the tag the managed bean is not initialized, submit fails for the first time, but works after the bean being initialized.
    Again setting "property" to session scope otherwise it doesn't work, so I will have this during the session... I am lost in JSP EL/JSF EL context relation.
    Does anyone use it???
    Sincerely,
    D.

    I made a little improvement, but still have some questions...
    MyForm.jspf:
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib prefix="tmpl" tagdir="/WEB-INF/tags" %>
    <tmpl:date bean="ResidentAttentionForm" property="date" />
    date.tag:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ attribute name="bean" %>
    <%@ attribute name="property" %>
    <c:set var="bean" value="${bean}" scope="request"/>
    <jsp:scriptlet>
    javax.faces.context.FacesContext.getCurrentInstance().getApplication().getVariableResolver().resolveVariable(javax.faces.context.FacesContext.getCurrentInstance(), (String)request.getAttribute("bean"));
    </jsp:scriptlet>
    <c:set var="form" value="${sessionScope[bean]}" scope="session"/>
    <c:set var="property" value="${property}" scope="session"/>
    <f:subview id="time">
    <h:inputText id="date" value="#{form[property]}">
    <f:convertDateTime pattern="dd/MM/yyyy" />
    </h:inputText>
    The problem here:
    1. how can I access from JSF EL to the tag attribute without passing it to the request??? (I've seen the question in the forum, but not the answer...)
    2. Is there a way to initialize a bean with dynamic name (<c: set var="${name}"?
    3. When we will have jsf 1.2 done? ;-) I know they said "with J2EE5", but it also has been said "J2EE5 - summer 2005" and now everyone is talking about 2006 (?). Why can't they make jsr for jsp 2.1 and jsf 1.2 before J2EE5?.
    Sincerely,
    D.

  • Unable to add Custom JSP 1.2 Tag Library to Project

    I am trying to upgrade to a newer version of JDeveloper (10.1.3.0.4) but am having a problem with projects that use custom JSP tag libraries.
    After converting the project (.jpr) files to the new version, I double click and go to "JSP Tag Libraries." When I click on "Add" to add a new JSP Tag library, only JSP version 1.1 libraries are shown, I cannot choose any JSP 1.2 tag libraries.
    my TLD files are all JSP 1.2, so I am not quite sure why this isn't working in a newer JDeveloper after it has worked fine in the past. If I examine any JSP page that uses my taglibs, I see the following 2 kinds of error:
    the line:
    <%@ taglib uri="taglib.uri" prefix="mytag" %>
    is underlined in red and says "the tag library taglib.uri is referenced, but not installed"
    And for any lines that try to use the custom tag:
    <mytag:dosomething>
    there is a yellow/orange underline that says "no grammar available for namespace taglib.uri, contents of element dosomething cannot be validated"
    Note that I can add the taglib JAR file under Tools > Manage Libraries, but I cannot add the JSP tag library to my project. Is there some sort of compatibility issue when transferring project files from an old version of JDeveloper?
    Any help would be appreciated

    Yes any new project I create I can specify JSP 1.2 or 2.0 with the wizard and it works fine.
    But I don't want to re-create my entire project file again just to register my taglibs.
    Here's the JSP related section in web.xml:
    <!-- TagLibraries -->
    <taglib>
    <taglib-uri>taglib.uri</taglib-uri>
    <taglib-location>/WEB-INF/tlds/mytag.tld</taglib-location>
    </taglib>
    It's definately something in the project itself... but I am lost as to what it is.
    Edit: nvm I fixed it. It was the web.xml. I had to change the line:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    into
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    and it worked. Thanks.
    Message was edited by:
    user523020

  • [weblogic-9.1] JSP 2.0 tag file gets compiled but not reloaded

    I am trying to use a JSP 2.0 tag file on weblogic 9.1. Everything works as expected until I reload the page after changing the tag file. Consider the following files, simple.jsp and simple.tag:
    h5. /simple.jsp
    &lt;%@ page language="java" %&gt;
    &lt;%@ taglib prefix="sandbox" tagdir="/WEB-INF/tags" %&gt;
    &lt;html&gt;
    &lt;body&gt;
    This output comes from the jsp.
    &lt;sandbox:simple&gt;
    &lt;/sandbox:simple&gt;
    &lt;/body&gt;
    &lt;/html&gt;h5. /WEB-INF/tags/simple.tag
    &lt;%@ tag language="java" %&gt;
    <div>This output comes from a tag file
    </div>The output of a call to simple.jsp is:
    <html><head>
    </head><body>
    This output comes from the JSP.
    <div>This output comes from a tag file</div>
    </body></html>So far, so good. Now I change the content of simple.tag to
    <%@ tag language="java" %>
    <div>This output comes from *simple.tag*<div>On a new call to simple.jsp,
    1. Weblogic notices that the file has been changed,
    2. generates the TagHandler .java file
    3. compiles the .java file
    But the new class file seems not to be loaded by weblogic; the resulting HTML does not change. It is not a browser cache issue, as I can see Javelin compilation errors. E.g., changing the tag file content to
    <%@ tag language="j" %>
    <div>This output comes from simple.tag</div>leads to the following (expected) error:
    Compilation of JSP File '/sandbox/simple.jsp' failed:
    simple.tag:1:18: "j" is not a valid setting for the language attribute.
    <%@ tag language="j" %>
    ^-^
    Changes to the .jsp file are reflected in the HTML output.
    Am I missing something? Is there any flag I have to set in my weblogic configuration?

    You are right in saying that decoding has nothing to
    do with rendering per se.I will go even further than Erik did, and dispute this statement.
    Consider that you are generating an <input> tag for a text field. Among other things, you have to generate a "name" attribute. Who decides what to put there? The renderer that actually created the markup.
    The "renderer" really does
    two completely different things. But both should
    nevertheless be separate from the component
    implementation itself. You could still have the
    renderer doing the decoding part, which arguably would
    rarely change, and somehow delegate the actual
    rendering to an implementation in a tag file.Whether you implement decoding in a separate class or inside the component, what request parameter name do you look for? It is not reasonable to assume that ALL possible renderers will choose the same parameter name ... hence, decoding and encoding are inextricably linked (the code doing the decoding has to know what kind of markup the code doing the encoding actually created). In JavaServer Faces, the current APIs create that linkage by requiring that the decode and encode be done by the same class (either the component, if you are not delegating, or the renderer if you are).
    Craig

  • JSP 2.0 tag files in jDeveloper 10g

    Hi, I'd like to create a set of UI components using JSP 2.0 tag files and have them available through the jDeveloper component palette for use in the visual edittor. I'd like jDeveloper to render the tags at design time like it can with regular old tags.
    Can this be done, and if so, how? I poked around in jDeveloper and on the web site without figuring it out... If I missed something obvious or there's docs online please point me in the right direction!
    Thanks,
    L.

    OK, so the integrated run-time supports JSP 2.0 and tag files. But what I'm after is support in the design-time components. Specifically, I want to produce a set of user interface components that I can place in the component palette and have rendered in the JSP visual editor.
    As far as I can tell (see previous post), jDeveloper's editor doesn't understand JSP 2.0 features. Therefore I suspect that the design-time as a whole doesn't and so I'll have to use regular Java tags for anything that needs to be able to be rendered at design time.
    Oh well. Maybe I can write a Java tag implementation that somehow invokes a tag file and just write a simple wrapper taglib specifically for use within jDeveloper at design time.
    L.

  • Problem trying to run compile jsp containing JSTL tags

    Hi,
    I am facing a problem regarding compiling jsp containing JSTL tags.
    Can anybody help me out?

    Yes it is giving an error when i try to compile the jsp.
    And it's giving error on the include of the taglib in the jsp as
    C:\dev\ppdev\DOMA\jspcompile\WEB-INF\jstl\c-rt.tld" is an invalid archive file!
    Actually we are not using th default entry for taglib. Instead we have made an entry in the web.xml. Like this
    <taglib>
    <taglib-uri>/WEB-INF/c.tld</taglib-uri>
    <taglib-location>/WEB-INF/jstl/c.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/c-rt.tld</taglib-uri>
    <taglib-location>/WEB-INF/jstl/c-rt.tld</taglib-location>
    </taglib>
    And using this uri in the jsp page like this
    <%@ taglib uri="/WEB-INF/c.tld" prefix="c" %>
    <%@ taglib uri="/WEB-INF/c-rt.tld" prefix="c_rt" %>
    And when we try to compie the jsp its giving the error.
    C:\dev\ppdev\DOMA\jspcompile\WEB-INF\jstl\c-rt.tld" is an invalid archive file!
    I would appreciate your help and update me if any more information is required.

  • JDeveloper editing JSP with Struts tags terribly, terribly slow!?

    I use JDeveloper 10.1.2 and I do not know the reason but it started to take 15min just to change/edit JSP containing Struts tags. RAM memory is 1GB and there is more than 0.5 GB available, but processor usage shows 100% allocated to JDeveloper!? As soon as I do even slight change in a JSP file JDeveloper starts some computations and I have no idea of what it is doing.
    What is JDeveloper computing? It seems it tries to produce some drop-down lists "helping" me to do the editing, add tags and instead I am spending days to just change one small JSP page!
    How can I stop and PREVENT JDeveloper doing ANY "help" during editing of ANY file?
    There must be an option to switch off whatever JDeveloper is doing?
    Many thanks,

    I did that but it is still very slow, it looks like Jdev is doing some intensive calculations whenever I click somewhere on JSP page with tags. Maybe this is related with my other question I posted before this one? Maybe JDev automatically searches for tag libraries it cannot find and copies them to /WEB-INF directory? (other IDEs used in same environment, like Eclipse and IntelliJ, and they do not have this problem)
    Some other strange things: struts-config.xml seems not integrated with CVS from JDev (other files like tiles-config.xml, web.xml etc. are integrated, I can right click and get CVS info on particular file, except struts-config.xml). When I want to check in/out struts-config.xml I have to do it with external tool like WinCVS etc., cannot do that from JDev!

Maybe you are looking for

  • GR/IR - MR11 not clearing

    Hi Group For a purchase order Goods Receipt and Invoice Receipt both are done. Diffrence is GR tax was not calculated but while doing IR user has calculated tax wrongly. The diffrence between GR and IR we are trying to eliminate by MR11 but system is

  • Acrobat 9.5.5 on Windows 8.1: many "tmp" folders created on HD root

    I was forced to update my Windows OS due to the expiration of XP support. After installing Windows 8.1, I reinstalled my copy of Acrobat 9 Pro and went through all of the automated update, bringing it to 9.5.5. When using Acrobat now, it seems to cre

  • Camera Raw 6.7 and 7.4 side-by-side?

    Hello, I have a Create Suite 5 Web Premium installed, which includes Photoshop CS5 and Camera Raw 6.7. I just purchased InDesign creative cloud single product subscription, and downloaded InDesign CS6. The Adobe Application Manager is now offering to

  • Express XY plot - Overplot timeline

    I tried to plot a graph using the XY Express. The X axis is a timeline. The problem starts to occur after 5 minutes. The X axis (timeline) doesn't move itself, but for instance, there is no problem if the timeline axis moves. The past is not too impo

  • Reg: CRM Table Relationship diagram

    Hi All, Please send me the following docs, (1.) CRM - Table Relationship Diagram (2.) BDT Cookbook (3.) BDOC Extension guide Also send me any other docs related to CRM, which u guys feel useful !! My Email ID : <removed by SDN Forum Moderator> Thanks