tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Foo Shi Hao" <z...@doramail.com>
Subject Using JSP to Save file
Date Thu, 14 Jun 2001 12:45:05 GMT
Hey all~!
Got something to ask. I'm running a simple jsp page as shown below. It has no errors but the
file is not being written/created...any ideas?

<%@ page import="java.io.*"%>
<html>
<head><title>File Saver</title></head>
<body>
<%
PrintWriter textFile = null;
try
{
textFile = new PrintWriter(new 
FileOutputStream("economic.txt"));
}
catch(IOException e)
{
System.out.println("File I/O Error.");
} 
textFile.println("Testing Phase"); 
textFile.close();
%> 
</body>
</html>
-- 

Get your free email from www.doramail.com with 30 Megs of disk space in webhosting and e-mail
storage!





Powered by Outblaze

Mime
View raw message