chebolu dinesh kumar

Greenhorn
+ Follow
since May 17, 2018
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 chebolu dinesh kumar

   Hi all,
   
              I am recently started learning drools, implement a small application and when the fire the rule it send a an alert to subscribers everything works fine.
            now i am looking for some example like when the other application send a continuous events to drools at the time when the condition satisfies it will trigger the rule . any suggestions and how can i implement that?




 Thanks in advance
3 years ago



 Thanks for the help, for information i am trying client-server too. but without client permission i want to send that message is it poosibe?

Tim Moores wrote:What kind of message? Using what kind of protocol?




 file available please download. I do not  know what kind of protocol. i refer some sites most of the said using sockets . Is it possible with sockets ?if yes how can i proceed.

Thanks
Hi all,

      I am creating a small servlet program for uploading file int ftp server. i want to send a message to another system for downloading that file .how can i send a message to another system(IP). any one please give ideas or suggestions.

Thanks in advance

while upload a file from Ui and click upload button i got java.lang.ClassNotFoundException : classname and HTTP status 500 internal error

 I am implementing a servlet program i am not facing any  errors.while upload the file and submit the button i got errors

my servlet code :
 
 


can anyone help me on this ? can anyone review what i am wrong and what i need to change the code?
Thanks in advance

SunilK Chauhan wrote:From the code shown above, it's unclear that where saved file is stored in JSP page and how it is diverted to JAVA code.




    hi chauhan, with that above code i am successfully stored the file in ftp server . i am using filezilla as a ftp server.but i need to upload a file from UI and click the upload button after that file will be stored in ftp server.because of that i am using jsp but i am unable call the file path from jsp page.i dont have much knowledge on jsp can you help me? Thanks
Thanks for the reply.can you explain some more details ?
Hi all, I am trying to upload a file over ftp server using java and i am successfully uploaded.but my approach is when the user browse the file and after submit it will be stored in server. i am trying many times but i am unable to get exactly.any one can help me on this? Thanks in advance

my java code:
 
                   public static void main(String[] args) {
                   String server = "localhost";
                   int port = 21;
                   String user = "admin";
                   String pass = "password";
                   FTPClient ftpClient = new FTPClient();
                   try {
                   ftpClient.connect(server, port);
                   ftpClient.login(user, pass);
                   ftpClient.enterLocalPassiveMode();
                   ftpClient.setFileType(FTP.BINARY_FILE_TYPE);
                   File firstLocalFile = new File("C:\\Users\\demo\\example.txt");
                   String firstRemoteFile = "example.txt";
                   InputStream inputStream = new FileInputStream(firstLocalFile);
                  boolean done = ftpClient.storeFile(firstRemoteFile, inputStream);
                  inputStream.close();
                  if (done) {
                  System.out.println("file is uploaded successfully");
                  }
                  } catch (IOException ex) {
                  System.out.println("Error: " + ex.getMessage());
                  ex.printStackTrace();
                 } finally {
                  try {
                if (ftpClient.isConnected()) {
                ftpClient.logout();
                ftpClient.disconnect();
                }
                } catch (IOException ex) {
                ex.printStackTrace();
                }
                }
                }

       
jsp code :

             <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
             pageEncoding="ISO-8859-1"%>
             <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
             <html>
             <head>
             <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
             <title>UPLOAD FILE</title>
              </head>
              <body>
             <center>
              <h1>Upload File Form</h1>
               <form action="FTPUploadFileDemo" enctype="multipart/form-data" method="post" accept = ".txt">
               Select<input type="file" name="file2" /><br>
               <input type="submit" value="upload" />
                </form>
               <%
               String file_name=(String)request.getParameter("filename");
              if(file_name!=null){
                out.println("File uploaded successfuly");
               }
                 %>
           </center>
            </body>
          </html>      


 please any one can help me or suggest me what i need to change?