• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Calling an Applet from JSP

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam calling an Applet from JSP.
but Iam getting following Exception.
[10/17/07 10:37:07:209 EDT] 000001ad WebContainer E SRVE0232E: Internal Server Error. <br> Exception Message: [java.lang.NullPointerException
at com.ibm.ws.webcontainer.srt.SRTServletResponse.setDefaultResponseEncoding(SRTServletResponse.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTServletResponse.start(SRTServletResponse.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTConnectionContext.start(SRTConnectionContext.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
]


below is my code:

<logic:equal name="elements" property="chartType" value="bar" >

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="80" height="100" name="OutputOptionsObject"
codebase="https://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">;
<!--
<param name=java_code value="com.sas.edis.viewers.EDISCaptureSnapShotApplet.class">
-->
<param name=java_code value="com.sas.edis.viewers.EDISCaptureSnapShotApplet">
<!--
<param name=java_codebase value="/DCXEDIS/assets/graph">
-->
<param name=java_codebase value="/EDIS/assets/graph">
<param name=java_archive value="EDISGraphApplet.jar">
<param name=java_type value="application/x-java-applet;version=1.4.2_01">
<param name=scriptable value="false">
<param name=useplugin value="yes">

<param name=fileName value="<%=elements.getImageName()%>">
<param name=fullImageLocation value="<%=elements.getFullImageLocation()%>">
<param name=SASImageLocation value="<%=elements.getSASImageLocation()%>">
<param name=applicationURL value="<%=elements.getApplicationURL()%>">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.4.2_01"
java_code="com.sas.edis.viewers.EDISCaptureSnapShotApplet.class"

<!--
java_codebase="/DCXEDIS/assets/graph"
-->
java_codebase="/EDIS/assets/graph"

java_archive="EDISGraphApplet.jar"
width="100" height="100"
scriptable="false"
useplugin="yes"
pluginspage="http://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">;
<NOEMBED>
</COMMENT>
No Java 2 SDK, Standard Edition v 1.4 support for applet!
Please install Java plug-in so that this applet works correctly.
If you are not prompted to download Java plug-in,
download it manually from <a href="https://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">here</a>;
</NOEMBED>
</EMBED>
</OBJECT>
</logic:equal>

can some body please tell me what is wrong with my code.
Thanks,
Madhu
 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why don't you use <jsp:plugin> ??
This tag will execute the specified part of the program whether it is a bean or an applet.
So, please try like this.
<jsp:plugin type="applet" code="theClassFileYouWantToExecute" codebase="theClassFile'sDirectoryName" >
<jsp:param name="yourParameterName" value="<%=yourValue%>" />
<jsp:fallback>
<!--- Give your message if you are not able to find or execute your applet. -->
</jsp:fallback>
</jsp:plugin>

I am giving you an example here. Please go thru that.

<jsp:plugin type="applet" code="Snowr.class" codebase="/html">
<jsp:param name="networkType" value="<%=nsrForm.getNetworkType()%>" />
<jsp:fallback>
<p> Unable to load the plugin. Please download the plugin to continue. </p>
</jsp:fallback>
</jsp:plugin>
 
Madhu Bompaly
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gayathri,
Thanks for your reply.
Iam using following code, but Iam getting a message that says failed to load the Applet.
please tell me is there any thing wrong with my code.

Thanks,
Madhu.
<% { %>
<jsp:plugin
type="applet"
code="EDISCaptureSnapShotApplet.class"
codebase="/EDIS/assets/graph/"
jreversion="1.4"
width="80"
height="100"
name = "OutputOptionsObject"
iepluginurl ="https://edistest.intra.daimlerchrysler.com:8000/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">;

<jsp:params>
<jsp:param name="java_archive" value="EDISGraphApplet.jar"/>
<jsp:param name="java_type" value="application/x-java-applet;version=1.4"/>
<jsp:param name= "fileName" value ="<%=elements.getImageName() %>" />
<jsp:param name="fullImageLocation" value="<%=elements.getFullImageLocation()%>"/>
<jsp:param name="SASImageLocation" value="<%=elements.getSASImageLocation()%>"/>
<jsp:param name="applicationURL" value="<%=elements.getApplicationURL()%>"/>

</jsp:params>

<jsp:fallback>
Plugin tag not supported.
</jsp:fallback>
</jsp:plugin>
<% } %>

Originally posted by Madhu Bompaly:
Hi,
Iam calling an Applet from JSP.
but Iam getting following Exception.
[10/17/07 10:37:07:209 EDT] 000001ad WebContainer E SRVE0232E: Internal Server Error. <br> Exception Message: [java.lang.NullPointerException
at com.ibm.ws.webcontainer.srt.SRTServletResponse.setDefaultResponseEncoding(SRTServletResponse.java(Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTServletResponse.start(SRTServletResponse.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.srt.SRTConnectionContext.start(SRTConnectionContext.java(Inlined Compiled Code))
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java(Compiled Code))
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java(Compiled Code))
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
]


below is my code:

<logic:equal name="elements" property="chartType" value="bar" >

<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
width="80" height="100" name="OutputOptionsObject"
codebase="https://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">;
<!--
<param name=java_code value="com.sas.edis.viewers.EDISCaptureSnapShotApplet.class">
-->
<param name=java_code value="com.sas.edis.viewers.EDISCaptureSnapShotApplet">
<!--
<param name=java_codebase value="/DCXEDIS/assets/graph">
-->
<param name=java_codebase value="/EDIS/assets/graph">
<param name=java_archive value="EDISGraphApplet.jar">
<param name=java_type value="application/x-java-applet;version=1.4.2_01">
<param name=scriptable value="false">
<param name=useplugin value="yes">

<param name=fileName value="<%=elements.getImageName()%>">
<param name=fullImageLocation value="<%=elements.getFullImageLocation()%>">
<param name=SASImageLocation value="<%=elements.getSASImageLocation()%>">
<param name=applicationURL value="<%=elements.getApplicationURL()%>">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.4.2_01"
java_code="com.sas.edis.viewers.EDISCaptureSnapShotApplet.class"

<!--
java_codebase="/DCXEDIS/assets/graph"
-->
java_codebase="/EDIS/assets/graph"

java_archive="EDISGraphApplet.jar"
width="100" height="100"
scriptable="false"
useplugin="yes"
pluginspage="http://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">;
<NOEMBED>
</COMMENT>
No Java 2 SDK, Standard Edition v 1.4 support for applet!
Please install Java plug-in so that this applet works correctly.
If you are not prompted to download Java plug-in,
download it manually from <a href="https://webs1636.intra.daimlerchrysler.com/unprotected/edis/j2re-1_4_2_07-windows-i586-p.exe">here</a>;
</NOEMBED>
</EMBED>
</OBJECT>
</logic:equal>

can some body please tell me what is wrong with my code.
Thanks,
Madhu

 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharath Sekariyer,
Your post was moved to a https://coderanch.com:80/t/552312";" target="_new" rel="nofollow">new topic.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic