This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Servlets and the fly likes Where to put HTML files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Where to put HTML files" Watch "Where to put HTML files" New topic
Author

Where to put HTML files

subodhk
Greenhorn

Joined: Nov 01, 2000
Posts: 3
Hi,
I'm new to servlets.I was wondering where to put the HTML files(e.g a HTML form)& the servlets.Then, lets say I have a submit button on the form.Now what happens when the "submit" button is pressed?Will the servlet be invoked?Also how do I relate the HTML form with the servlet?I mean how the pressing of the submit button will invoke the correct servlet?Is there any naming registry(like RMI) which takes place behind the scene.Do the HTML file and the servlet be named alike?
Thanks
Tony Alicea
Desperado
Sheriff

Joined: Jan 30, 2000
Posts: 3222
    
    5
Since your question is very basic, I recommend some reading:
Sun Microsystems Servlet Tutorial:
http://java.sun.com/docs/books/tutorial/servlets/index.html


Tony Alicea
Senior Java Web Application Developer, SCPJ2, SCWCD
Dilip kumar
Ranch Hand

Joined: Oct 16, 2000
Posts: 360
When a submit button is clicked, the form is sent to the servlet or other program mentioned in the ACTION parameter of the FORM.
In the below code when you click on submit button the program "Myprogram" will be executed.
<html>
<body>
<form name="form1" action="http://localhost:8080/MyProgram">
<input type="submit" name="btnSubmit" value="submit">
</form>
</body>
</html>
Raj Kumar Gopal
Greenhorn

Joined: Oct 20, 2000
Posts: 6
SUBODH....
Don't worry about servlets or ejb... Go to SOLID GOLD and take a lap dance ...
Guess who .... P*****
Originally posted by subodhk:
Hi,
I'm new to servlets.I was wondering where to put the HTML files(e.g a HTML form)& the servlets.Then, lets say I have a submit button on the form.Now what happens when the "submit" button is pressed?Will the servlet be invoked?Also how do I relate the HTML form with the servlet?I mean how the pressing of the submit button will invoke the correct servlet?Is there any naming registry(like RMI) which takes place behind the scene.Do the HTML file and the servlet be named alike?
Thanks

subodhk
Greenhorn

Joined: Nov 01, 2000
Posts: 3
Dude wass up?Did u go to SOLID GOLD?Where is Pete.Trying to reach him for a while?
Originally posted by Raj Kumar Gopal:
SUBODH....
Don't worry about servlets or ejb... Go to SOLID GOLD and take a lap dance ...
Guess who .... P*****

 
GeeCON Prague 2014
 
subject: Where to put HTML files