Results 1 to 1 of 1
- 10-17-2011, 05:48 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 84
- Rep Power
- 0
AppletContext.ShowDocument(url,target) does not open document
I have upgraded from Java 1.5_06 to 1.6.0_27 and appletcontext.showDocument(url,string) does not open up the document.
If I type the url seperately in the browser ,it open ups but not from the Java code.
Can you please help me,no changes in code are done,its just that I upgraded to 1.6.0_27.
Below is the code
URL url = new URL(protocol + testServer+ "/" + testApp+ "testFolder/"
+ "test.asp"
+ "?file="
+ SerialNo
+ "/" + fileName
+ extension);
appletContext.showDocument(url,"test");
I printed the url http://testServer/testApp/testFolder...ile=1/test.pdf
and I also printed the applet context is sun.plugin2.applet.Plugin2Manager$AppletContextImp l
I have replaced all actualnames with 'test'
My test.asp is as follows
<%@LANGUAGE="VBSCRIPT"%><%
Option Explicit
dim file, testf
file = testServer.mappath("./.") + "\" + request("file")
Set testf = CreateObject("Scripting.FileSystemObject")
if testf .FileExists(file) then
dim objStream
Response.Buffer = TRUE
set objStream = testServer.CreateObject("ADODB.Stream")
objStream.Type = 1 'adtypeBinary
objStream.Open
objStream.LoadFromFile(file)
Response.Clear
Response.ContentType="application/pdf"
'Response.AddHeader "content-disposition", "attachment;filename=some.pdf"
Response.Expires = 0
'Response.AddHeader "Pragma", "No-Cache"
Response.BinaryWrite objStream.Read
ObjStream.Close : set objStream=nothing
Response.End
else %>
<HTML>
<META HTTP-EQUIV="REFRESH" CONTENT="5">
<TITLE>TEst</TITLE>
<BODY background="test.bmp">
<TABLE height=100% width=100%>
<tr>
<td align=center>
Some message....
<img src="test.gif">
</td>
</tr>
</table>
</BODY>
</HTML>
<%end if%>
Similar Threads
-
How to Convert Excel document to word document?
By sudheer.v47 in forum Advanced JavaReplies: 1Last Post: 10-07-2011, 12:32 PM -
Annoyance with ANT build target
By kjkrum in forum EclipseReplies: 0Last Post: 06-26-2011, 11:43 PM -
open text document using JButton
By coopc in forum New To JavaReplies: 3Last Post: 05-04-2011, 12:02 AM -
JMF needed on target machines
By fatblacktone in forum New To JavaReplies: 1Last Post: 04-06-2010, 07:57 AM -
i want to open a document from my program
By akinpam in forum New To JavaReplies: 1Last Post: 12-21-2008, 06:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks