Further custom tag travails...

All,
          I have posted previously that custom tags can not handle JSP in their
          attributes. This turns out to be incorrect. In fact, they can, but
          there are some serious bugs when using it which made it seem like they
          couldn't.
          The following jsp works perfectly fine:
          <% String myAttribute="Thusly my attribute is" %>
          <mytaglib:mytag myattribute="<%=myAttribute%>" />
          However, the following jsp will break:
          <mytaglib:mytag myattribute="<%="Thusly my attribute is"%>" />
          because the jsp parser thinks that the second quote is ending the
          attribute instead of starting a string. Hence, the jsp compiler sees:
          <mytaglib:mytag myattribute="<%="
          and then some garbage including a > which it assumes means that mytag is
          closing. This really, really screws things up...
          The exact error I get is:
          /tagtester.jsp(38): no corresponding open tag for tag extension close:
          Now, I also get an error if I do something like this:
          <% String myAttribute="Thusly my attribute is" %>
          <mytaglib:mytag myattribute=" <%=myAttribute%>" />
          Where I have put some one space before the jsp. The error message is
          different:
          /_tagtester.java:84: String not terminated at end of line.
          Looking at the jsp .java file indicates that this also is a parsing
          problem...
          Is weblogic aware of these issues? Will they be fixed in sp6?
          Thanks,
          Carson
          

This is a consequence of the JSP spec and how it parses attribute values.
          Similar issues occur using standard boilerplate XML.
          The easy way around these problems is to use the fact that both single and
          double quotes are allowable in XML attribute values so try using code like
          this instead:-
          <mytaglib:mytag myattribute='<%="Thusly my attribute is"%>' />
          Then you will not get any JSP compilation errors.
          Regards
          James
          James Strachan
          =============
          email: [email protected]
          web: http://www.metastuff.com
          "Cameron Purdy" <[email protected]> wrote in message
          news:[email protected]...
          > I saw this refererred to (in a different context altogether) in some W3
          > documents referring to issues with input type attributes and xml ... I
          think
          > in the context of XSL. In other words, I am not sure if it is a WL bug or
          > just something that you can not do. I know that isn't the answer that you
          > are looking for ;-( ... perhaps you can escape some of those quotes.
          >
          > --
          >
          > Cameron Purdy
          > [email protected]
          > http://www.tangosol.com
          > WebLogic Consulting Available
          >
          >
          > "Carson Gross" <[email protected]> wrote in message
          > news:[email protected]...
          > > All,
          > >
          > > I have posted previously that custom tags can not handle JSP in their
          > > attributes. This turns out to be incorrect. In fact, they can, but
          > > there are some serious bugs when using it which made it seem like they
          > > couldn't.
          > >
          > > The following jsp works perfectly fine:
          > >
          > > <% String myAttribute="Thusly my attribute is" %>
          > > <mytaglib:mytag myattribute="<%=myAttribute%>" />
          > >
          > > However, the following jsp will break:
          > >
          > > <mytaglib:mytag myattribute="<%="Thusly my attribute is"%>" />
          > >
          > > because the jsp parser thinks that the second quote is ending the
          > > attribute instead of starting a string. Hence, the jsp compiler sees:
          > >
          > > <mytaglib:mytag myattribute="<%="
          > >
          > > and then some garbage including a > which it assumes means that mytag is
          > > closing. This really, really screws things up...
          > >
          > > The exact error I get is:
          > >
          > > /tagtester.jsp(38): no corresponding open tag for tag extension close:
          > >
          > > Now, I also get an error if I do something like this:
          > >
          > > <% String myAttribute="Thusly my attribute is" %>
          > > <mytaglib:mytag myattribute=" <%=myAttribute%>" />
          > >
          > > Where I have put some one space before the jsp. The error message is
          > > different:
          > > /_tagtester.java:84: String not terminated at end of line.
          > >
          > > Looking at the jsp .java file indicates that this also is a parsing
          > > problem...
          > >
          > > Is weblogic aware of these issues? Will they be fixed in sp6?
          > >
          > > Thanks,
          > > Carson
          > >
          >
          >
          

Similar Messages

  • Design view for jsp custom tags.

    when we drag-and-drop custom tag control in the source of jsp page, when we switch to the design view of jsp we should be able to view controls as desired.
    Observation: 1) Eclipse 3.2 doesn't have design view for jsp pages.
    2) which software uses the design view. we need to extend eclipse core framework and we do not find any technical approach document to proceed further on this.
    3) RAD 6.0 we can see a JSP in design view.
    I'm searching for any technical approach document to create plugin that can intercept the custom tags and provide a design view.
    Will any one suggest the plugin for that.

    Jeff,
    I have checked with engineering and found that JSP Design View support on
    Linux is a planned feature for the next release. I don't think we will have
    this feature as part of a Service Pack for 8.1
    Regards,
    Raj Alagumalai
    WebLogic Workshop Support
    "Jeff Cassanvoa" <[email protected]> wrote in message
    news:3f4df04e$[email protected]..
    >
    Raj,
    Thanks for the information!! Any timeframe when it might be supportedon Linux
    Thanks,
    Jeff
    "Raj Alagumalai" <[email protected]> wrote:
    Jess,
    Unfortunately, the JSP design view is currently not supported on Linux.
    Workshop does allow to do remote development where the IDE is running
    on a
    Windows machine and connects to a server running on Linux/Solaris.
    Regards,
    Raj Alagumalai
    WebLogic Workshop Support
    "Jeff Cassanova" <[email protected]> wrote in message
    news:[email protected]..
    Does anybody else who is running the Linux version of Workshop 8.1have
    troubling
    getting the Design View of JSP files to come up. All I see is thesource,
    with
    no tabs at the bottom to switch to/from the Design View. When I bootover
    to
    Windows and run 8.1 Workshop, I see both tabs and I am able to useboth
    views.
    Is it something I have set in Preferences somewhere that disablesthe
    Design
    View ???
    Thanks,
    Jeff

  • Custom tag - setProperties() not called

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

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

  • Custom tag attribute values..

              hi,
              I have created custom tags from my EJB using ejb2jsp tool. I tried the following,
              1 works and the other doesn't,
              a) This works.
              <mytag:foo param1="<%="test"%>" />
              b) this gives me a "ClassCastException" <% String value = "test"; %> <mytag:foo param1="<%=value%>"
              />
              ----++++++ java.lang.ClassCastException: java.lang.Object at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:165)
              at com.niteo.projects.intelXML.xbrl.ejb.jsp_tags._XBRLContentProvider_se tIdTagTEI.isValid(_XBRLContentProvider_setIdTagTEI.java:37)
              at weblogic.servlet.jsp.StandardTagLib.verifyAttributes(StandardTagLib.j ava:443)
              ----++++++
              I have tried all possible tricks, but this doesn't work. Is there something that
              I missed while creating the custom tag Or is it the way I am using the tag..?
              any help pls...
              thx in advance -jay
              

    It seems like you want to be able to clear the default attribute and set an empty attribute in you custom tag. One way around this would be to pass a blank character in. That would force the default to be cleared with the blank. You could take it a step further and trim the attribute value before storing it. Alternatively you could set an overriding attribute such as:
    <slasher:foo name="slasher" ignorewhatever="true" />
    protected String whatever = "some default Value";
    public void setWhatever(String whatever)
         this.whatever = whatever;
    public void setIgnorewhatever(String ignore)
         if(ignore.equals("true"))
              this.whatever = "";
    }Cliff

  • Help with the custom tag

    Hi
    i want to make a custom tag encapsulating certain functionalities of existing tags in one tag namely tomahawk dataPanel and html facets.
    Where can I get the source for html jsf tags so that I can look into it and modify.
    Thanks

    Originally posted by: mbuc.edp-progetti.it
    Would you like to know a fine workaround?
    If you have in your jsps a reference to the tld like this:
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    make a C:\WEB-INF\ directory on your PC and copy in there your tlds
    (C:\WEB-INF\struts-html.tld). The same for linux: /WEB-INF/struts-html.tld.
    So you do not have to change anything in web.xml nor in the jsp pages!
    Bye,
    Marco.
    "marco" <[email protected]> ha scritto nel messaggio
    news:cfhrgj$bcj$[email protected]..
    > Davis,
    > thanks for the reply. I followed your suggestion and now I am able to see
    > the code assist working.
    > I am currently using the lomboz editor, but one thing that is missing in
    > lomboz and is present in the structured editor (and in Intellij Idea) is
    the
    > ability to see where a tag is opened and closed, also for html tags.
    Perhaps
    > to someone this should seem not so important, but for me it is very
    usefull!
    >
    > As a first impression, I can only make a lot compliments to both
    > contributions (ObjectWeb and IBM).
    >
    > Bye,
    > Marco.
    >
    >
    > "David Williams" <[email protected]> ha scritto nel messaggio
    > news:[email protected]..
    > >
    > > No, you're not missing anything. Its just with that version of code the
    > > "tld resolver" (that knows where to look for TLD's) is not correct. I
    > > haven't tried it with struts, but with a minor test I tried,
    > > I just made a copy of the TLD to put in the same folder as the JSP file.
    > > Then the editor (and content asssit), can find it and all should be ok.
    Of
    > > course, I'm not suggesting this for a long term solution, but just to
    see
    > > if it allows you to get a little further in evaluating overall.
    >
    >

  • Problem using jsp:include from inside a custom tag

    Hi, All !
              I have a problem using <jsp:include> from inside a custom tag. Exception is:
              "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              could not do this. Is it a bug, since in the 1.1 spec is said: "The
              BodyContent is a subclass of JspWriter that can be used to process body
              evaluations so they can retrieved later on."
              My code is:
              <wfmklist:items>
              <jsp:include page="item.jsp" flush="true"/>
              </wfmklist:items>
              

    This is an area of contention with WL. It is not so tolerant with regards to
              the spec. I spent several days recently trying to convince it to accept the
              specification in regards to bodies and includes and it appears to have
              successfully rebuffed my efforts.
              Frankly, this is very disappointing. It appears that some shortcuts were
              taken on the way to JSP 1.1 support, and the result is a very hard-coded,
              inflexible implementation. As I have not seen the implementation myself, I
              hate to assume this, however one could posit that the term "interface" was a
              foreign concept during the implementation, other than as some annoying
              intermediary reference requiring an immediate cast to a specific Weblogic
              class, which in turn is apparently required to be final or have many final
              methods, as if being optimized for a JDK 1.02 JIT.
              I am sorry that I don't have any positive suggestions other than to use a
              URL object to come back in an execute the necessary "include" directly. You
              lose all context (other than session) and that can cause its own problems.
              However, you can generally get the URL approach to work, and you will
              hopefully avoid further frustration.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              Tangosol: How Weblogic applications are customized
              "Denis" <[email protected]> wrote in message
              news:[email protected]...
              > Hi, All !
              > I have a problem using <jsp:include> from inside a custom tag. Exception
              is:
              > "java.lang.ClassCastException: weblogic.servlet.jsp.BodyContentImpl"
              >
              > Apparently, weblogic tries to cast BodyContentImpl to JspWriterImpl and
              > could not do this. Is it a bug, since in the 1.1 spec is said: "The
              > BodyContent is a subclass of JspWriter that can be used to process body
              > evaluations so they can retrieved later on."
              >
              > My code is:
              > ...
              > <wfmklist:items>
              > <jsp:include page="item.jsp" flush="true"/>
              > </wfmklist:items>
              > ...
              

  • Creating Custom tags

    When I attempt to use my custom tag (my:setcolor) in BEA workshop I get the following error:
    ERROR: No type with this name could be found at this location
    The error message appears when I mouse over my tag.
    I attached is my JSP file, TLD file and JAVA class file.
    JSP Page
    ================================
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="netui-tags-databinding.tld" prefix="netui-data"%>
    <%@ taglib uri="netui-tags-html.tld" prefix="netui"%>
    <%@ taglib uri="netui-tags-template.tld" prefix="netui-template"%>
    <%@ taglib uri="my.tld" prefix="my" %>
    <netui:html>
    <head>
    <title>
    Simple tag library
    </title>
    </head>
    <body>
    <my:setcolor colname='READY' rating='1'/>
    </body>
    </netui:html>
    Tag TLD file
    =================================
    <?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>Derricks first custom tag</short-name>
    <tag>
    <name>setcolor</name>
    <tag-class>SetColor</tag-class>
    <body-content>empty</body-content>
    <description>
         Sets the color for the measured area fields
    </description>
    <attribute>
    <name>colname</name>
    <required>true</required>
    </attribute>
    <attribute>
    <name>rating</name>
    <required>true</required>
    </attribute>
    </tag>
    </taglib>
    JAVA Class
    ================
    import java.io.*;
    import javax.servlet.ServletRequest;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class SetColor extends TagSupport
    private String colName;
    private String dataColor;
    private int rating;
    public void setColname(String colName) {
    this.colName = colName;
    public void setRating(String rating) {
    this.rating = Integer.parseInt(rating);
    public void setRating(int rating) {
    this.rating = rating;
    private boolean IsColumn() {
    return (this.colName == "READY" ||
    this.colName == "PRRAT" ||
    this.colName == "ERRAT" ||
    this.colName == "ESRAT" ||
    this.colName == "TRRAT");
    public int doStartTag() throws JspException
    if (IsColumn()) {
    if (rating == 1)
    dataColor = "#00CC00";
    else if (rating == 2)
    dataColor = "#00FF00";
    else if (rating == 3)
    dataColor = "#FFFF00";
    else if (rating == 4)
    dataColor = "FF0000";
    else
    dataColor = "#CC3366";
    else
    dataColor = "";
    System.out.println(dataColor);
    return SKIP_BODY;
    }

    Can't say I know much about property editors and even less about BEA
    but, a few things
    1 Your string comparisions in the IsColumn() method need to use .equals() rather than ==
    2 You might consider adding 'get' methods to your Tag. The Property editor would probably like them :-)
    3 To print out something from your tag you want the line:
    try {
      pageContext.getOut().println("RATING is " + rating + " colour is " + dataColor );
      pageContext.getOut().println(dataColor);
    catch (IOException e) {
      throw new JspException(e);
    }You should probably be putting your tag class in a package. Java classes without packages can potentially cause problems further down the line.

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

  • Custom Tag Implementation seems inefficient

    I've been playing around a bit (alright, so maybe not all that much)
              with custom tags, and it seems like the actual implementation of custom
              tags (tag handler object(s) per tag) is much more resource-intensive
              than would be justified. With Weblogic 5.1 SP6, has anyone had the
              opportunity to compare performance of a typical JSP page w/ and w/out
              custom tags?
              My first impression of custom tags was that you could define tags
              and behaviors that the JSP compiler would then compile into your JSP
              class; there would be no performance hit during page execution. The Java
              code used to write these tags would either be included inline in the JSP
              page code, or else act essentially as static (threadsafe) classes into
              which threads executing JSP pages would call into. This approach means
              less resources consumed and less setup/teardown time in exchange for
              fatter JSPC'd code.
              Instead (and correct me if I am wrong), it appears that each
              distinct custom tag has a pool of instantiated handler objects lying
              around in memory, and each time a custom tag is used, there is a
              little performance hit in the setup & teardown of each handler object's
              pageContext, etc...
              Now admittedly, as another poster (I believe Mr. Purdy) pointed out,
              a "little" ain't all that much... unless there are thousands of those
              "little" hits.
              Moreover, I don't see much benefit in having instantiated objects do
              the heavy lifting. I'd rather have my auto-compiled JSP classes be a
              little more bloated than suffer any performance hit. (I do, however,
              like the fact that custom tags allows for cleaner JSP code, not to
              mention makes for a cleaner break between the creative and coding work.)
              For those of you who've had more extensive experience with custom
              tags, am I missing the target? Is the performance hit negligible for
              heavily-used or complex pages? And/or is the performance hit outweighed
              by code and development cleanliness?
              Thanks for any input.
              Jack
              

    Hi Sri
              Looks like you've found an inefficiency in WebLogic's JSP compiler - it
              should be reusing tag instances within the same page. BEA should fix this
              hopefully.
              > So even if a page has 4 tags and 100 users, we have 400 objects just
              > because we use tags.
              Sure, assuming you have 100 concurrent users (and 100 threads in the servlet
              engine). Though creating 400 objects is not a big deal in Java; most non
              trivial Java applications / services create millions of objects.
              Its also worth noting that having a seperate object instance per tag per
              calling thread means that you don't have to do any synchronisation in the
              custom tag (since you're guarenteed to be called by one thread only) so you
              get maximum thread throughput at the expense of some object allocation.
              If you really don't like the idea of creating a few java objects per request
              you could use XSLT to post process JSP files to replace tag occurencies with
              Java scriptlets - though I'm not sure the extra complexity and restrictions
              that this mechanism imposes is worth it at all. Custom tags rock! ;-)
              J.
              James Strachan
              =============
              email: [email protected]
              web: http://www.metastuff.com
              "Sri" <[email protected]> wrote in message
              news:[email protected]...
              > This post had some interesting aspects about custom tags that contradict
              > what I see in the generated java code by the JSP container. I am using
              > weblogic 5.1 sp6 and I have a jsp file that uses a custom tag "xyz:for" a
              > couple of times. the tags are not nested.
              > The java code indicates that two separate instances for the "xyz:for" tag
              > were created.
              >
              > try
              >
              > calicothunder_presentation_tags_ForTag_0 = new
              > calico.thunder.presentation.tags.ForTag();
              >
              > ..............
              >
              > } finally
              >
              > if (_calico_thunder_presentation_tags_ForTag_0 != null)
              > calicothunder_presentation_tags_ForTag_0.release();
              > }
              >
              > Further down
              >
              > try {
              > calicothunder_presentation_tags_ForTag_1 = new
              > calico.thunder.presentation.tags.ForTag();
              > ...............
              >
              > } finally
              >
              > if (_calico_thunder_presentation_tags_ForTag_1 != null)
              > calicothunder_presentation_tags_ForTag_1.release();
              > }
              >
              > The code is creating two different objects for every request. It is not
              > reusing the same object.
              > The release is just cleaning up the current instance, which may be garbage
              > collected at some later stage.
              > So even if a page has 4 tags and 100 users, we have 400 objects just
              > because we use tags.
              >
              > Just trying to understand this better..
              > thanks - Sri
              >
              >
              >
              > "James Strachan" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hi Jack
              > >
              > > I think you're right to be concerned and it is a valid concern.
              > >
              > > In the scheme of things in my experience the cost of using custom tags
              is
              > > quite minimal. Tag instances are reused on the same page so if I have
              > > several non-nested <foo:bar> tags on a page the single FooBarTag
              instance
              > > will be reused for each tag occurance.
              > >
              > > Consider other Java code, say, string concatenation. Consider the
              > following
              > > expression.
              > >
              > > String c = a + b;
              > >
              > > Fairly minimal code you might think. However this line actually involves
              > the
              > > creation of a StringBuffer instance, the call of 2 methods and the
              > creation
              > > of a second String object instance (never mind the internal char[]
              object
              > > instance that is created inside the new Strings constructor).
              > >
              > > A typical use of a custom tag involves one object construction, N
              > > setProperty() method calls (one for each attribute of the tag) and the
              > > startTag / endTag method calls.
              > >
              > > So on balance I'd say the custom tags mechanism is quite small and
              > > efficient.
              > >
              > > Though note that if you use large numbers (say hundreds) of different
              > kinds
              > > of tags then you'll have a much greater object allocation overhead.
              > >
              > > --
              > > J.
              > >
              > > James Strachan
              > > =============
              > > email: [email protected]
              > > web: http://www.metastuff.com
              > > "Jack Lin" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > I've been playing around a bit (alright, so maybe not all that much)
              > > > with custom tags, and it seems like the actual implementation of
              custom
              > > > tags (tag handler object(s) per tag) is much more resource-intensive
              > > > than would be justified. With Weblogic 5.1 SP6, has anyone had the
              > > > opportunity to compare performance of a typical JSP page w/ and w/out
              > > > custom tags?
              > > >
              > > > My first impression of custom tags was that you could define tags
              > > > and behaviors that the JSP compiler would then compile into your JSP
              > > > class; there would be no performance hit during page execution. The
              Java
              > > > code used to write these tags would either be included inline in the
              JSP
              > > > page code, or else act essentially as static (threadsafe) classes into
              > > > which threads executing JSP pages would call into. This approach means
              > > > less resources consumed and less setup/teardown time in exchange for
              > > > fatter JSPC'd code.
              > > > Instead (and correct me if I am wrong), it appears that each
              > > > distinct custom tag has a pool of instantiated handler objects lying
              > > > around in memory, and each time a custom tag is used, there is a
              > > > little performance hit in the setup & teardown of each handler
              object's
              > > > pageContext, etc...
              > > > Now admittedly, as another poster (I believe Mr. Purdy) pointed
              out,
              > > > a "little" ain't all that much... unless there are thousands of those
              > > > "little" hits.
              > > > Moreover, I don't see much benefit in having instantiated objects
              do
              > > > the heavy lifting. I'd rather have my auto-compiled JSP classes be a
              > > > little more bloated than suffer any performance hit. (I do, however,
              > > > like the fact that custom tags allows for cleaner JSP code, not to
              > > > mention makes for a cleaner break between the creative and coding
              work.)
              > > >
              > > > For those of you who've had more extensive experience with custom
              > > > tags, am I missing the target? Is the performance hit negligible for
              > > > heavily-used or complex pages? And/or is the performance hit
              outweighed
              > > > by code and development cleanliness?
              > > >
              > > > Thanks for any input.
              > > > Jack
              > > >
              > > >
              > >
              > >
              >
              >
              

  • JDev 9.0.3 - Working with Custom Tags Hangs JDev Repeatedly!

    All,
    I recently upgraded from JDev 9.0.2 to 9.0.3 because of the new support for JSP 1.2 and Servlets 2.3. As you probably know, JSP 1.2 includes additional support for custom tag development. Unfortunately, JDev 9.0.3 keeps hanging repeatedly when trying to work with a custom tag library. I have seen a couple other postings on this forum that indicate the fact that I'm not alone in this experience.
    It seems that I am able to open a taglib and make a modification, and then save the taglib without a problem. However, if I attempt to make any further changes to that taglib again without restarting JDev, it just hangs JDev and I have to kill the JDev process and restart JDev. This has made JDev extremely frustrating and unusable developing custom tags. I do not have this problem with JDev 9.0.2, but that version does not support the additionally tag library functionality of JSP 1.2, which is supported by 9.0.3.
    Is this a bug with 9.0.3? Does anyone know of a workaround I can try?
    Thanks in advance,
    Kyle Corley

    Hi,
    Logged as bug 2725712.
    Thanks,
    Brian
    JDev Team

  • Bug in Weblogic 6.0 sp2 Custom Tag implimentation ?

              I 've got this wierd weblogic error in my custom tags:
              javax.servlet.jsp.JspTagException: Since tag class emc.blackbox.taglibs.validation.ErrorTag
              implements BodyTag, it cannot return Tag.EVAL_BODY_INCLUDE
              though my class is (And it doesnt implemnt BodyTag) :
              public class ErrorTag extends BodyTagSupport {
              private JspWriter writer;
              private String preHtml;
              private String postHtml;
              public ErrorTag() { }
              public int doStartTag() throws JspException {
              try {
              writer = pageContext.getOut();
              ValidationManager vm = (ValidationManager) pageContext.findAttribute("validm");
              if (vm.getErrors().length>0){
                   writer.println(preHtml);
                   String [] errors = vm.getErrors();
                   for (int i = 0; i < errors.length; i++) {
                        writer.println(errors[i] );
                   writer.println(postHtml);
                   vm.clearErrors();
                   vm.clear();
              catch (Exception ex) {
              return EVAL_BODY_INCLUDE;
              public int doEndTag() throws JspException {
              return EVAL_PAGE;
              public String getPreHtml(){return preHtml;}
              public void setPreHtml(String preHtml){this.preHtml = preHtml;}
              public String getPostHtml(){return postHtml;}
              public void setPostHtml(String postHtml){this.postHtml = postHtml;}
              Searching on the net I found this :
              http://www.mail-archive.com/[email protected]/msg00888.html
              Does anybody know any work around this ?
              I would appreciate any hints / suggestions ..
              Thanks,
              Amit
              

    Amit,
              I was getting a similar error message! In the jsp 1.2 spec,
              EVAL_BODY_INCLUDE should be usable with BodyTagSupport (as long as
              your .tld file doesn't contain <bodycontent>empty</bodycontent> for
              ErrorTag custom tag) .
              Since it apparently isn't working like it should, HERE IS A WORK
              AROUND that I found (with some Divine inspiration). Change this line:
              public class ErrorTag extends BodyTagSupport
              to
              public class ErrorTag extends TagSupport
              Hope it works for you too!! I'll look into this matter further to see
              if I can find some reason for the error.
              Paul
              "Amit Khare" <[email protected]> wrote in message news:<[email protected]>...
              > I 've got this wierd weblogic error in my custom tags:
              >
              > javax.servlet.jsp.JspTagException: Since tag class emc.blackbox.taglibs.validation.ErrorTag
              > implements BodyTag, it cannot return Tag.EVAL_BODY_INCLUDE
              >
              > though my class is (And it doesnt implemnt BodyTag) :
              >
              > public class ErrorTag extends BodyTagSupport {
              >
              > private JspWriter writer;
              > private String preHtml;
              > private String postHtml;
              >
              > public ErrorTag() { }
              >
              > public int doStartTag() throws JspException {
              >
              > try {
              > writer = pageContext.getOut();
              > ValidationManager vm = (ValidationManager) pageContext.findAttribute("validm");
              > if (vm.getErrors().length>0){
              >      writer.println(preHtml);
              >      String [] errors = vm.getErrors();
              >      for (int i = 0; i < errors.length; i++) {
              >           writer.println(errors[i] );
              >      }
              >      writer.println(postHtml);
              > }
              >      vm.clearErrors();
              >      vm.clear();
              > }
              > catch (Exception ex) {
              >
              > }
              > return EVAL_BODY_INCLUDE;
              > }
              > public int doEndTag() throws JspException {
              > return EVAL_PAGE;
              > }
              > public String getPreHtml(){return preHtml;}
              > public void setPreHtml(String preHtml){this.preHtml = preHtml;}
              >
              > public String getPostHtml(){return postHtml;}
              > public void setPostHtml(String postHtml){this.postHtml = postHtml;}
              >
              > Searching on the net I found this :
              > http://www.mail-archive.com/[email protected]/msg00888.html
              >
              > Does anybody know any work around this ?
              > I would appreciate any hints / suggestions ..
              >
              > Thanks,
              > Amit
              

  • Why doesn't my custom tag work?

    First, my backend database is MS Access. Nothing I can do about that, unfortunately.
    I have defined three custom tags (no body, no attributes) to display report information from my project tracking/metrics Access database:
    <prefix:showProjectInfo />
    <prefix:showProjectTeam />
    <prefix:showProjectHistory />
    In my JSP, the first tag I use, <prefix:showProjectInfo />, works perfectly. However, <prefix:showProjectTeam /> gives no output.
    First, here is the tld file that defines the tags (report.tld):
    <?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>report</short-name>
        <uri>/report</uri>   
        <!-- Forte4J_TLDX:  This comment contains code generation information. Do not delete.
        <tldx>
            <tagHandlerGenerationRoot>classes</tagHandlerGenerationRoot>
        </tldx>
        -->
        <!-- A validator verifies that the tags are used correctly at JSP
             translation time. Validator entries look like this:
          <validator>
              <validator-class>com.mycompany.TagLibValidator</validator-class>
              <init-param>
                 <param-name>parameter</param-name>
                 <param-value>value</param-value>
           </init-param>
          </validator>
       -->
       <!-- A tag library can register Servlet Context event listeners in
            case it needs to react to such events. Listener entries look
            like this:
         <listener>
             <listener-class>com.mycompany.TagLibListener</listener-class>
         </listener>
       -->
       <tag>
            <name>showProjectInfo</name>
            <tag-class>mil.usaf.rad.metrics.report.showProjectInfoTag</tag-class>
            <body-content>empty</body-content>
            <description>Shows the basic project information</description>       
       </tag>
       <tag>
            <name>showProjectTeam</name>
            <tag-class>mil.usaf.rad.metrics.report.showProjectTeamTag</tag-class>
            <body-content>empty</body-content>
       </tag>
       <tag>
            <name>showProjectHistory</name>
            <tag-class>mil.usaf.rad.metrics.report.showProjectHistoryTag</tag-class>
            <body-content>empty</body-content>
       </tag>
    </taglib>Next, here is the relevant section of web.xml that defines this taglib:
      <taglib>
            <taglib-uri>/WEB-INF/report.tld</taglib-uri>
            <taglib-location>/WEB-INF/report.tld</taglib-location>
      </taglib>Next, the code for showProjectTeamTag.java:
    * showProjectTeam.java
    * Created on March 9, 2005, 10:46 AM
    package mil.usaf.rad.metrics.report;
    import java.io.*;
    import java.sql.*;
    import java.lang.Integer;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    * @author  jason.ferguson
    public class showProjectTeamTag extends TagSupport
        public showProjectTeamTag()
            super();
        public int doAfterBody() throws JspException
            HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
            int pr_id = Integer.parseInt(req.getParameter("pr_id"));
            JspWriter out = pageContext.getOut();
            Connection conn = null;
            Statement stmt = null;
            ResultSet rs = null;
            try
               out.print("test");
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
               conn = DriverManager.getConnection("jdbc:odbc:Metrics");
            catch (Exception e)
                throw new JspException(e.getMessage());
            String queryGetTeam = "SELECT Projects.pr_id, Accounts.name AS Name, Sum(Schedule.hours) AS SumOfhours FROM tblTAAccounts AS Accounts INNER JOIN ((tblTAScheduleEntries AS Schedule INNER JOIN tblProjectRelease AS ProjectRelease ON Schedule.projectID = ProjectRelease.tblFKTimeAccntProject) INNER JOIN tblPMProjects AS Projects ON ProjectRelease.Release_ID = Projects.pr_id) ON Accounts.accountID = Schedule.accountID WHERE Projects.pr_id=" + pr_id + " GROUP BY Projects.pr_id, Accounts.name, ProjectRelease.Release_number, Projects.Project_name";
            try
                out.print(queryGetTeam);
                stmt = conn.createStatement();
                rs = stmt.executeQuery(queryGetTeam);
                if (rs == null)
                    out.print("No Results!");
                out.print("<table>\n");
                out.print("<tr>\n");
                out.print("<th>Name</th>\n");
                out.print("<th>Total Hours</th>\n");
                out.print("</tr>\n");
                while(rs.next())
                    out.print("<tr>\n");
                    out.print("<td>" + rs.getString("Name") + "</td>\n");
                    out.print("<td>" + rs.getInt("SumOfhours") + "</td>\n");
                    out.print("</tr>\n");
                out.print("</table>\n");
                rs.close();
                stmt.close();
                conn.close();
            catch (Exception e)
                throw new JspException(e.getMessage());
            return SKIP_BODY;
    }Finally, projectdetail.jsp, where the tag is called:
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@page import="java.sql.*" %>
    <%@page import="java.lang.Integer" %>
    <%@taglib uri="/WEB-INF/report.tld" prefix="report" %>
    <html>
    <head><title>Project Detail</title></head>
    <body>
    <h1 align="center">Project Status</h1>
    <h3>Project Description</h3>
    <report:showProjectInfo />
    <h3>Team Members</h3>
    <report:showProjectTeam />
    </body>
    </html>The first tag, <report:showProjectInfo />, works fine. However, I get no output whatsoever when the system encounters <report:showProjectTeam />. I am a relative newbie at this, so any help is appreciated.
    Jason

    It doesnt seem to matter if the code is in doStartTag(), doEndTag(), orr any of the other functions.
    I also put, as the first item in the function:
    System.out.println("TEST");Nothing.
    Just as an aside, here is the code for the <prefix:showProjectInfo />. Maybe I made a mistake in it? I closed the resultset and connection...
    import java.io.*;
    import java.sql.*;
    import java.lang.Integer;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    * @author  jason.ferguson
    public class showProjectInfoTag extends BodyTagSupport
        public int doEndTag() throws JspException
            HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
            int pr_id = Integer.parseInt(req.getParameter("pr_id"));
            JspWriter out = pageContext.getOut();
            Connection conn = null;
            Statement stmt = null;
            ResultSet rs = null;
            try
               Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                conn = DriverManager.getConnection("jdbc:odbc:Metrics");
            catch (Exception e)
                throw new JspException(e.getMessage());
            String queryProjectInfo = "SELECT * FROM tblPMProjects WHERE pr_id=" + pr_id;
            try
                stmt = conn.createStatement();
                rs = stmt.executeQuery(queryProjectInfo);
                while (rs.next())
                    out.print("<table border=\"1\" style=\"border-collapse:collapse\">\n");
                    out.print("<tr>\n");
                    out.print("<td><b>Project Name:</b>" + rs.getString("Project_name") + "</td>\n");
                    out.print("<td align=\"right\"><b>RAD Number:</b>" + rs.getString("tblProjectNumber") + "</td>\n");
                    out.print("</tr>\n");
                    out.print("<tr>\n");
                    out.print("<td>Project description: " + rs.getString("Project_description") + "</td>\n");
                    out.print("</tr>\n");
                    out.print("<tr>\n");
                    out.print("<td>Customer: " + rs.getString("Customer_POC") + "</td>");
                    out.print("<tr>\n");
                    out.print("<tr>\n");
                    out.print("<td>Customer Unit: " + rs.getString("Customer_OFC") + "</td>\n");
                    out.print("</tr>\n");
                    out.print("<tr>\n");
                    out.print("<td>Customer Phone: " + rs.getString("Customer_phone") + "</td>\n");
                    out.print("</tr>\n");
                    out.print("</table>\n");
                    rs.close();
                    stmt.close();
                    conn.close();
            catch (Exception e)
                throw new JspException(e.getMessage());
            finally
                //conn.close();
            return SKIP_BODY;

  • Weblogic Commerce Server 3.5 runtime failure in custom tag

    An error occurred:
    javax.servlet.ServletException: runtime failure in custom tag 'process'
         at jsp_compiled._tools._property._propset_create._jspService(_propset_create.java:641)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:149)
         at com.beasys.commerce.foundation.flow.ServletDestinationHandler.handleDestination(ServletDestinationHandler.java:51)
         at com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:540)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:208)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:1127)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:1529)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)

    I just started getting this error after a year in production environment without any problems. Did you every find out what caused this or better yet how to prevent this?
              Dan.
              

  • Connection Pooling and JSP Custom Tag Library - is code (inside) the best way/correc?

    Hi, can anyone advise as to whether my tag library code (based
    on Apache Jakarta Project) will actually achieve connection
    pooling functionality across my entire JSP based application? I
    am slightly concerned that my OracleConnectionCacheImpl object
    may exist multiple times, hence rendering my conection pooling
    attempt useless.
    package com.solved.tag.dbtags.connection;
    import java.io.IOException;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    import javax.servlet.jsp.JspTagException;
    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    import oracle.jdbc.pool.OracleConnectionCacheImpl;
    * <p>JSP tag connection, used to get a
    * java.sql.Connection object.</p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>connection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.ConnectionTag&lt;/t
    agclass>
    * &lt;bodycontent>JSP&lt;/bodycontent>
    &lt;teiclass>com.solved.tag.dbtags.connection.ConnectionTEI&lt;/t
    eiclass>
    * &lt;info>Opens a connection based on a jndiName.&lt;/info>
    * &lt;attribute>
    * &lt;name>id&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    public class ConnectionTag extends TagSupport {
    static private OracleConnectionCacheImpl cache = null;
    public int doStartTag() throws JspTagException {
    try {
    Connection conn = null;
    if (cache == null) {
    try {
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup
    ("jdbc/pool/OracleCache");
    cache = (OracleConnectionCacheImpl)ds;
    catch (NamingException ne) {
    throw new JspTagException(ne.toString());
    conn = cache.getConnection();
    pageContext.setAttribute(getId(),conn);
    catch (SQLException e) {
    throw new JspTagException(e.toString());
    return EVAL_BODY_INCLUDE;
    package com.solved.tag.dbtags.connection;
    import java.sql.Connection;
    import java.sql.SQLException;
    import javax.servlet.jsp.tagext.TagSupport;
    * <p>JSP tag closeconnection, used to close the
    * specified java.sql.Connection.<p>
    * <p>JSP Tag Lib Descriptor
    * <pre>
    * &lt;name>closeConnection&lt;/name>
    &lt;tagclass>com.solved.tag.dbtags.connection.CloseConnectionTag&
    lt;/tagclass>
    * &lt;bodycontent>empty&lt;/bodycontent>
    * &lt;info>Close the specified connection. The "conn"
    attribute is the name of a
    * connection object in the page context.&lt;/info>
    * &lt;attribute>
    * &lt;name>conn&lt;/name>
    * &lt;required>true&lt;/required>
    * &lt;rtexprvalue>false&lt;/rtexprvalue>
    * &lt;/attribute>
    * </pre>
    * @author Matt Shannon
    * @see ConnectionTag
    public class CloseConnectionTag extends TagSupport {
    private String _connId = null;
    * The "conn" attribute is the name of a
    * page context object containing a
    * java.sql.Connection.
    * @param connectionId
    * attribute name of the java.sql.Connection to
    close.
    * @see ConnectionTag
    public void setConn(String connectionId) {
    _connId = connectionId;
    public int doStartTag() {
    try {
    Connection conn = (Connection)pageContext.getAttribute
    (_connId);
    conn.close();
    } catch (SQLException e) {
    // failing to close a connection is not fatal
    e.printStackTrace();
    return EVAL_BODY_INCLUDE;
    public void release() {
    _connId = null;
    package com.solved.tag.dbtags.connection;
    import javax.servlet.jsp.tagext.TagData;
    import javax.servlet.jsp.tagext.TagExtraInfo;
    import javax.servlet.jsp.tagext.VariableInfo;
    * TagExtraInfo for the connection tag. This
    * TagExtraInfo specifies that the ConnectionTag
    * assigns a java.sql.Connection object to the
    * "id" attribute at the end tag.
    * @author Matt Shannon
    * @see ConnectionTag
    public class ConnectionTEI extends TagExtraInfo {
    public final VariableInfo[] getVariableInfo(TagData data)
    return new VariableInfo[]
    new VariableInfo(
    data.getAttributeString("id"),
    "java.sql.Connection",
    true,
    VariableInfo.AT_END
    data-sources.xml:
    <?xml version="1.0"?>
    <!DOCTYPE data-sources PUBLIC "Orion data-
    sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd">
    <data-sources>
    <data-source
    class="oracle.jdbc.pool.OracleConnectionCacheImpl"
    name="jdbc/pool/OracleCache"
    location="jdbc/pool/OracleCache"
    url="jdbc:oracle:thin:@oracle1:1521:pdev"
    >
    <property name="maxLimit" value="15" />
    <property name="cacheScheme" value="2" />
    <property name="user" value="console" />
    <property name="password" value="console" />
    <description>
    This DataSource is using an Oracle-native DataSource Class so as
    to allow Oracle Specific extensions.
    A getConnection() call on this DataSource will return
    oracle.jdbc.driver.OracleConnection.
    The connection returned is a logical connection.
    The caching scheme in place is Fixed Wait. Refer below to
    possible values.
    Dynamic 1
    Fixed Wait 2
    Fixed Return Null 3
    </description>
    </data-source>
    </data-sources>
    many thanks,
    Matt.

    Hi. Show me your pool definition.
    Joe
    Ramamurthy wrote:
    I am using the jsp custom tag library from BEA called sqltags.tld which came with Weblogic 5.1. Currently I am using Weblogic6.1 sp2 on Solaris.
    I have created a Connection Pool for Sybase database using the driver com.sybase.jdbc.SybDriver.
    When I created jsp page to connect to the connection pool using sqltags custom tag library, I am getting the error
    "javax.servlet.jsp.JspException: Failed to write body content
    at weblogic.taglib.sql.ConnectionTag.doAfterBody(ConnectionTag.java:43)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:1014)"
    After this message, whenever I try to access the same jsp page I am getting the message
    "javax.servlet.jsp.JspException: Failed to load JDBC driver: weblogic.jdbc.pool.D
    river
    at weblogic.taglib.sql.ConnectionTag.doStartTag(ConnectionTag.java:34)
    at jsp_servlet.__hubwcdata._jspService(__sampletest.java:205)".
    Can you please help me the reason why this problem is happening and how to fix this ?
    This problem doexn't happen consistently. This occurs once in a while.
    I tried to increase Login delay Seconds parameter in the Connection Pool to 15 sec. It didn't help me much.
    Thanks for your help !!!
    Ram

  • Is possible to write a custom tag inside another custom tag ??

    Hi
    I�m trying to reduce the time needed to code mi app presentation layer, it uses some custom tags with certain configuration, i would like to know if its possible to do something like this inside my custom tag doAfterBody().
    public int doAfterBody() throws JspException {
              JspWriter writer=bodyContent.getEnclosingWriter();
              try {
                   writer.print("<customTag:myAnotherTag someEspecificConfigurationParams="someEspecificValues"/>");
              } catch (IOException e) {
                   pageContext.getServletContext().log("Error: "+e.getMessage());
              }return SKIP_BODY;
         }The goal is to simplify the jsp code because the configuration params for the custom tags (css styles and similar) are allways the same.
    That don�t work, it simply prints <customTag:myAnotherTag/> in screen but the tag is not evaluated, i�ve tried too something like
    public int doAfterBody() throws JspException {
              if (repeat) {
                   JspWriter writer = bodyContent.getEnclosingWriter();
                   try {
                        writer.print("<customTag:myAnotherTag/>");
                   } catch (IOException e) {
                        pageContext.getServletContext().log("Error: " + e.getMessage());
                   repeat = false;
                   return EVAL_BODY_AGAIN;
              return SKIP_BODY;
         }And it doesn�t worked worked. Maybe using the taghandler classes and calls to the doAfterBody could make it work, but when you need to nest tags it could be a little hell of coupling calls, so before doing it i would like to know if what i want is possible. After reading some books i tought it could work because the stack of out objects, but i can�t make it work.
    Another idea is to inherit from tagHandler and override some properties in the tags, but i don�t like the idea to much.
    So, can anyone help me??
    Thanks.

    You cannot do that and I have listed out the reason and a possible solution in this post http://forum.java.sun.com/thread.jspa?threadID=697243 from yesterday.
    cheers,
    ram.

Maybe you are looking for

  • Accounting total value of item conditions

    Dear Experts, I have a scenario where rebates(volume discounts) are accrued at an item level through an item condition and are hence released to accounts also at an item level. As a result of this there are too many accrual entries getting posted for

  • HELP ME! BEFOR I HIT MY MAC AGAINST THE WALL

    I am having a huge issue every time I go on the internet. Everytime I click on a new link, and new tab opens up with (dating, mac backup, mac repair, backupmypc, and video download sites) HOW DO I GET RID OF the or stop them from popping up. Is there

  • Acceptable file formats - .VOB

    I had a friend burn video copies to DVD and the file extension is .VOB There are also a couple of other files with .BUP and .IFO extensions Unfortunately, I can't import into iMovie. Are these files usable in iMovie or is there something I can do to

  • Help about JSTL: I can't use c:if .. in option.. !

    Hi, all I build my project on STRUTS before, and using the tableligs of struts,But now ,I find it is a good choice using JSTL.However ,problems accurred as follows: (my project is on Eclipse and Tomcat) In the page , I have already include that: <%@

  • .eps vs .ai in book-length project

    It's my understanding that an .eps is proxied in ID, making stuff run faster than .ai files in a long document. Right now I'm working on the 300-page CD. Easch page will have  one small 1x1 or 2x2 inch 4C  illos, and the rest will be b+w. I have the