About updating only one html tag from jsp page

0

I have a JApplet application it has a button that when clicking it takes the data typed in the textfield and plays in a url that is an index.jsp and there has a getParameter that takes that field. The problem is that this should be done as ajax. The guy types and appears there on the page. Except that the way the application is opening another page and entering the value in it. Someone help me?

 public void actionPerformed(ActionEvent ae){ 

        // String to get the user input texts 
        //String str1 = (this.key_text1.getText());

      String nome = this.textfield.getText();
      System.out.println(nome);
      //aqui eu envio para a servlet.
      String path = "index.jsp";
      try{
          URL url = new URL(getDocumentBase(),path+"?nome="+nome);
          getAppletContext().showDocument(url);
          System.out.println(url);
      }catch(MalformedURLException e){
          showStatus("Não encontrado.");
      }
    
asked by anonymous 15.06.2016 / 18:28

0 answers