• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Calling an Applet from JSP in WAS 5 environment.

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
Iam calling an Applet from JSP,while Applet is getting loaded, Iam getting an exception message, I tried to debug this by putting some debud statements inside the Applet's init() method, but it is not printing any debug statements, the Applet has to load two images in the webpage it is loading the images but it is not printing the debug statements, and these two images inside the Applet acts like buttons to call the Servlets, but when I click on the images they are not calling the Servlets.
Iam posting here the code for JSP,Applet's init() method and WAS log.

<jsp lugin
type="applet"
code="com.sas.edis.viewers.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 arams>
<jsp aram name="java_archive" value="EDISGraphApplet.jar"/>
<jsp aram name="java_type" value="application/x-java-applet;version=1.4"/>
<jsp aram name= "fileName" value ="<%=elements.getImageName() %>" />
<jsp aram name="fullImageLocation" value="<%=elements.getFullImageLocation()%>"/>
<jsp aram name="SASImageLocation" value="<%=elements.getSASImageLocation()%>"/>
<jsp aram name="applicationURL" value="<%=elements.getApplicationURL()%>"/>
</jsp arams>

<jsp:fallback>
Plugin tag not supported.
</jsp:fallback>
</jsp lugin>

init() method code::::

public void init()
{
System.out.println("begining of the init() method:");
log.error("inside init() method");

this.fileName = getParameter("fileName");
this.applicationURL = getParameter("applicationURL");
this.fullImageLocation = getParameter("fullImageLocation");
this.SASImageLocation = getParameter("SASImageLocation");


System.out.println("middle of the init() method:");

String imageJPG = new String("../../images/imagedit.gif");
String imagePDF = new String("../../images/filepdf.gif");

ImageIcon JPGicon = new ImageIcon(getURL(imageJPG));
ImageIcon PDFicon = new ImageIcon(getURL(imagePDF));

System.out.println("Inside the Applet's init method");


JPanel onePanel = new JPanel();

btnJPG = new JButton(JPGicon);
btnJPG.setToolTipText("Output to JPG");
btnJPG.setBackground(Color.white);
btnJPG.addActionListener(this);

btnPDF = new JButton(PDFicon);
btnPDF.setToolTipText("Output to PDF");
btnPDF.setBackground(Color.white);
btnPDF.addActionListener(this);

log.error("end of init() method");
System.out.println("end of the init() method:");

Container contentPane = getContentPane();
contentPane.setLayout(new GridLayout());
contentPane.setBackground(Color.white);

onePanel.add(btnJPG);
onePanel.add(btnPDF);
onePanel.setBackground(Color.white);

contentPane.add(onePanel);
}

server log:

[11/1/07 12:56:01:643 EST] 00002522 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))
]

please help me in fixing this issue, urgent,
Thanks in advance,
Madhu.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic