Problem creating custom tag

I tried to create a simple custom tag using apache webserver. my jsp file is HelloWorld.jsp (for presentation, codes listed below), my HelloWorld.java class (listed below) ,a and my TLD file is called WoaTagLibDesc (also listed below). I ran this and I got this error message below:
HTTP status 404
type status report
message:
description The requested resource () is not available.
Apache Tomcat/6.0.18
Can anybody advise me on what to do please
(1) HelloWorld.jsp
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="/WEB-INF/woatags/WoaTagLibDesc.tld" prefix="mt" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <mt:helloWorld/>
    </body>
</html>
(2) WoaTagLibDesc.tld<?xml version="1.0" encoding="UTF-8"?>
<taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd">
<tlib-version>1.0</tlib-version>
<short-name>woataglibdesc</short-name>
<uri>/WEB-INF/woatags/WoaTagLibDesc</uri>
<tag>
<name>helloWorld</name>
<tag-class>woatag.HelloWorldTag</tag-class>
<body-content>empty</body-content>
</tag>
</taglib>
(3) HelloWorldTag.java
import java.io.IOException;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class HelloWorldTag implements Tag {
    private PageContext pageContext;
    private Tag parent;
    public HelloWorldTag() {
        super();
    public void setPageContext(final PageContext pageContext) {
        this.pageContext = pageContext;
    public void setParent(final Tag parent) {
        this.parent = parent;
    public javax.servlet.jsp.tagext.Tag getParent() {
        return parent;
    public int doStartTag() throws JspException {
        return SKIP_BODY;
    public int doEndTag() throws JspException {
        try {
            pageContext.getOut().write("Hello World!");
        } catch (IOException e) {
            throw new JspTagException("IO Error: " + e.getMessage());
        return EVAL_PAGE;
    public void release() {
}

Your class (according to what is posted) is in the package mytag.
So in your tld: <tagclass>tag.Hello</tagclass>should be<tagclass>mytag.Hello</tagclass>cheers,
evnafets

Similar Messages

  • Problem creating custom tags for site that has no outside internet connecti

    I've created a set of custom tags that work fine until we install our app at the customer site. The customer site has no outside Internet access, and so the DOCTYPE is failing since it references the web-jsptaglibrary_1_1.dtd located on Sun's site.
    I tried copying the dtd locally and got it to work, but the solution sucks because this web-jsptaglibrary_1_1.dtd file is referenced in both my taglib.tld file AND the web-jsptaglibrary_1_1.dtd itself. Soooo....I can put in a URL that references it on the local machine, e.g.,
    In the taglib.tld file:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "http://ClientAAA/web-jsptaglibrary_1_1.dtd">
    In the web-jsptaglibrary_1_1.dtd file:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "http://ClientAAA/AdProduction/web-jsptaglibrary_1_1.dtd"
    >
    but that means for every client that uses this app (and we have several) I have to change that URL inside both these files.
    I tried simply changing it to the relative "web-jsptaglibrary_1_1.dtd", e.g.,
    taglib.tld:
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.// DTD JSP Tag Library 1.1//EN"
    "web-jsptaglibrary_1_1.dtd">
    web-jsptaglibrary_1_1.dtd:
    <!ATTLIST taglib id ID #IMPLIED
    xmlns CDATA #FIXED
    "web-jsptaglibrary_1_1.dtd"
    >
    but then it is requiring me to put the dtd in both my web app root directory AND my jakarta/bin directory. I get the following error:
    XML parsing error on file ../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    It seems like I must be missing something here. This shouldn't be this hard. And it seems funny that to use custom tags, you have to have Internet access in the first place.
    Help!!! :)
    Thanks.

    Yeah, I think it's a bit ridiculous that in order to make all the tag library examples and instructions work, you have to have access to the Internet. I haven't seen a single example on how to make it work if there is no Internet access. That's very limiting. And I've tried all sorts of other ways of doing it, such as
    <!DOCTYPE taglib SYSTEM "web-jsptaglibrary_1_1.dtd">
    but even then it won't work because I get an error message saying:
    XML parsing error on file /assets/../vtaglib.tld: java.io.FileNotFoundException: D:\jakarta\jakarta-tomcat-4.1.29\bin\web-jsptaglibrary_1_1.dtd (The system cannot find the file specified)
    I just don't think I should have to place this file in the bin directory. There has to be another way. Do I need to modify the dtd somehow? Cuz the dtd has the following line...is this messing it up??
    <!ATTLIST taglib id ID #IMPLIED xmlns CDATA #FIXED "web-jsptaglibrary_1_1.dtd">
    I sure could use some help.

  • Sub components problem in custom tag

    Hi!
    Im writing custom tag that do nothing but can contains other components.
    So first I create custom tag with hendler that extends UIComponentTag and component class that extends UIComponentBase
    now tag work but i dont see sub components on the page
    Second i override encodeChildren and getFamily methods with:
    public String getFamily() {       
            return "MyCaller";
    public void encodeChildren(FacesContext context) throws IOException {
            Iterator ch=this.getChildren().iterator();
            while(ch.hasNext()){
                 UIComponent oKid = (UIComponent)ch.next();
                 if(oKid.isRendered()){
                    oKid.encodeBegin(context);
                    oKid.encodeChildren(context);
                    oKid.encodeEnd(context);
            super.encodeChildren(context);
        }But subcomponents not rendered on page.
    So are you know whats wrong

    the problem was in wrong getComponentType() that return wrong value

  • Problem with custom tags

    Hello..
    I have created custom tags and she gives an error me.
    The code is:
    <%@ taglib uri="mitaglib.tld" prefix="ejemplos" %>
    <HTML>
    <HEAD>
    <TITLE>Tag Hola Mundo</TITLE>
    </HEAD>
    <ejemplos:holamundo/><br>
    <ejemplos:SumaTag num1="2" num2="6" />
    </BODY>
    </HTML>
    The class:
    package helperClasses;
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class hm extends TagSupport{
    public int doStartTag() throws JspException
    try
    pageContext.getOut().print("Hola Mundo");
    catch (IOException e)
    throw new JspException("Error: IOException" + e.getMessage());
    return SKIP_BODY;
    public int doEndTag() throws JspException
    return EVAL_PAGE;
    package helperClasses;
    import java.io.*;
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext.*;
    public class SumaTag extends TagSupport{
    private int num1,num2;
    public void setNum1(int num1){
    this.num1 = num1;
    public void setNum2(int num2){
    this.num2 = num2;
    public int doStartTag() throws JspException {
    try{
    pageContext.getOut().print("Suma: " + (num1+num2));
    } catch (IOException e) {
    throw new JspException ("Error: IOException" +
    e.getMessage());
    return SKIP_BODY;
    public int doEndTag() throws JspException {
    return SKIP_PAGE;
    The file mitaglib.tld is:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib
    PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
         "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.1</jspversion>
    <shortname>ejemplos</shortname>
    <uri></uri>
    <info>Etiquetas de ejemplo</info>
         <tag>
         <name>holamundo</name>
         <tagclass>helperClasses.hm</tagclass>
         <bodycontent>empty</bodycontent>
         <info>Saludo</info>
         </tag>
         <tag>
         <name>suma</name>
         <tagclass>helperClasses.SumaTag</tagclass>
         <bodycontent>empty</bodycontent>
         <info>Saludo</info>
         <attribute>
         <name>num1</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
         </attribute>
         <attribute>
              <name>num2</name>
         <required>true</required>
         <rtexprvalue>false</rtexprvalue>
         </attribute>
         </tag>
    </taglib>

    [22/Dec/2003:09:43:47] failure (11848): Internal error: Unexpected error condition thrown (unknown exception,no description), stack: java.lang.NoSuchMethodError: javax.servlet.jsp.tagext.TagAttributeInfo.<init>(Ljava/lang/String;ZLjava/lang/String;Z)V
         at org.apache.jasper.compiler.TagLibraryInfoImpl.createAttribute(TagLibraryInfoImpl.java:518)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:426)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:379)
         at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:227)
         at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:701)
         at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:110)
         at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:215)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1077)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1042)
         at org.apache.jasper.compiler.Parser.parse(Parser.java:1038)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:218)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadJSP(JspServlet.java:193)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.access$4(JspServlet.java:167)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:589)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
         at com.iplanet.server.http.servlet.NSServletRunner.invokeServletService(NSServletRunner.java:897)
         at com.iplanet.server.http.servlet.WebApplication.service(WebApplication.java:1065)
         at com.iplanet.server.http.servlet.NSServletRunner.ServiceWebApp(NSServletRunner.java:959)

  • Problem with custom tag attribute types

    Hi,
    I try to figure out how to pass an attribute to a custom tag that is of a type other than "String"?
    In my case, I should pass an attribute with a type of "java.util.ResourceBundle".
    My tag looks like this:
    <tt:cs sel="ab" ce="<%= java.util.ResourceBundle.getBundle("de", Application.getApp().getLocale())%>" />
    I always get the message that the attribute ce is empty.
    Isn't it possible to have attirbutes that are of an other type than string? How could I solve this problem?
    Thanks a lot!
    Regards Patrick

    In JSP 1.2, in the Tag Library Descriptor, you can specify a tagt attribute as
    <attribute>
       <name>attr1</name>
       <required>true|false|yes|no</required>
       <rtexprvalue>true|false|yes|no</rtexprvalue>
       <type>fully-qualified_type</type>
    </attribute> Notice the XML element <type>fully-qualified_type</type>
    Not sure if you can do this in JSP 1.1

  • 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:include problem in custom tag

    I call <jsp:include page="emailbody.jsp" /> within a custom tag(in a file
              caller.jsp), which does emailing.
              When I invoke caller.jsp from browser, I do get the output(body of the
              email) on the browser screen, but not the output is not send as the body of
              the email.
              When I use static include namely, <@include file="emailbody.jsp" />, the
              output is directed to the body of the email.
              The above means, for a static jsp include file, it is parsed and included in
              the body-evaluation of the custom tag.
              For a dynamic include file, it is NOT parsed and NOT included in the
              body-evaluation of the custome tag.
              The reason could be, How Weblogic loads classes for custom-tag for dynamic
              include files.
              Can anybody at BEA throw loght on this and the solution.
              Thanks in advance.
              Chandra
              

    Well I found out jsp:include is not supported inside custom tags for JSP
              spec 1.1.
              This was stated in section 5.4.5 of spec 1.1.
              May be in future spec 1.2.
              Thanks
              Chandra
              "Cameron Purdy" <[email protected]> wrote in message
              news:[email protected]...
              > Have you sent this to [email protected]?
              >
              > It sounds serious.
              >
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol, Inc.
              > http://www.tangosol.com
              > +1.617.623.5782
              > WebLogic Consulting Available
              >
              >
              > "matthew mcclain" <[email protected]> wrote in message
              > news:[email protected]...
              > > I have run into the same problem.
              > > I'm certain it's because CustomTags have their own buffer and
              > > jsp:include or pageContext.include() or requestDispatcher.include()
              > > all bypass the buffer and write to the underlying stream.
              > >
              > > I attempted to define jspx:include by wrapping the response object
              > > which is sent to requestDispatcher.include and then wrapping the
              > > OutputStream returned from the response with a stream which
              > > writes to the "out" of the pageContext for my tag.
              > >
              > > Unfortunately, I get a class cast exception because weblogic expects
              > > it's own class to be there as a ServletOutputStream:
              > >
              > > java.lang.ClassCastException:
              com.allmystuff.wif.IncludeServletResponse$1
              > > at
              > >
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > > l.java:202)
              > > at
              > >
              >
              weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
              > > l.java:172)
              > > at com.allmystuff.wif.Include.doStartTag(Include.java:37)
              > >
              > > So any chance, jsp:include will get fixed?
              > >
              > > Thanks,
              > > Matthew McClain
              > > [email protected]
              > >
              > >
              > > "chandra" <[email protected]> wrote in message
              > > news:[email protected]...
              > > > I call <jsp:include page="emailbody.jsp" /> within a custom tag(in a
              > file
              > > > caller.jsp), which does emailing.
              > > > When I invoke caller.jsp from browser, I do get the output(body of the
              > > > email) on the browser screen, but not the output is not send as the
              body
              > > of
              > > > the email.
              > > > When I use static include namely, <@include file="emailbody.jsp" />,
              the
              > > > output is directed to the body of the email.
              > > >
              > > > The above means, for a static jsp include file, it is parsed and
              > included
              > > in
              > > > the body-evaluation of the custom tag.
              > > > For a dynamic include file, it is NOT parsed and NOT included in the
              > > > body-evaluation of the custome tag.
              > > > The reason could be, How Weblogic loads classes for custom-tag for
              > dynamic
              > > > include files.
              > > > Can anybody at BEA throw loght on this and the solution.
              > > > Thanks in advance.
              > > > Chandra
              > > >
              > > >
              > >
              > >
              >
              >
              

  • Problem with custom tag

    I have written a custom tag that I am having problems with. It works on some machines, but not on others. I have a page that uses many 'standard' tags. I have correctly set the URI etc, because all of my other tags work. However, on some machines, my custom tag gives me an error:
    attribute does not support request time values
    I'm assuming that I have the correct versions of standard.jar etc because all of the regular jstl 1.1 tags work. It is just my custom tag that throws an error.
    here is the .tld for my tag:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!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.1.2</tlib-version>
         <jsp-version>1.2</jsp-version>
         <short-name>My custom tag</short-name>
         <uri>http://my.custom/tags</uri>
         <tag>
              <name>breadcrumb</name>
              <tag-class>tag.BreadcrumbTag</tag-class>
              <body-content>JSP</body-content>
              <attribute>
                   <name>breadcrumbs</name>
                   <required>true</required>
                   <rtexprvalue>false</rtexprvalue>
                   <description>Pass in the list of Breadcrumbs containing the actual information
    about what tags need to be rendered on the page.</description>
              </attribute>
         </tag>
    </taglib>
    Any thoughts/help greatly appreciated...

    I encountered the same problem in our environment. I did the same thing as
              James. Simply re-initialize all variables in the do end tag.
              Also, with the nested tags you use you may also need to implement cloneable
              in the inner tag if the outer tag keeps references to all the inner tag
              instances.
              For instance if the outer tag kept a vector of references to the inner tag,
              then you would need to use clone() on the inner tag before adding it to the
              vector.
              "James Lynn" <[email protected]> wrote in message
              news:3af05d29$[email protected]..
              > > But
              > > with WL 6.0, the cell tag handler reuse the same instance each time the
              > cell tag
              > > is called and the member field is not reset
              >
              > I had the same problem. As a work around, I reinitialize everything in my
              > doEndTag() method and it works.
              >
              >
              > --
              > James Lynn - Lead Software Architect
              > Oakscape - Java Powered eBusiness Solutions <http://www.oakscape.com/>
              >
              >
              

  • Problems with custom tags (Tomcat 4.1)

    I have been trying to set up an existing web application to use a custom tag library. I have these tag-related files:
    /photodb/WEB-INF/photodb.tld
    /photodb/WEB-INF/classes/PhotoListTag.class
    /photodb/photolist.jsp
    This is how i have the photoList tag configured in photodb.tld
    <tag>
    <name>photoList</name>
    <tag-class>PhotoListTag</tag-class>
    <body-content>JSP</body-content>
    <attribute>
    <name>startIndex</name>
    </attribute>
    </tag>
    When i try to view photolist.jsp, i get this error:
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: -1 in the jsp file: null
    Generated servlet error:
    [javac] Compiling 1 source file
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\photodb\photolist_jsp.java:73: cannot resolve symbol
    symbol : class PhotoListTag
    location: class org.apache.jsp.photolist_jsp
    PhotoListTag jspxth_photodb_photoList_0 = (PhotoListTag) jspxtagPool_photodb_photoList.get(PhotoListTag.class);
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\photodb\photolist_jsp.java:73: cannot resolve symbol
    symbol : class PhotoListTag
    location: class org.apache.jsp.photolist_jsp
    PhotoListTag jspxth_photodb_photoList_0 = (PhotoListTag) jspxtagPool_photodb_photoList.get(PhotoListTag.class);
    ^
    C:\Program Files\Apache Group\Tomcat 4.1\work\Standalone\localhost\photodb\photolist_jsp.java:73: cannot resolve symbol
    symbol : class PhotoListTag
    location: class org.apache.jsp.photolist_jsp
    PhotoListTag jspxth_photodb_photoList_0 = (PhotoListTag) jspxtagPool_photodb_photoList.get(PhotoListTag.class);
    ^
    3 errors
    I have tried many ideas, such as packaging the tag handler class, and putting the class file in other loctions, but nothing has helped.
    I know that Tomcat is recognizing PhotoListTag at some point (when it parses the TLD file, but not when compiling the JSP, I think), because if i change the <tag-class> to an invalid class, i get an "Unable to load class photoList" (which is a confusing error message btw, as photoList is not a class, but a tag name).
    Does anyone know how to fix this problem? I've been going in circles for hours, and i'm thinking this problem has a simple solution.

    Thank you for your quick replies. Unfortunately, they do not solve my problem. If I put PhotoListTag in the com.yourdomain package (and move it to classes/com/yourdomain), the error changes to reflect the different package (e.g. package com.yourdomain does not exist). Also, deleting the class files and restarting Tomcat did not cause any changes.
    Although my knowledge of how Tomcat works is limited, it seems to me that something like this is happening:
    When a request for /photodb/photolist.jsp is recieved, tomcat processes that file, processes the tld file, and checks for that any classes called using a tag--in this case <photodb:photoList>--exist. If the class is invalid, the error message "Unable to load class photoList" is given.
    Otherwise, it translates the jsp into java, and attempts to compile it. This is where the problem occurs. It seems that the jasper compiler does not know where to look for the PhotoListTag class. Is there a way that this can be changed, or is could the problem be caused by something else?

  • Trying to create custom tag library

    I'm a novice trying to create a simple custom tag library application. As such I need a couple import statements like
    import javax.servlet.jsp.*;
    import javax.servlet.jsp.tagext;
    This statements will not compile. I'm using Java 2 1.4_03 and WSDP 1.3. My CLASSPATH currently holds
    c:\jwsdp\common\lib\servlet-api.jar
    and
    c:\j2sdk\lib\mysql-connector-java-3.0.11-stable-bin.jar.
    I've got JAVA_HOME set to c:\j2sdk and JWSDP_HOME set to c:\jwsdp.
    Thank you very much for any assistance you are able to render.

    Thanks for your reply. I'm using the TextPad editor, which uses CLASSPATH.
    I've figured out the answer. I needed to add
    c:\jwsdp\common\lib\jsp-api.jar
    to my CLASSPATH.
    Again, thanks.

  • How to create custom tags in my own folder..(It is very important to know)

    Hi developers,
    I am try to develop custom tags, But i am fail. I take support of internet. I read some documentations to develop custom tags. I can understand everything to develop custom tags . My problem is where to place taghandler,tld and jsp files in tomcat. Could you please guide me how develop custom tags in tomcat. I try to wax. Please guide me.
    Thanking you.
    with regards
    sure...:)-

    You'll have something like
    tomcat/webapps/mysite
    where 'mysite' is the webapp root.
    Then
    mysite/* - holds JSP (in root directory or any subdirectory except WEB-INF)
    mysite/WEB-INF - holds TLDs
    mysite/WEB-INF/classes - holds non-jar class files
    mysite/WEB-INF/lib - holds the jar file containing the custom tag java code
    You can put java classes in either WEB-INF/classes (for *.class files) or WEB-INF/lib (for *.jar files), doesn't matter which.

  • Problem using custom tag library in portlet's jsp

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

    Hi,
    I created a custom portlet (a JSR 168 portlet) and I'm using a tag library that I previously developed. Normally it works fine, but sometimes I get a ClassCastException. Once I redeploy the portlet everything works again. This is Oracle Portal 10.1.4.
    Has anybody encountered similar problems?
    Here's the exception:
    taglib exception:
    java.lang.ClassCastException at timecardreminderportlet.html._view._jspService(_view.java:201) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824) at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121) at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source) at org.mitre.isis.trs.reminder.portlet.TimecardReminderPortlet.doDispatch(TimecardReminderPortlet.java:108) at javax.portlet.GenericPortlet.render(Unknown Source) at oracle.webdb.wsrp.server.Server.getMarkup(Unknown Source) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.invoke_getMarkup(WSRP_v1_Markup_PortType_Tie.java:224) at oracle.webdb.wsrp.WSRP_v1_Markup_PortType_Tie.processingHook(WSRP_v1_Markup_PortType_Tie.java:499) at com.sun.xml.rpc.server.StreamingHandler.handle(StreamingHandler.java:230) at com.sun.xml.rpc.server.http.ea.JAXRPCServletDelegate.doPost(JAXRPCServletDelegate.java:153) at com.sun.xml.rpc.server.http.JAXRPCServlet.doPost(JAXRPCServlet.java:69) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65) at oracle.webdb.wsrp.server.ContextFilter.doFilter(Unknown Source) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

  • WebCenter Spaces Extensions - Problems creating custom header

    Hi,
    I'm looking for a way of branding the WebCenter Spaces application so that (among others) I can place my own html fragment above the Primary Tab to render a header and hide out-of-the-box global tool bar, secondary tabs and and the side bar. As far as I understood from the "Extending WebCenter Spaces" document (Link: [http://www.oracle.com/technology/products/webcenter/pdf/owcs_r11_extend_spaces_wp.pdf]) I should be able to do this by creating my own custom shell.
    I have taken the gsDefault shell provided within the extendwebcenterspaces.zip file and I got to remove the unwanted bars. Unfortunately I could not get to add my own html fragment for the header. What I have done for this purpose is to change this piece of code in the shell-config.xml:
    <shellContent id="gsDefault" displayName="#{uib_o_w_w_r_WebCenter.LABEL_SPACE_MAXIMIZED_CHROME}"
    pageTemplate="/oracle/webcenter/webcenterapp/view/templates/WebCenterAppShellTemplate.jspx">
    with this one:
    <shellContent id="gsDefault" displayName="#{uib_o_w_w_r_WebCenter.LABEL_SPACE_MAXIMIZED_CHROME}"
    pageTemplate="*/custom*/oracle/webcenter/webcenterapp/view/templates/*Custom*WebCenterAppShellTemplate.jspx">
    For making my custom JSPX file I have taken the default one and made the following change:
    Where there was:
    <f:facet name="top">
    <wcshell:panel name="PrimaryTabBar">
    <af:region id="wc_prm"
    value="#{bindings.shell_PrimaryTabBar.regionModel}"/>
    </wcshell:panel>
    </f:facet>
    I have placed the following code:
    <f:facet name="top">
    <af:panelStretchLayout id="pt_psl1">
    <!--f:facet name="bottom"/>
    < f:facet name="start"/ >
    < f:facet name="end"/-->
    <f:facet name="top">
    <af:image source="/ExtendWebCenterSpaces-StaticFiles-context-root/images/Header.jpg"
    shortDesc="BB 360 Header"
    id="pt_i1"/>
    </f:facet>
    <f:facet name="center">
    <wcshell:panel name="PrimaryTabBar">
    <af:region id="wc_prm"
    value="#{bindings.shell_PrimaryTabBar.regionModel}"/>
    </wcshell:panel>
    </f:facet>
    </af:panelStretchLayout>
    </f:facet>
    I have followed the steps indicated in the document for deploying the custom extensions several times (including, adding the extra java parameter, redeploying and restarting). I know the jspx is accessible as when I try to get it directly from a browser I get a response instead of the page not found page.
    Is this the rightway fo doing it? Am I missing something? Which steps could I follow to identify the underlying problem?
    Thank you very much.

    Marcos,
    I am trying to create new site template and getting below error for wcshell:panel.
    "No grammer available for namespace http://xmlns.oracle.com/webcenter/shell, content of element panel cannot be validated"
    Do you know which JSP Tag Libraries i need to add?
    Thanks
    JP

  • Problem with custom tag using TagExtraInfo

              Hi,
              I have a tag that create a Java variable using TEI. The scope of this
              variable is driving me crazy. The problem is hard to describe, so the
              email is a bit long - stay with me...
              <pre:setvar id="foo" value="test" /> create a Java variable
              named "foo", which has String value "test". I can use "foo" like this in
              the page later: <%= foo %>.
              Now, if I call setvar twice with same id:
              <pre:setvar id="foo" value="test" />
              <pre:setvar id="foo" value="another-test" />
              This is still ok. By checking the compiled Java file, the first call
              declare the var, the second call just use it without creating it again:
                   //first call
                   String foo=null;
                   foo="test";
                   //second call
                   foo="another test";
              Now the problem comes when the frist call is in "if" statement (code is not
              useful, only for demostration):
              <% if (1>0) { %>
                   <pre:setvar id="foo" value="test" />
              <% } %>
              <pre:setvar id="foo" value="another-test" />
              The compiled code looks like:
                   if (1>0) {
                        //first call
                        String foo=null;
                        foo="test";
                   //second call
                   foo="another test";
              Variable foo is out of scope at the second call! (BTW, I can workaround this by
              adding another <pre:setvar id="foo" value="" /> before the "if".)
              Is it a fault in JSP specification? Or a problem when WebLogic implements TEI?
              Any idea?
              Thanks,
              -- Jin
              

    I encountered the same problem in our environment. I did the same thing as
              James. Simply re-initialize all variables in the do end tag.
              Also, with the nested tags you use you may also need to implement cloneable
              in the inner tag if the outer tag keeps references to all the inner tag
              instances.
              For instance if the outer tag kept a vector of references to the inner tag,
              then you would need to use clone() on the inner tag before adding it to the
              vector.
              "James Lynn" <[email protected]> wrote in message
              news:3af05d29$[email protected]..
              > > But
              > > with WL 6.0, the cell tag handler reuse the same instance each time the
              > cell tag
              > > is called and the member field is not reset
              >
              > I had the same problem. As a work around, I reinitialize everything in my
              > doEndTag() method and it works.
              >
              >
              > --
              > James Lynn - Lead Software Architect
              > Oakscape - Java Powered eBusiness Solutions <http://www.oakscape.com/>
              >
              >
              

  • Problems Creating Custom Skin w/ further functionality

    Hello,
    To add that final piece to my project i have been attempting to modify the controls within the flash files located in the program files. I have been successful in editing the look without any problems, but that isn't the end of my plan. I have been attempting to create a "full screen mode" button for my captivate project. As of now i have a button widget that i have created with the appropriate code to make this happen. But i am having some problems it doesn't fit our layout very well. So to fix this i'm wanting to add an additional button into the theme template swf. After looking through the files though i'm unable to locate AS3 class features that show functionality. Or any linkage to point me in an appropriate direction to make my changes/addition. If any of you have any experience in this or if there is just no way to add this feature without an extensive amount of work. Any information would help.
    I am using Adobe Captivate 5 as well as Flash CS5, if there's any more info you need i will gladly provide it.
    Thank you

    Marcos,
    I am trying to create new site template and getting below error for wcshell:panel.
    "No grammer available for namespace http://xmlns.oracle.com/webcenter/shell, content of element panel cannot be validated"
    Do you know which JSP Tag Libraries i need to add?
    Thanks
    JP

Maybe you are looking for

  • How do I update linked FM files without losing TOC entries or Map IDs?

    Hi, I'm using RH 10 with linked FM 11 files to create a WebHelp project and this is what happens when I do an update or force update of a linked file in the RH project: After the update, the topic that contains updated content gets deleted from proje

  • Black (blank) images in slideshow

    Hi All. Bit of a newbie here. I have selected a group of images (each thumbnail shows an image) and when I create a slideshow there are numerous images that show up blank. Is there anything i can do about this? If I hit the spacebar they also show up

  • [solved]BAPI change of language (RFC)

    Hi, I call from a WAS (BSP) with RFC in our ERP-System. The RFC-FM contains a simple call of BAPI PARTNER_CHECKPASSWORD. There are 2 possible languages in BSP. Problem: watever language is selected, the returnmessages from FM are always in german. So

  • How can I add a 2D image to a 3D picture control?

    Can a 2D image such as data obtained from a .jpg or .png file be added as an object to a 3D scene? Thanks for your time in advance.

  • BASIS Settings for XI

    Hi, Can somebody give links or Docs for the BASIS Settings like Pre-Configuration and Post-Configuration Settings for XI apart from the one provided at help.sap.com? My Mail ID is [email protected] Thanks in Advance, Rose.