Request object in classes
I have this code before , below in jsp format...I want to fit it into a java class file.There are request objects in this jsp..When i try to fit that code in a class compiler doesnt recognize request object...So how am i going to write this request object here...?
Please show me a way... Do I must use servlet or create a Http Request object and how?
thank you
klasor_adres="C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\albumyap\\WEB-INF\\album_arsiv\\deneme\\"+klasor_adres+"\\";
String resim_adi="";
// look at the line below request object
boolean isMultipart = FileUpload.isMultipartContent(request);
if(!isMultipart)
System.out.println("multipart deil");
else
{
DiskFileUpload upload =new DiskFileUpload();
List items = upload.parseRequest(request);
Iterator iter = items.iterator();
while(iter.hasNext())
{
FileItem item=(FileItem) iter.next();
if(!item.isFormField())
{
resim_adi=String.copyValueOf((klasor_adres+item.getName()).toCharArray(),(klasor_adres+item.getName()).lastIndexOf("\\")+1,(klasor_adres+item.getName()).length()-(klasor_adres+item.getName()).lastIndexOf("\\")-1);
File uploaded =new File(klasor_adres+resim_adi);
item.write(uploaded);
out.println(resim_adi);
}
}
}

