Signup · Login
Stardeveloper.com  
Home · Tutorials · Forums · Web Hosting Plans · Faisal Khan's Blog · Contact
Search Stardeveloper.com
Stardeveloper RSS Feed
Newsletter
Enter your email address below to be informed every time a new article is posted at Stardeveloper.com:

You can follow Faisal Khan on Twitter
Article Categories
.NET  .NET
  ASP (16)
  ASP.NET (41)
  ADO (16)
  ADO.NET (10)
  COM (6)
  Web Services (4)
  C# (1)
  VB.NET (3)
  IIS (2)

J2EE  J2EE
  JSP (15)
  Servlets (9)
  Web Services (1)
  EJB (4)
  JDBC (4)
  E-Commerce (1)
  J2ME (1)
  Products (1)
  Applets (1)
  Patterns (1)
Log In
UserName Or Email:

Password:

Auto-Login:

Miscellaneous Links
  Submit Article

Hosted by Securewebs.com
 
Home : J2EE : JSP : Installing, Configuring, & Running Tomcat 6.0 Servlet Container on Microsoft Windows, and Developing & Running your first JSP Page
 

Explanation
Above page appears to be a simple HTML page except one line of Java code between the <% and %> tags. These work the same way as <% %> tags in ASP. You can add server side Java code between these tags. In this case we simply declared a variable 'name' of type String ( simple text ) and initialized it with a value of "Faisal Khan", you can substitute your own name if you want.

<%
	String name = "Faisal Khan";
%>

Next we display the value of 'name' variable to the user.

<p>Hello <%= name %>!</p>

Start Tomcat server and point your browser to http://localhost:8080/star/index.jsp to see the JSP page running.

http://localhost:8080/star/

Summary
In this article I introduced JSP as a new, efficient, scalable and secure technology to develop web applications. I then walked you through the steps of downloading and installing Tomcat 6.0.14. Tomcat is Java web container ( Servlet Container and JSP Engine ) available for free from Apache Software Foundation. In the end we built and tested a simple JSP page 'index.jsp'.

Explanation
Above page appears to be a simple HTML page except one line of Java code between the <% and %> tags. These work the same way as <% %> tags in ASP. You can add server side Java code between these tags. In this case we simply declared a variable 'name' of type String ( simple text ) and initialized it with a value of "Faisal Khan", you can substitute your own name if you want.

<%
	String name = "Faisal Khan";
%>

Next we display the value of 'name' variable to the user.

<p>Hello <%= name %>!</p>

Start Tomcat server and point your browser to http://localhost:8080/star/index.jsp to see the JSP page running.

http://localhost:8080/star/

Summary
In this article I introduced JSP as a new, efficient, scalable and secure technology to develop web applications. I then walked you through the steps of downloading and installing Tomcat 6.0.14. Tomcat is Java web container ( Servlet Container and JSP Engine ) available for free from Apache Software Foundation. In the end we built and tested a simple JSP page 'index.jsp'.


Previous ( 1 Gone )( No Further Pages )

See all comments and questions (post-ad) posted for this tutorial.


Related Articles
  1. Sending E-Mails with JSP Pages
  2. Examining Java Server Pages in detail
  3. Exception Handling in JSP Pages
  4. Introducing JavaServer Pages
  5. Professional JSP
  6. Combining Servlets, JSP, and JavaBeans
  7. Google on your WAP phone using Java Server Pages

Comments/Questions ( Threads: 20, Comments: 42 )
    Contains 1 or more replies by the Author of this Article.
    Contains 1 or more replies by Faisal Khan.

  1. installation of apache tomcat-6.0.14
  2. After installing Tomcat 6.0 using this Tutorial, problem with Displaying Records Tutorial
  3. getting error while running startup.bat file ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  4. actually what is application and web servers? ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  5. xml file generation ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  6. data base connection with java bean and and use this connection in jsp,servlet? ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  7. Servlets ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  8. Editing The Tomcat Default page ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  9. Error when am editing server.xml ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  10. need help ( 2 Replies ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  11. How to count the number of Users visited by Website ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  12. Running Tomcat 5.0.27-beta for the first time ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  13. How to generate .jsp file ( 2 Replies ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  14. javax.mail error ( 1 Reply )
  15. description The requested resource (/star/index.jsp) is not available. ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  16. Same Tomcat problem ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  17. run .jsp file ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  18. Connecting Database file ( MS Access )with JSP , using Tomcat Server ( 1 Reply ) This thread contains 1 reply by the Author of this Article. This thread contains 1 reply by Faisal Khan.
  19. Need help: Tomcat install problem.... ( 1 Reply )
  20. HELP: TOMCAT INSTALL PROBLEM ( 3 Replies ) This thread contains 2 replies by the Author of this Article. This thread contains 2 replies by Faisal Khan.

Post Comments/Questions

In order to post questions/comments, you must be logged-in. If you are not a member yet, then signup, otherwise login. Once you login then come back to this page and you'll see a form right here which will allow you to post comments/questions.

Please note, one of the benefits of signing up is to be notified immediately by email everytime you receive a reply to the thread you have subscribed to.

 
© 1999 - 2009 Stardeveloper.com, All Rights Reserved.