Win a copy of Head First Android this week in the Android forum!

Madhu Bompaly

Greenhorn
+ Follow
since Oct 11, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Madhu Bompaly

I had The same Issue,
then later on I found that the sequence Iam trying to use was not there in the database,
after creating the sequence it worked fine for me.
Thanks to Mark Spritzler for raising those questions.

Madhu.

Hi every one,

Iam using struts in my application,
whenever I clicked on the refresh button of the browser the form is getting submitted twice.
I tried to use saveToken() and isTokenVaild() methods but still, the form is getting submitted when I click on the Refresh button.
please see my code below.

please let me know what is wrong with my code.

Thanks,
Madhu.

public ActionForward execute(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {

String forward = Constants.FWD_SUCCESS;
String action = mapping.getPath();

HttpSession session = request.getSession();

if(action.equals("/EdisTrees")){


EdisTreesHelper treeHelper = new EdisTreesHelper();

if(!isTokenValid(request)){
treeHelper.processTreesDeatils(mapping, form, request, response);
resetToken(request);
}else{
//do nothing;
}
}
saveToken(request);
return mapping.findForward(forward);

}
13 years ago
Hi,
Iam having a problem with form submission in Struts, after I submit the form and click on the Refresh button on the browser, the same request parameters are getting submitted again.

I tried to use the ActionForm class and tried to use the reset() method,but still it is not working.

can some body please tell me how to reset the request object in Struts.

Thanks in advance.
Madhu.
13 years ago
Hi Merril,
thanks for your reply,
here Iam posting the code.

public Connection getEdis_Connection(String sDatasource)
{
System.out.println("data source#####"+sDatasource);
DataSource ds = null;
Connection conn = null;

try {
ds = getDataSource(sDatasource);
conn = ds.getConnection();
return conn;
}catch(Exception e) {
System.out.println("Error encountered Web service locator: method getEdis_Connection() " + e.getMessage());
e.printStackTrace();
}
return null;
}

}

it is failing at line:

conn = ds.getConnection();

but the same code is working fine WSAD 5.0.
I guess the problem is not with the code, the issue is with the configuration of datasource in IRAD 6.0.
can you please explain the steps to follow to connect to DB2 from IRAD 6.0
i.e. datasource configuration, adding path for JDBC Driver etc.

Thanks,
Madhu.




Originally posted by Merrill Higginson:
Show us your code and point out which line is throwing the exception.

14 years ago
Hi Merril,
Thanks for your reply.
Iam getting null there becoz, I should get some value for that from database after I get the connection.
but it is failing to get the connection, I debugged my code it is failing at a point where Iam getting the connection to database.
before this exception, I was getting the 'ClassfoundNotException'.
after I added 'DB2_JDBC_DRIVER_PATH' path this exception is gone but, now Iam getting 'NullPointerException.
any idea about this?

Thanks,
Madhu.

Originally posted by Merrill Higginson:
The "Deprecated usage of direct JNDI lookup" message is a warning only. You can ignore it. The real problem is the NullPointerExectpion, and that appears to be in your code, not WebSphere's. Here's the important line in the stack trace:

Take a look at line 174 of your EdisLDAPSearch for a situation where you expect an object to have a value, but it may be null.

14 years ago
Hi every one,
Iam trying to connect to DB2 database from IRAD 6.0, I added the datasource in admin console and also in application-deployment descriptor, added the db2java.zip in /WEB-INF/LIB folder, added 'DB2_JDBC_DRIVER_PATH' to the websphere environment variable and added the userid and password for authentication. but Iam getting following exception when I try to connect to the database.

please let me know how to solve this issue.

Thanks,
Madhu.



[11/14/07 10:34:00:021 EST] 00000028 ConnectionFac W J2CA0294W: Deprecated usage of direct JNDI lookup of resource jdbc/EDISPROD. The following default values are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
loginConfigurationName: null
loginConfigProperties: null
[Other attributes]

res-resolution-control: 999 (undefined)
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)

[11/14/07 10:34:00:402 EST] 00000028 RequestProces W Unhandled Exception thrown: class java.lang.NullPointerException
[11/14/07 10:34:00:412 EST] 00000028 ServletWrappe E SRVE0068E: Could not invoke the service() method on servlet action. Exception thrown : javax.servlet.ServletException
at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:545)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:486)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
---- Begin backtrace for Nested Throwables
java.lang.NullPointerException
at com.dcx.edisea.security.ldap.EdisLDAPSearch.findLocDept(EdisLDAPSearch.java:174)
at com.sas.edis.actions.ConnectToSASAction.execute(ConnectToSASAction.java)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2837)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java:601)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1332)
14 years ago
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.

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.

[BPSouther: Added code tags]
[ November 02, 2007: Message edited by: Ben Souther ]
14 years ago
JSP
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.
14 years ago
Hi every one,

I have a form which is getting submitted when I click on the 'Refresh' button the browser,Iam submitting the form using Javascript function form.submit();.
after I submit the from by clicking on submit button,and click on the Refresh button the form is getting is submitted again.
for my submit button I have set input type="button".
can some one please tell me how to correct this issue.
Thanks,
Madhu.
Hi Paul,
Thanks for your idea.
it is working fine for me, after writing HTML links for the images.

Thanks again,
Madhu.

Originally posted by Paul Clapham:
From the server? No. All you can do is to send the ZIP file, it's up to the client to decide to do with it. And all the client is going to do with it is (1) save it to the client's disk -- most likely -- or (2) open it with some ZIP archive reader -- not very likely.

If you really want to display a page of images, by far the easiest way is to send an HTML page containing links to all the images. If that was your goal then you are doing it in entirely the wrong way.

14 years ago
Hi every one,

I have a form which is getting submitted when I click on the 'Refresh' button the browser,Iam submitting the form using Javascript function form.submit();.
after I submit the from by clicking on submit button,and click on the Refresh button the form is getting is submitted again.
for my submit button I have set input type="button".
can some one please tell me how to correct this issue.
Thanks,
Madhu.
14 years ago
JSP
Hi Paul,

Thanks for your reply.
my actual requirement is display a page of images.
but right now Iam using an servlet for that but it didn't work.
as you said,I need to call the servlet any way to the get images,
these images I will get dynamically from database and vary in number(some time I will get 3 or 4 images)
can you please post some code for JSP that can call the servlet and write the links for images.

Originally posted by Paul Clapham:
From the server? No. All you can do is to send the ZIP file, it's up to the client to decide to do with it. And all the client is going to do with it is (1) save it to the client's disk -- most likely -- or (2) open it with some ZIP archive reader -- not very likely.

If you really want to display a page of images, by far the easiest way is to send an HTML page containing links to all the images. If that was your goal then you are doing it in entirely the wrong way.

14 years ago
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

14 years ago
JSP
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
14 years ago
JSP
Hi Tim,
Thanks for your reply.
I used the ZIP file to write all the JPEG files into it and read the ZIP file and wrote it to ServletOutPutStream, but the problem is they are opening as a attachment when I set the 'Content-disposition' to both 'inline' and 'attchment'.
is there any way I can display all the iamges in a single page by reading the ZIP file.
Iam posting my code here for your reference.
Thanks,
Madhu.

if(!destinationFile.getName().equalsIgnoreCase(thisSessionFileName+".jpg")){

byte[] buf = new byte[1024];
FileInputStream in = new FileInputStream(destinationFile);

out.putNextEntry(new ZipEntry(destinationFile.getName()));

// Transfer bytes from the file to the ZIP file
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
out.closeEntry();
in.close();
}
}
// Complete the ZIP file
out.close();

response.setContentType("image/jpeg");
response.setHeader("Content-Disposition", "attachment; filename=" + outFilename);

FileInputStream is = new FileInputStream(outFilename);
ServletOutputStream sos = response.getOutputStream();

int c;
while ((c = is.read()) != -1) {

sos.write(c);

}
is.close();
sos.close();

}catch(Exception e){
e.printStackTrace();
System.out.println("this is inside catch block"+e.getMessage());
e.toString();
}

Originally posted by Tim Holloway:
The HTTP protocol is precisely defined as a request/response method of communication. One request, one response. Another request, another response. That's not a Java thing, it's an Internet thing.

Each response is a single "file" (data stream). When you display a web page that has several pictures on it, the initial request returns an HTML text stream response. Embedded in the returned HTML stream are links to the various pictures - each picture has its own URL. The user's browser program understands these IMG tags as an indication that it should do additional requests, one per picture - each image URL gets a response of the picture that goes with that URL.

If you actually want to send multiple files back in a single response, what you have to do is embed them in a container-type file such as a ZIP file.

14 years ago