The problem that im facing is, the below code is working correctly and retrieve the pdf format files correctly and displaying it in the iframe. but it is only working in eclipse internal browser but not in firefox or internet explorer. what will be the reason for this....

Source code:

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Browse File</title>
</head>
<body>
<center><h3>File Uploading</h3></center>
<center>
<form name="PDFForm" action="browse.jsp" method="post">
Select PDF : <input type="file" name="txtPDFFile" value="">
<input type="submit" value="View">
</form>
<% String s=request.getParameter("txtPDFFile");
if(s!=null){
%>
<iframe src ="<%= s %>" width="100%" height="700">
<p>Your have to select file to view.</p>
</iframe>
<% } %>
</center>
</body>
</html>

Hi Ganesh,

How you are checking & confirming that the code is not working over a browser?
Can you share the Error Details you see through your browser

Probable Solutions are: -
1) Create a war file from Eclipse and deploy it in your App Server.
2) Deploy the WEB APP directly from the Eclipse.
Else,
3) Copy the library files in the lib folder and check

Your problem should get solved hopefully.

Hello Ganesh,

Still this problem is not solve how to do that. can u please provide me the solution.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.