wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Error 92 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Error 92" Watch "Error 92" New topic

Error 92

sojan chandy

Joined: Mar 18, 2007
Posts: 24
i was tring to upload a file, i don kno why its not working. can any body help me in finding what actually the mistake is?

FileUpld.java 14: illegal character:\92
out.println("file upload success" <a href=\"/jspbook/files/");

package com.jspbook;
import java.util.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import org.apache.commons.fileuploads.*;

public class FileUpld extends HttpServlet {
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws IOException,ServletException{
PrintWriter out=res.getWriter();
out.println("file upload success" <a href=\"/jspbook/files/");
out.println("\">Click here to browse");
ServletContext sc= getServletContext();
String path=sc.getRealPath("/files");
org.apache.commons.fileuploads fu = new org.apache.commons.fileuploads.FileUpload();

List l=fu.parseRequest(req)
Iterator i=l.iterator();
FileItem fi=(FileItem)i.next();
catch (Exception e)
throw new ServletException(e);

public void doGet(HttpServletRequest req,HttpServletResponse res)
throws IOException,ServletException

tnx in advance
[ March 25, 2007: Message edited by: sojan chandy ]
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
I think you missed a ". You have to escape each one if it's in a String.
It is sorta covered in the JavaRanch Style Guide.
subject: Error 92
Similar Threads
Has anybody FileUpload.class containing setSizeMax() method?
Detailed description for william : regarding JAR files
Please tell the reason for errors in the code. CODE and Errors given
problem in using Servlet API for file upload
Where to place the jar files