The Servlets course
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Marcia_Hacker
Posted On:   Saturday, October 5, 2002 10:27 PM

I am taking the 'Fundamentals of Java Servlets' course and I cannot get the magersizes 4 and 5 to work. Number 4, "generating In Line content' does nto work. I followed all steps, seems pretty straight forward and the date does not show. My main concern is in magersize #5: in FormDisplayServlet.java, DataInputStream.readLine() has been deprecated. I followed Sun's documentation on this method and used this instead of your solution: BufferedReader brS = new BufferedReader(new InputStreamReader(new FileInputStream("struct.dat"))); and now I keep getting this message: Could not open and process the file struct.dat Got error java.security.AccessCont   More>>

I am taking the 'Fundamentals of Java Servlets' course and I cannot get the magersizes 4 and 5 to work.


Number 4, "generating In Line content' does nto work. I followed all steps, seems pretty straight forward and the date does not show.


My main concern is in magersize #5: in FormDisplayServlet.java, DataInputStream.readLine() has been deprecated. I followed Sun's documentation on this method and used this instead of your solution:


BufferedReader brS = new BufferedReader(new InputStreamReader(new FileInputStream("struct.dat")));


and now I keep getting this message:


Could not open and process the file struct.dat Got error java.security.AccessControlException: access denied (java.io.FilePermission struct.dat read)



My servlet is running on another server (not my machine), and I would also like to know how to read the struct.dat file if it were in a different directory (not where my servlet is).

   <<Less

Re: The Servlets course

Posted By:   Raj_Subramani  
Posted On:   Monday, October 7, 2002 01:44 AM


To load a remote file into a servlet, take a look as cos from oreilly


Cheers

-raj

About | Sitemap | Contact