This week's book giveaway is in the Security forum.
We're giving away four copies of Securing DevOps and have Julien Vehent on-line!
See this thread for details.
Win a copy of Securing DevOps this week in the Security forum!

pravallika reddy

Greenhorn
+ Follow
since Feb 24, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pravallika reddy

hi All,
i want to download file from linux server using FTP/SFTP.i need help in java related like JSP,RMI like
so on..
or can u suggest me in perl Net::FTP/SFTP.
urjent..
bye
THANKS & REGARDS
sirisha
16 years ago
hi!!
how to show progress/status for uploding a file using jsp ,linux and tomcat.
plz help me
Thanks & Regards
sirisha
16 years ago
hi!!
how to show progress/status for uploding a file using jsp ,linux and tomcat.
plz help me
Thanks & Regards
sirisha
16 years ago
JSP
hi ,
how to set max java heap size through jsp application.i am doing on linux and using tomcat.
plz help me .it is badly need.
thanks in adv
sirisha
16 years ago
hi ,
when ever i am uploading i am getting error like internal server error.i tried to download and install jsp smart upload.it is giving error.
any boby help me..
thanks i adv
sirisha
16 years ago
hi
i am getting internal server error.when ever uploading an existing file of more than 3kb.i am using tomcat on linux with jsp.i want upload big size file.
bye
sirisha
16 years ago
JSP
hi Bill!!
thanks...i believe u..
then how to include servlet in my jsp file and how to set content type in servlet..
please let me..
thanks in adv
pravi

Originally posted by William Brogden:
I already told you this in the servlet area!
JSP is designed to send characters. Your code is sending characters where the browser expects binary. Images must be sent in binary, therefore you should be using a servlet to handle image requests.
Didn't you believe me or what???
I just can not understand why people will keep doing this. There is no reason to be afraid of servlets - servlets are your friends.
Bill

16 years ago
JSP
hi
i am unable to see image after downloading.file is downloading..
i am doing this in jsp.
help me my code is..
user=request.getParameter("user");
filename=request.getParameter("path");
response.setContentType("application/x-filler");
try
{
String downloadFile = "/usr/tomcat/webapps/ap123/users/"+user+"/"+filename;
response.setHeader("Content-Disposition","attachment;filename="+filename);
BufferedInputStream fif = new BufferedInputStream(new FileInputStream(downloadFile));
int data;
int i = 0;
while((data = fif.read()) != -1)
{
out.print((char)data);
// flushBuffer();

}
fif.close();
}
catch(Exception e) { e.printStackTrace(); }
thanks
pravi
16 years ago
JSP
hi..
my problem is,when ever i am uploading an existing document on the server.iam gettig internal servererror .i am getting this only for those files r having size more than 3kb.below 3kb.
it is working fine.
i am using linux server.coding part is in jsp.
my code is below..
code:
user=(String)session.getValue("username");
try
{
int i=0,conlen=0;
conlen=request.getContentLength();

InputStream is=request.getInputStream();
DataInputStream dis=new DataInputStream(is);
String id=dis.readLine();
while(!((str=dis.readLine()).equals("")))
{
if(str.indexOf("filename=")>0)
{
name=str.substring(str.indexOf("filename=")+"filename=".length());
String ff=name;
session.putValue("fullname",ff);
conlen=name.lastIndexOf('/');
if(conlen<0)
conlen=name.lastIndexOf('\\');
if(conlen <0) conlen=0;
//out.println("the index :"+conlen+"<br>");
name =name.substring(conlen+1,(name.length()-1));
name=name.replace(' ','_');
session.putValue("file",name);
}
}
rs=docs.displayFiles(user);
while(rs.next())
{
filename=rs.getString(1);
int c=filename.compareTo(name);
out.println("after compare");
if(c==0)
{
out.println("equal");
session.putValue("file1",name);
out.println("in if"+name);
%>
<jsp:forward page="UploadOptions.jsp" />
<%
}
}
fos=new FileOutputStream("/usr/tomcat/webapps/ap123/users/"+user+"/"+name);
byte b[]=new byte[1024];
while(true)
{
i=is.read(b);
if(i<0) break;
conlen=new String(b).indexOf(id);
if(conlen <0)
fos.write(b,0,i);
else
fos.write(b,0,conlen);
}
is.close();
fos.close();
}catch(Exception e){}

thanks
siri
16 years ago
i want to download images of any type from the server.my server is unix based.i need help help in coding.what should i give as content type in the response of jsp.
i am using jsp.
i had given image/jpg or image.gif as content type.but it is giving error as no preview parameters.
help me..
thanks
pravii
16 years ago