简体   繁体   中英

How to send data java and html

code JAVA

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.InputStreamReader;

public class test{

     public static void main (String[] args)throws Exception{
     demoReadall();
     }

     public static void demoReadall(){
          String dates;
          String res;
          String status;
          try{
               FileInputStream fstream = new FileInputStream("RunningSystem.log");
               BufferedReader br = new BufferedReader(new InputStreamReader(fstream));
               String strLine;
               
               while ((strLine = br.readLine()) != null)  {
                String[] LineArray = strLine.split("\\|");
                if("BATCH_PAYMENT".equals(LineArray[1])){
                    dates = LineArray[2];
                    res = LineArray[3];
                    status = LineArray[4];    
                System.out.println(dates);
                System.out.println (res);
                System.out.println (status);
                }
               }
               fstream.close();
            } catch (Exception e) {
                 System.err.println("Error: " + e.getMessage());
            }
     }
}

How do you write the front-end code to retrieve information about this code? Please bother me. I would like to know how to send java and html data, please advise writing and sending data.

Read about.jsp, servlets or Spring framework;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM