aspose file tools*
The moose likes Servlets and the fly likes how to call the html form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to call the html form" Watch "how to call the html form" New topic
Author

how to call the html form

maheshm morem
Greenhorn

Joined: Sep 23, 2010
Posts: 26
hi , i want to call the html form when the user is ligal. so what i have to do for that?
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

I don't understand this question, can you re-phrase it?


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
maheshm morem
Greenhorn

Joined: Sep 23, 2010
Posts: 26
hi,
i want to call the html page from the servlet.
the servlet validate the user so after that validate i want to disply the html page so , how i can do that?
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
Here's one way. Please respond if you need more information.
maheshm morem
Greenhorn

Joined: Sep 23, 2010
Posts: 26
will it work? how that httml will get the responce and request object and what it will do?
Vijay Bhuruk
Ranch Hand

Joined: Feb 28, 2008
Posts: 31

Do you want to pass information from servlet to html form?

As above code is to show you how to display static html page, to create dynamic html page, see JSP tutorials.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
What does "call the html form" mean anyway?

The programming sense of "call" does not appear to apply - describe the sequence of events you want to occur.

Bill
Hebert Coelho
Ranch Hand

Joined: Jul 14, 2010
Posts: 754

Hello, maheshm morem.

First you must understande what you need. Your question it is not clear.

If you only need a tutorial of a login, you can see a tutorial in my signature.

Why do you need to call a form?


[uaiHebert.com] [Full WebApplication JSF EJB JPA JAAS with source code to download] One Table Per SubClass [Web/JSF]
maheshm morem
Greenhorn

Joined: Sep 23, 2010
Posts: 26
hi sir,
i want to call the html from servlet. i am serching database of user login from servlet if the user is rigth than it goes to main page so my main page is of the html so want to call it from servlet , plese tell me how to call it?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60992
    
  65

Your use of the verb "call" is incorrect and confusing.

Are you wanting to redirect to the HTML page? Forward to it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chetan Natu
Greenhorn

Joined: Dec 03, 2005
Posts: 19
maheshm morem wrote:hi sir,
i want to call the html from servlet. i am serching database of user login from servlet if the user is rigth than it goes to main page so my main page is of the html so want to call it from servlet , plese tell me how to call it?


Hi Mahesh,

you must be writing the code to search Database for a user in some Servlet code. In that servlet code you need to add the two lines that Tom has mentioned. If at all you want some kind of a message back to the page (e.g., you want to display the username on the page), then instead of home.html you will need to use some JSP file and retrieve the data in the JSP file using custom tags or JSTL or a simple scriptlet.

How to do that in JSP? Ask the question in the JSP forum...


Never Remember the failure
Never Forget the mistake
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to call the html form