Hi All,
I am facing some problems with custom jsp tags. I am testing this code in IBM
Visual Age for java 3.5.3 in IBM websphere test environment.The problem arises
only when i
try to pass any attribute from the JSP other wise it works fine.
Can anybody please help ?
Thanks,
Raj
+++++++++++++++++++++++++++++++++++++++ start Error text
++++++++++++++++++++++++++++++++++++++++++
Error 500
An error has occured while processing
request:http://localhost:8080/jsp/customtags.jsp
Message: Server caught unhandled exception from servlet [jsp]: Cannot find any
information on property 'Param1' in a bean of type
'com.tcs.test.TestTagHandlerNew'
Target Servlet: jsp
StackTrace:
-------------------------------------------------------------------------------
-
Root Error-1: Cannot find any information on property 'Param1' in a bean of
type 'com.test.TestTagHandlerNew'
+++++++++++++++++++++++++++++++++++++++ End Error text
++++++++++++++++++++++++++++++++++++++++++
The Constructure is called. But it did not find the the info about Param1
Property. Please note that, the get method is in place.
+++++++++++++++++++++++++ Tag handler Code
+++++++++++++++++++++++++++++++++++++++++++++++++++
package com.test;
/**
* Insert the type's description here.
* Creation date: (7/21/01 1:42:15 PM)
* @author: Administrator
*/
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpUtils;
import javax.servlet.http.HttpServletRequest;
import java.util.StringTokenizer;
import java.util.Vector;
public class TestTagHandlerNew extends javax.servlet.jsp.tagext.TagSupport {
/**
* TestTagHandler constructor comment.
*/
private String Param1 = null;
public TestTagHandlerNew() {
super();
System.out.println("The Constructure is called");
}
public String getParam1() {
return Param1;
}
public void setParam1( String aParam1) {
Param1 = aParam1;
}
public int doStartTag() throws JspException{
JspWriter out = pageContext.getOut();
try {
out.println("Out value = "+Param1);
} catch (IOException ioe) {
ioe.printStackTrace();
new JspException("IOExceptio occured in dostartTag");
}
catch(Exception e){
new JspException("Exception occured in dostartTag");
}
return EVAL_BODY_INCLUDE;
}
public int doEndTag() throws JspException{
JspWriter out = pageContext.getOut();
try {
out.println("do End Tag is executed");
}
catch(IOException ioe) {
new JspException("Exception occured in doEndTag");
}
return EVAL_PAGE;
}
}
++++++++++++++++++++++++++++++ End Tag Handler Code
++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++ Start Tag Libary
Descriptor++++++++++++++++++++++++++++++++++++++++++++
<?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>as</shortname>
<urn></urn>
<info>Tag Library Test</info>
<tag>
<name>test</name>
<tagclass>com.test.TestTagHandlerNew</tagclass>
<bodycontent>JSP</bodycontent>
<info>Generates the HTML Table</info>
<attribute>
<name>Param1</name>
<requird>false</requird>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
++++++++++++++++++++++++++++++++++ End Tld descriptor
+++++++++++++++++++++++++++++++++++++++
-------------------------------------------------------------------
The contents of this e-mail are confidential to the ordinary user
of the e-mail address to which it was addressed and may also be
privileged. If you are not the addressee of this e-mail you should
not copy, forward, disclose or otherwise use it or any part of it
in any form whatsoever. If you have received this e-mail in error
please notify us by telephone or e-mail the sender by replying to
this message, and then delete this e-mail and other copies of it
from your computer system. Thank you.
We reserve the right to monitor all e-mail communications through
our network.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html