Java
  Home arrow Java arrow Page 3 - Finishing the Project: Java Web Developmen...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Finishing the Project: Java Web Development in Eclipse and Tomcat
By: Gangyi
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 13
    2007-05-29

    Table of Contents:
  • Finishing the Project: Java Web Development in Eclipse and Tomcat
  • Create welcome.jsp
  • Run the web application in the Eclipse environment
  • What just happened?

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Finishing the Project: Java Web Development in Eclipse and Tomcat - Run the web application in the Eclipse environment


    (Page 3 of 4 )

    Now we have the simplest web application consisting of a static HTML page and a JSP of mixed Java code and static HTML content. Now we can test out the new dynamic Web project from Eclipse within its integrated Tomcat server environments.

    Highlight login.html, then from the context menu, select Run As -> Run on Server

    The previously defined Tomcat 5.0 server environment is displayed. Click finish

    Now the web component is running under the Tomcat environment and the login.htm screen page is displayed in Eclipse's built-in browser.

    Enter "user" as User name and "pass" as Password then click the login button. You'll see the following content:

    Welcome aboard user!

    Click login button

    As we explained before in login.html's code:

    <form action="welcome.jsp" method="post">

    It takes you to the welcome.jsp page and the message is displayed.

    Press the browser's back arrow, Clear the User name and Password fields then click the login button, and you'll see

    Wrong username / password

    This message results from the following code from welcome.jsp:

    <%if(!(username.equals(secreteUser) || password.equals(secretePass))) {%>
     
    Wrong username / password
    <%} else {%>
     
    Welcome aboard <%=username%>!
    <%}%> '

    More Java Articles
    More By Gangyi


       · as per your article "Getting Started with Java Web Development in Eclipse and...
     

    JAVA ARTICLES

    - Deploying Multiple Java Applets as One
    - Deploying Java Applets
    - Understanding Deployment Frameworks
    - Database Programming in Java Using JDBC
    - Extension Interfaces and SAX
    - Entities, Handlers and SAX
    - Advanced SAX
    - Conversions and Java Print Streams
    - Formatters and Java Print Streams
    - Java Print Streams
    - Wildcards, Arrays, and Generics in Java
    - Wildcards and Generic Methods in Java
    - Finishing the Project: Java Web Development ...
    - Generics and Limitations in Java
    - Getting Started with Java Web Development in...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT