About updating only one jsp page html tag

Asked

Viewed 91 times

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 is a getParameter that takes this field. The problem is that this should be done as ajax. The guy types and appears there on the page. But the way the application is opening another page and inserting 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.");
      }
  • "That question is not duplicate this one?"

  • I didn’t understand your comment... Mine was really a question.

  • @gonz Are you using div in the html part ? Why if yes, it is already easier to solve your problem.

  • I’m using a div

  • Explain to me more

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.