File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get input from javascript and pass to servlet

 
dineshiop kumar
Greenhorn
Posts: 13
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
could any body say me how to get input from javascript and pass to servlet

i would like to get the username and password into servlet
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You don't need to pass this from JavaScript, the values are in your form. Once you've submitted this form you will be able to read them off the request.
 
Leinad Jan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,


If you want to send your data to a servlet, you'll need a form. In your form, you will declare an action. The action should be the path to your servlet.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Leinad Jan wrote:If you want to send your data to a servlet, you'll need a form.

He already has a form.
 
Leinad Jan
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:
Leinad Jan wrote:If you want to send your data to a servlet, you'll need a form.

He already has a form.


Yes, he does have a form, but it has no action. If you have no action, you can't send your form away.
 
Carol Enderlin
drifter
Ranch Hand
Posts: 1364
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see username or password in any of that code.
 
sree_prasad
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code does not contain any username and password that needs to be submited.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic