sasi kals

Greenhorn
+ Follow
since Apr 16, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by sasi kals

No i have div contenteditable ... so we can edit text in to it.. so i need to do spell check for that..
hi i need a spellchecker in jsp... i need to spell check the content in div..

Please help me ... thanks in advance..
Hi i want to upload a file to remote system server.i am using tomcat server i can do it in a single system.

if i run a server in one system and i am accessing the server through its URL from the remote system to upload the file but it saying the file name is not available.

but now i want to make it possible with in the remote system i am struggling towards it can any one please help me...?

thanks in advance.
15 years ago
JSP

sasi kals wrote:Hi i want to upload a file to the tomcat webapps i done like below

<code>

<%@ page import="java.util.*,java.io.*"%>
<%
String path = request.getParameter("filename");
String newPath = "";
int count = 0;

if (path != null) {
ArrayList arr = new ArrayList();
StringTokenizer st = new StringTokenizer(path, "\\");
while (st.hasMoreTokens()) {
arr.add(count, st.nextToken());
count++;
}
String Path = request.getRealPath("");
System.out.println("------------->" + Path);
newPath = Path + "\\upload\\" + arr.get(count - 1);
int c;
FileInputStream fis = new FileInputStream(path);
FileOutputStream fos = new FileOutputStream(newPath);
while ((c = fis.read()) != -1) {
fos.write((char) c);

}
fos.flush();
fos.close();

}
out.println("1.File Uploaded from :: " + path);
out.println("<br>");
out.println("<br>");
out.println("2.Uploaded File is Saved in :: " + newPath);
%>
</code>
And this is running well in a single system. but i want to do it with many client.

like when the tomcat is running in one system. now i want to upload a file from some other system to the that system where tom cat is running.please help me ..

thanks in advance..

15 years ago
JSP
Hi i want to upload a file to the tomcat webapps i done like below



<%@ page import="java.util.*,java.io.*"%>
<%
String path = request.getParameter("filename");
String newPath = "";
int count = 0;

if (path != null) {
ArrayList arr = new ArrayList();
StringTokenizer st = new StringTokenizer(path, "\\");
while (st.hasMoreTokens()) {
arr.add(count, st.nextToken());
count++;
}
String Path = request.getRealPath("");
System.out.println("------------->" + Path);
newPath = Path + "\\upload\\" + arr.get(count - 1);
int c;
FileInputStream fis = new FileInputStream(path);
FileOutputStream fos = new FileOutputStream(newPath);
while ((c = fis.read()) != -1) {
fos.write((char) c);

}
fos.flush();
fos.close();

}
out.println("1.File Uploaded from :: " + path);
out.println("<br>");
out.println("<br>");
out.println("2.Uploaded File is Saved in :: " + newPath);
%>
And this is running well in a single system. but i want to do it with many client.

like when the tomcat is running in one system. now i want to upload a file from some other system to the that system where tom cat is running.please help me ..

thanks in advance..
15 years ago
JSP