Results 1 to 1 of 1
-
Creating a File object in Servlet
The code sample below can be places in a Servlet to create a File object of the path supplied by the HTML caller form.
Java Code:PrintWriter out = res.getWriter(); String selectedImg = req.getParameter("imagepath"); File file = new File (selectedImg); out.println("File size is :" + file.length());
Similar Threads
-
Creating a Comparable object
By Java Tip in forum java.langReplies: 0Last Post: 04-15-2008, 07:38 PM -
Need help with creating array of type object
By riz618 in forum New To JavaReplies: 3Last Post: 01-29-2008, 06:14 AM -
Creating Document object for XML parsing
By Java Tip in forum Java TipReplies: 0Last Post: 11-19-2007, 04:12 PM -
Creating object of Type Object class
By venkatv in forum New To JavaReplies: 3Last Post: 07-17-2007, 03:33 PM -
OutOfMemoryError while creating a new object of file with size more than 150 MB
By Jamie in forum Advanced JavaReplies: 1Last Post: 05-20-2007, 08:52 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks