• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Java Script

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone!,
Im designing a html login page using javascript .This is how it goes:

If there's anything wrong with the fields(as in fields not filled etc), the verification takes place at the client end using java script.

But, if everything is ok, i want to pass the control to a servlet where the jdbc part takes place.
Now my question is : how do i pass the control from the html page to the servlet?


thanks a lot.
regards,
ravissant
[ February 19, 2007: Message edited by: Bear Bibeault ]
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. You can connect it to a servlet by mentioning the name of that particular servlet like 'action= yourservlet' in the form tag of your html.

Write the jdbc code in the appropriate doGet or doPost method and forward to a jsp or html.


 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ravissant Markenday,
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseAMeaningfulSubjectLine

Again, welcome to JavaRanch and good luck with your question.
-Ben
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nothing to do with servlets (the fact that your URL will address a servlet is moot). So this has been moved to the HTML forum
 
Bear Bibeault
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Ravissant Markenday:

If there's anything wrong with the fields(as in fields not filled etc), the verification takes place at the client end using java script.



And you are re-validating the data on the server, right?

how do i pass the control from the html page to the servlet?



The same way that you would any other server-side resource: forms, links or using Javascript. There's nothing special about servlets. They're just like any other server-side resource.
 
Ravissant Markenday
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Raghu, Ben ,Bear!
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic