Finishing the Project: Java Web Development in Eclipse and Tomcat (Page 1 of 4 )
Last week, I introduced you to some of the fundamental concepts you need for working with Java web components. For this project we'll be working with JSP and servlets. I walked you through getting the appropriate downloads installed and setting up your work space. We stopped after just creating the web project. In this part, we will add our content, including HTML, JSP, and servlets.
Let's pick up where we left off by creating the login.html page.
Create login.html page
Highlight project name: JavaWebDev_Tutorial_1, then from context menu, select new -> HTML

Enter login.html as file name from HTML page wizard. You should also highlight where you want to put the file, which is WebContent in our example.

Click Finish. The context panel of login.html should open. Type the following HTML in and save:

At this point, you only need to pay attention to the form's action pointing to the welcome.jsp file that will be created next. When the login button clicked, it'll take you to the welcome.jsp page.
<form action="welcome.jsp" method="post">
User name: <input type="text" name="username">
Pass word: <input type="password" name="password">
<input type="submit" value="login">
</form>
Next: Create welcome.jsp >>
More Java Articles
More By Gangyi