Calling custom tags in jsp  with jsp:include

Hi,
I have a large jsp file , which uses jstl fmt tags for labels.
Since the size of jsp was too big iand i was unable to compile it because of 64 kb class size limit,
I removed the tag lib defination from the jsp file and put it in another jsp file. and used jsp:include to include this file inside the first jsp.
It is compiling successfully but labels r not showing up.
but when i use <%@include to include second jsp in the first one i get the labels properly.
I cannot use <%@include as this starts giving me compilation error related with jsp class file size beyond 64 kb.
Pls suggest why jsp:include is not working.
thanks,
Pramod

Hi Anil,
Ur suggestion was good but could not solve my problem.
I have put a small sample code to illustrate the problem.
labeldemo.jsp:
<%-- <%@ include file="WDCComInitLabelsjunk.jsp" %> --%>
<jsp:include page="WDCComInitLabelsjunk.jsp" flush="true" />
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tablebg">
                              <tr class="headtd">
                                   <td colspan="4"><span class="headtext"><fmt:message key="Cash_Management"/> </td>
                              </tr>
                              <tr> hi </tr>
                         </table>
                         </fmt:bundle>
WDCComInitLabelsjunk.jsp:
<%@ page language="java" %>
<%@ page contentType="text/html"%>
<%@ page import="com.tcs.wdc.core.*" %>
<%@ page import="com.tcs.wdc.core.login.*" %>
<%@ page import="com.tcs.wdc.core.service.navigation.*" %>
<%-- Include tag library --%>
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%-- Get language from IDCUserSession & set it in session --%>
<%
/*SessionManager sm = new SessionManager(session);
IDCUserSession ius = sm.getIDCUserSession();*/
session.setAttribute("language","nl_NL");
%>
<%-- Set the locale for the language obtained --%>
<fmt:setLocale value="${language}" />
<fmt:bundle basename="labels" />
If i uncomment the <%@ include file="WDCComInitLabelsjunk.jsp" %> tag in the code above it is working fine ,
but it is not working with <jsp:include page="WDCComInitLabelsjunk.jsp" flush="true" />
pls suggest.
Thanks,
Pramod

Similar Messages

  • How to use custom tag in jsp

    sir
    plz tell me how to use custom tag in jsp.plz describe it.
    i will be thankful to u

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

  • Calling jsp custom tag from jsp expression

    hi there,
    I have a problem calling oracle(or any other) custom tag from inside a jsp expression.(i.e.)embeding <jbo:tagname...> into <%......%>.
    For example:
    I need to get the value of a jsp parameter, but the parameter name is dynamic (retrieved from a DataBase)
    So I though it would be something link that:
    <%=request.getParameter(<jbo:ShowValue datasource="ds" dataitem="ParamName" ></jbo:ShowValue>) %>
    where <jbo:ShowValue is an Oracle custom tab that retrieves the value of a certain dataItem(certain field).
    But it does not work.........
    if any body can tell me how to overcome, or work around it, I'll be so pleased.
    Regards,
    Remoun Anwar

    Hi,
    You get the custom tag output into a hidden variable (say 'key') and use the request.getParameter("key")
    Hope u got the answer...
    Regards
    ravi

  • Urgent-how to access custom tag from jsp tag

    I have a problem accessing a custom tag from a jsp expression.
    Details: I have a custom tag that returns a string variable. I need to access that variable from jsp expression <%%>.
    Can any body help me?

    Tags don't "return" values as in the normal sense.
    They can only support TEI (Tag Extra Information) that just stuffs a declared variable into the page's state.
    For example, if the tag class had a public method called getValue(), you could do the following:
    <xmp:mytag id="foo"/>
    <%
    out.println("value is " + foo.getValue());
    %>

  • Custom Tags in JSP

    I am new to using custom tags. Is there a nice book or site which I could read on custom tags.
    Also, I kind of understand custom tags but not completely confident.
    I have a JSP that uses two custom tags, flight and segment. Basically, goes through each segment with flight tag and prints out attribute of segment with Segment tag. The code looks like this.
    <flifo:flight isParent="true" fromParent="true" >
              <td bgcolor="<%=bgcolor%>" width="94" valign="top" class="t7">
                        <%-- Print FLIGHT NUMBER --%>
                   Flight
                        <b><flifo:segment fromParent="true" attribute="flight_num" /></b>
                        <br>
    </flifo:flight>
    In the above code I just have flight_num but there are other attributes that it prints out. I want to check an attribute in segment and if it is ture then display some of the tags. How can I do it?

    This has helped me a lot in the past:
    http://java.sun.com/developer/Books/javaserverpages/cservletsjsp/chapter14.pdf
    ... and the book it's extracted from is very good too.

  • Passing params to custom tag from jsp

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

    Hi all, I have a problem passing params back to my custom tag. The tag handler has a "getPageNumber()" method which returns a value. Initially the value is set and if a link is clicked it passes that param to the tag handler. I am trying to get this value from the tag handler to update the value on the link parameter.
    Something like this:
    // processed tag
    <a href="mypage.jsp?page=1">Next page</a>
    // clicking "Next Page"
    <a href="mypage.jsp?page=2">Next page</a>
    // jsp
    <taglib:tag param="<%=getPageNumber()%>"  />
    // in tag lib
    private pagenumber=1;
                pagenumber++;
    getPageNumber(){
    return pagenumber;
    setPageNumber(int pagenumber){
       this.pagenumber=pagenumber
    }I'm not sure if this is the best way to do this or if what I am trying to do is even possible.
    Any advice would be greatly appreciated.
    Thanks :)

  • Custom tag lib issue with task flow in portal

    Dear Experts,
    I am facing an issue and need your guidance
    I have a ADF task flow which is consumed in portal. My task flow uses a custom tag library.
    When I run the task flow on portal I am facing following issue:
    Caused by: oracle.jsp.parse.JspParseException:
    Error: Encountered deferred syntax #{ in template text. If intended as a literal, escape it or set directive deferredSyntaxAllowedAsLiteral
      at oracle.jsp.parse.JspParseTagXMLTextContainer.processAttributeForELFunctions(JspParseTagXMLTextContainer.java:118)
      at oracle.jsp.parse.JspParseTagXMLTextContainer.processAttributeValue(JspParseTagXMLTextContainer.java:103)
      at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1565)
      at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1610)
      at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:886)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:780)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1297)
      at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:782)
      at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1572)
      at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1610)
      at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:846)
      at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:923)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:780)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1297)
      at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:782)
      at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1572)
      at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1610)
      at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:846)
      at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:923)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:780)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1297)
      at oracle.jsp.parse.OpenJspTagHandler.parseXMLSrcBody(OpenJspTagHandler.java:782)
      at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1572)
      at oracle.jsp.parse.JspParseTag.parse(JspParseTag.java:1610)
      at oracle.jsp.parse.OpenJspTagHandler.parse(OpenJspTagHandler.java:846)
      at oracle.jsp.parse.JspParseTag.genXMLSrcTag(JspParseTag.java:923)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcNextTag(JspParseTag.java:780)
      at oracle.jsp.parse.JspParseTag.parseXMLSrcBody(JspParseTag.java:1297)
      at oracle.jsp.parse.JspParseTag.parseXMLSrc(JspParseTag.java:1572)
      at oracle.jsp.parse.JspParseTagFile.parseXMLSrc(JspParseTagFile.java:341)
      at oracle.jsp.parse.JspParseTagFile.parse(JspParseTagFile.java:256)
      at oracle.jsp.parse.OracleJsp2Java.transformImpl(OracleJsp2Java.java:439)
      at oracle.jsp.parse.OracleJsp2Java.transform(OracleJsp2Java.java:593)
      at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:691)
      at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:490)
      at oracle.jsp.runtimev2.JspPageCompiler.parseAndGetTreeNode(JspPageCompiler.java:457)
      at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:624)
      at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:645)
      ... 120 more
    <XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1

    Hi,
    Make sure you have the JSTL tag library selected in you deployment plan. Go to Project Properties->Deployments->your_deployment_profile->WWB-INF/Lib Contributors and check JSTL.
    Let me know if this worked for you!
    Regards,
    Mihai

  • Howto call custom Oracel Data Type with TopLink?

    Hello,
    in our DB we have a custom Oracle type and a PL/SQL method which uses it.
    I would like to call the Oracle data type with TopLink. How can I do this?
    I could not find any documentation on this.
    I know JPublisher can do this but I don't want to use it!
    Please see code below
    cheers,
    Pete
    **************Datatype********************************
    CREATE TYPE My_Sub_Object AS OBJECT (Sub_Object_ID Number,
    Sub_Object_Txt VARCHAR2(200));
    CREATE TYPE My_Sub_Objects AS VARRAY (20) OF My_Sub_Object;
    CREATE TYPE My_object AS OBJECT (Object_id Number,
    Object_txt VARCHAR2(200),
    Sub_Objects My_Sub_Objects);
    ************PL/SQL-Method*****************************
    CREATE OR REPLACE PROCEDURE My_object_pro
    (Item_Object out My_Object) is
    Item_Sub_Object My_Sub_Object;
    Item_Sub_Objects My_Sub_Objects;
    Begin
    Item_Sub_Object := My_Sub_Object(10, 'Sub Object 10');
    Item_Sub_Objects := My_Sub_Objects(Item_Sub_Object);
    Item_Sub_Objects.Extend;
    Item_Sub_Object := My_Sub_Object(11, 'Sub Object 11');
    Item_Sub_Objects(2) := Item_Sub_Object;
    Item_Object := My_Object(1, 'Object', Item_Sub_Objects);
    End;
    /

    Object types and Varrays can be used from TopLink stored procedure calls. There was some support for this in 10.1.3, but the support in 11g (preview) is much better. You can also access the JDBC connection from TopLink or your DataSource and use JDBC directly.
    In TopLink 11g you can use an ObjectRelationalDescriptor to map the Object type to a Java class, and use this class as the argument type in your StoredProcedureCall.
    PL/SQL types are more difficult as they are not supported by JDBC, but your example only includes object types. If you had PL/SQL types you would need to wrap the types in object types, or use a PL/SQL block to convert them. TopLink 11g (preview 3) should have support for these as well.

  • Custom tags in jsp - problems with import in java pgm

    Hi,
    I am new to JSP and am facing some problems.
    I am trying to compile the foll. java program and it is giving an error saying 1."Package javax.servlet.jsp does not exist", 2."Package javax.servlet.jsp.tagext does not exist".
    I am using 1.j2sdk1.4.1_02, 2.j2sdkee1.3.1,and 3.Tomcat 4.1
    My java_home=C:\j2sdk1.4.1_02
    j2ee_home=C:\j2sdkee1.3.1
    path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\j2sdkee1.3.1\bin;c:\j2sdk1.4.1_02\bin;c:\j2sdkee1.3.1\doc\api;c:\jakarta-ant-1.5.1\bin
    classpath=c:\j2sdkee1.3.1\bin;c:\j2sdk1.4.1_02\bin;c:\j2sdkee1.3.1\doc\api
    can anybody help me with it?
    Regards,
    newtojsp
    import java.io.IOException;
    import java.util.Date;
    import doc.api.javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class TestTag extends TagSupport
         public int doStartTag () throws JSPTagException
              String dateString = new Date().toString ();
              try
                   JspWriter out = page.context.getOut ();
                   out.println ("Welcome to the Loan Dept" + " <br>");
                   out.println ("Today is:" + dateString + "<br>");
                   return SKIP_BODY;
              } catch (IOException ee)
                   throw JspTagException ("Error Encountered");
         public int doEndTag () throws JSPTagException
              return EVAL_PAGE;

    I got the solution for this.
    Thanks
    Newtojsp

  • Custom tag and JSP = getOutputStream error

    Hi guys. I have a custom authorization tag as follows:
    package tags;
    import stuff;
    public class AuthenticatedTag extends TagSupport {
         public int doStartTag() throws JspException {
              try {
                   pageContext.forward("login.htm");
              } catch (Exception e) {
                   e.printStackTrace();
              return EVAL_PAGE;
         public int doEndTag() throws JspException {
              return EVAL_PAGE;
    }and a jsp page using this tag:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" errorPage="error.jsp" %>
    <%@ taglib uri="/WEB-INF/tags.tld" prefix="tags" %>
    <tags:myauth />
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>stuff
    </body>
    </html>When I point my browser to this jsp I get:
    org.apache.jasper.JasperException: getOutputStream() has already been called for this response
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:383)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    Any ideas of what could be wrong? thx

    If you forward to the login.htm page, you should stop the rest of the current page evaluating. Just because you forwarded it, doesn't stop the flow of control in this page. It is trying to evaluate both the current page and the one that you forwarded to. You can only send one response
    Returning SKIP_PAGE from the doEndTag function should do the trick.
    I'm not sure that returning EVAL_PAGE or SKIP_PAGE from the doStartTag is legal. It should return SKIP_BODY or one of the EVAL_BODY options.
    In fact I think the whole thing should probably be done in the doEndTag for that reason.
    package tags;
    import stuff;
    public class AuthenticatedTag extends TagSupport {
         public int doEndTag() throws JspException {
              try {
                   pageContext.forward("login.htm");
                            return SKIP_PAGE
              } catch (Exception e) {
                   e.printStackTrace();
              return EVAL_PAGE;
    }I presume you will be putting in some sort of check to see if you should forward to login.html instead of evaluating the current page?
    Just as an alternative suggestion, a better way IMO is to implement this sort of logic as a filter, rather than putting a tag on a JSP page.
    Cheers,
    evnafets

  • Problem using Custom tag in JSP

    Iam facing problem when i am deploying my files on j2ee 1.4 server it give following erroer::
    my .tld file and jsp are given below
    any body can help me;
    mytaglib.tld file:
    <<?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//
    DTD JSP Tag Library 1.1//EN"
    "http://java.sun.com/j2ee/dtds/
    web-jsptaglibrary_1_1.dtd">
    <!-- a tag library descriptor -->
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>first</shortname>
    <uri></uri>
    <info>A simple tab library for the
    examples</info>
    <tag>
    <name>hello</name>
    <tagclass>tags.HelloTag</tagclass>
    <bodycontent>empty</bodycontent>
    <info>Say Hi</info>
    </tag>
    </taglib>
    MY JSP file :::
    <%@ taglib uri="/WEB-INF/mytaglib.tld"
    prefix="first" %>
    <HTML>
    <HEAD>
    <TITLE>Hello Tag</TITLE>
    </HEAD>
    <BODY bgcolor="#ffffcc">
    <B>My first tag prints</B>:
    <first:hello/>
    </BODY>
    </HTML>
    Error :::
    org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld: (line 1, col 2)
         org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
         org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
         org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
         org.apache.jasper.compiler.Parser.parse(Parser.java:174)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

    thanks for reply it still giving error :
    org.apache.jasper.JasperException: Unable to initialize TldLocationsCache: XML parsing error on file /WEB-INF/mytaglib.tld
         org.apache.jasper.compiler.TldLocationsCache.init(TldLocationsCache.java:218)
         org.apache.jasper.compiler.TldLocationsCache.getLocation(TldLocationsCache.java:188)
         org.apache.jasper.JspCompilationContext.getTldLocation(JspCompilationContext.java:515)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:460)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:526)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1617)
         org.apache.jasper.compiler.Parser.parse(Parser.java:174)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:244)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:146)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:132)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:245)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:462)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:448)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:551)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:300)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:324)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:284)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:306)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:200)

  • Custom tag in JSP

    MyTag currently extends from TagSupport. But still it complains this at runtime:
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at: 'my': er
              ror introspecting class: 'MyTag':
              weblogic.servlet.jsp.JspException: (line -1): Error in tag library at: 'my': cl
              ass MyTag doesn't implement javax.
              servlet.jsp.tagext.Tag
              at weblogic.servlet.jsp.StandardTagLib.jspException(StandardTagLib.java:
              138)
              at weblogic.servlet.jsp.StandardTagLib.processTag(StandardTagLib.java:24
              4)
              at weblogic.servlet.jsp.StandardTagLib.processTagElements(StandardTagLib
              .java:146)
              at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:125)
              at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:87)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:38
              11)
              at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:3561)
              at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:3422)
              at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:1760)
              

    yeah you should this is how you need to configure your web.xml
    <jsp-config>
                <taglib>
                     <taglib-uri>mycustomtag</taglib-uri>
                    <taglib-location>/WEB-INF/tld/DemoTags.tld</taglib-location>
                </taglib>
    </jsp-config>and at jsp level you can access it as
    <%@ taglib uri="mycustomtag" prefix="mytag" %>
    <mytag:property ..... />Hope that might help :)
    REGARDS,
    RaHuL

  • HHTML-Tags in jsp include

    hi,
    i have some Strings that i read from the database, now this Strings have HTML-tags like <h2> . how can i show this strings in jsp that the HTML-tags can be interpreted as html??
    plz help me ... was searching since yesterday in google and nothing found
    thank u

    Add the <pre> tag as shown below ...
    <pre> Your text here </pre>
    -Rohit

  • The J2EE Tutorial (Chap 15-Custom Tags in JSP pages

    The definition class "DefinitionTag" talks about putting the definition instance of "Definition" class in a page context, using the following code
    // put the definition in the page context
    context.setAttribute(definitionName, definition,
    context.APPLICATION_SCOPE);
    Now in an application where the request dispatcher servlet is forwarding the request to this template.jsp. What is the impact when we are using the same application scope variable "definitionName = bank� for all the http request(s) (multi pages /multi users). I am interested to know whether this approach is scalable or will it create a performance bottleneck when the definition scope is application level. I will appreciate any feedbacks.
    Regards,
    Jayesh
    MCSE, MSCD, SCJP, PMP, IBM WAS ADM

    I got the solution for this.
    Thanks
    Newtojsp

  • Dynamic include in a custom tag, called from a jsp

    Hello, I would like to be able to dynamically include other jsp's from within a custom tag that I create. is this possible?
    in a jsp page i would just write <%@ include file="file.jsp" %> and all would be ok... but if i do an out.println( "<%@ include file=\"file.jsp\" %>" ); inside a custom tag bean then it doesn't work. it just prints out the command to the page as plain text.
    I do understand why this is happening, but can anyone offer me a way around this problem?
    Thanks in advance,
    Randy

    That's actually the same result as you get with a normal include - The method I suggested is a dynamic include similar to the <jsp:include> tag, not the <%@ include %> tag.
    When you use a dynamic include, the included page is compiled and 'invoked' as serarately, and the result is what gets included, not the actual source. To get the behaviour you want would require an include directive (the <%@ include %> tag) which I don't think has an equivalence you can use inside a custom tag.
    What you can do is pass attributes from the tag class like this:
    pageContext.setAttribute(<name>, <object>, pageContext.REQUEST_SCOPE);
    and then remove them after the include using pageContext.removeAttribute.
    I'm not certain, but this implies that if you declare your variables with a <jsp:usebean> tag with request scope, instead of normal Java variable declarations, you should be able to use them in the page included by the custom tag.
    *** in the jsp ***
    <jsp:useBean id="myVar" scope="request" class="java.lang.String" />
    <% myVar = "Something"; %>
    // Now call the tag which uses the pageContext.include() mehtod.
    *** end ***
    *** in the include ***
    <jsp:useBean id="myVar" scope="request" class="java.lang.String" />
    <%= myVar + " something else" %>
    *** end ***
    Let me know if it works.

Maybe you are looking for

  • 2 monitors for most current Mac Mini

    I have a NEC PA241W wide gamut monitor connected to the thunderbolt port using a mini-display port to display port (monitor side) cable which works fine.  I want to connect a 2nd monitor so I can work more efficiently. Have a older LCD VGA only monit

  • Problems with BBC iPlayer Desktop and Adobe Air for Mac

    I would be grateful for anyone who can help me with a problem I have on my Laptop running Mac OS X Lion 10.7.3.I am having difficulty running BBC iPlayer Desktop and I suspect it is caused by Adobe Air. Recently I was prompted to update Adobe Air to

  • Synchro problem in fcp4.5 SOLVED!!!!

    playing the movie on the monitor gives sync. problems (external video <all frames) when I play the movie in the viewer or canvas without turning the monitor on (ext.video<off) there are no sync. problems . problem solved : easy set up "fire wire<basi

  • XML sigh

    Hey, I've beening sitting here for 4 hours now staring at api's and online help guides about how to read in XML, maybe I'm just having bad luck. But this is what my XML document looks like. <?xml version="1.0"?> <Program> <menu name="Selection1 abc="

  • My serial number doesn't work. please help me

    i have the CS5 CD package which i purchased since 3 years but trying to reinstall it after my computer formating my i-mac reject the CD. so i download the CS5 design standard from adobe.com using my Serial number written on the CD box and it doesn't