If I am using web design for SERVLET with TOMCAT.
Why I want to use JSP and JAVA.
If you are "using web design for SERVLET with TOMCAT", then you are using the computer programming language called JAVA to write your SERVLET.
A SERVLET displays html in a browser window using the println() command, and it looks like this:
out.println("<html>\n"
+ "<head>\n"
+ "<title>My html page</title>\n"
+ "</head>\n"
+ ...
+ ...
+ "</html>"
As you can imagine, outputting a whole html page to a browser like that is a big hassle: you have to put quotes around all the html and you have to add a "\n" to output the html on a newline.
Instead a SERVLET can use a JSP page to display the html. A JSP page looks like a normal html page--except that it has a few lines of
JAVA in it, for instance:
<html>
<head>
<title>My html page</title>
</head>
<body>
<% String firstname = request.getParameter("firstName"); %> <div>
<%= firstname %></div>
</body>
</html>
[ October 11, 2006: Message edited by: sven studde ]