Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call a Webpage from a applet

 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a applet. Actually it is a login page. When the user clicks the buttons it takes the text on the two text fields (username and password) and send then to a servlet





Servlet checks with the database if they are correct send back yes. otherwise no.

If the answer is no an message will come up wrong username or pass word

If the answer is yes the user must be directed to a new page

So how can I do this?
When directing it must not be a new IE same IE but a new page

And the address bar must not change two as I am passing only the user name to the new page
Thank You
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In an applet you can use the showDocument method to redirect to another HTML page based on the servlets response.
 
vidhyasagar reddy
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just read the docs for servlet applet communication

and u u can have access to the applet fields by using the AppletContext

and check availability of those fields by using the servlet

and by using the script u acan do further processing
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic