J
jstack
Hello,
I have a custom tag class with the following : -
public int doStartTag() throws JspException {
try
{
StringBuffer sBuffer = new StringBuffer();
JspWriter out = pageContext.getOut();
sBuffer.append("<jsp
lugin type=\"applet\"");
sBuffer.append(" ");
sBuffer.append("codebase=\"/homer/jsp/applet\"");
sBuffer.append(" ");
sBuffer.append("code=\"HelloWorld.class\"");
sBuffer.append(" ");
sBuffer.append("width=\"300\"");
sBuffer.append(" ");
sBuffer.append("height=\"300\"");
sBuffer.append(">");
//sBuffer.append("</jsp
lugin>");
out.print(sBuffer.toString());
}
catch (IOException ioe)
{
throw new JspException("Error: IOException while writing to client" +
ioe.getMessage());
}
return EVAL_BODY_INCLUDE;
}
public int doEndTag() throws JspException {
try
{
JspWriter out = pageContext.getOut();
out.print("</jsp
lugin>");
}
catch (IOException ioe)
{
throw new JspException("Error: IOException while writing to client" +
ioe.getMessage());
}
return EVAL_PAGE;
}
I am trying to create a custom tag that will download the java plugin
if its not present. I am hoping too to pass in the arguments like
codebase, applet etc into it. When I do a View Source the file looks
like this
<HTML>
<HEAD>
<TITLE>Hello Tag</TITLE>
</HEAD>
<BODY bgcolor="#ffffcc">
<B>My first tag prints</B>:
<jsp
lugin type="applet" codebase="/homer/jsp/applet"
code="HelloWorld.class" width="300" height="300">
</jsp
lugin>
</BODY>
</HTML>
The 'my first tag' gets printed to the screen and thats all that
happens. Nothing else.
<?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>JSP</bodycontent>
</tag>
</taglib>
Can someone please help.
Thanks again,
jstack
I have a custom tag class with the following : -
public int doStartTag() throws JspException {
try
{
StringBuffer sBuffer = new StringBuffer();
JspWriter out = pageContext.getOut();
sBuffer.append("<jsp
sBuffer.append(" ");
sBuffer.append("codebase=\"/homer/jsp/applet\"");
sBuffer.append(" ");
sBuffer.append("code=\"HelloWorld.class\"");
sBuffer.append(" ");
sBuffer.append("width=\"300\"");
sBuffer.append(" ");
sBuffer.append("height=\"300\"");
sBuffer.append(">");
//sBuffer.append("</jsp
out.print(sBuffer.toString());
}
catch (IOException ioe)
{
throw new JspException("Error: IOException while writing to client" +
ioe.getMessage());
}
return EVAL_BODY_INCLUDE;
}
public int doEndTag() throws JspException {
try
{
JspWriter out = pageContext.getOut();
out.print("</jsp
}
catch (IOException ioe)
{
throw new JspException("Error: IOException while writing to client" +
ioe.getMessage());
}
return EVAL_PAGE;
}
I am trying to create a custom tag that will download the java plugin
if its not present. I am hoping too to pass in the arguments like
codebase, applet etc into it. When I do a View Source the file looks
like this
<HTML>
<HEAD>
<TITLE>Hello Tag</TITLE>
</HEAD>
<BODY bgcolor="#ffffcc">
<B>My first tag prints</B>:
<jsp
code="HelloWorld.class" width="300" height="300">
</jsp
</BODY>
</HTML>
The 'my first tag' gets printed to the screen and thats all that
happens. Nothing else.
<?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>JSP</bodycontent>
</tag>
</taglib>
Can someone please help.
Thanks again,
jstack