| Author |
Which one to choose
|
rudhras
Greenhorn
Joined: Feb 26, 2001
Posts: 10
|
|
Hi Can any one say under what circumstances we should use Jsp or Servlets as appropriate ...
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
|
|
"rudhras", The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please choose a new name which meets the requirements. Thanks.
|
A Convergent Visionary ~ Frank's Punchbarrel Blog ~ LinkedIn profile
|
 |
Sandeep Jain
Ranch Hand
Joined: Oct 25, 2000
Posts: 124
|
|
Hello there , Dynamic generation of html in servlets is a very tedious job ,So we use jsp basically for that .Besides this jsp's are much faster than the servlets .Only for the first time they take some time but once it is over , from next request its very fast. ------------------ Sandeep Jain
|
Try and Try Till u succeed<br /> <br />Sandeep Jain
|
 |
Frank Carver
Sheriff
Joined: Jan 07, 1999
Posts: 6913
|
|
This is a peculiar bit still surprisingly popular misconception. A JSP is compiled to a servlet, so it is a servlet. There is no way a JSP can be faster than a servlet doing the same job. Also remember that page compilation (from JSP for example) is not the only way to get rid of printing a lot of HTML from a servlet. For many uses, a template processing system (such as WebMacro, Velocity or FreeMarker) is a better and more flexible solution. Also many systems are now generating XML and processing it through a stylesheet for transformation into HTML.
|
 |
 |
|
|
subject: Which one to choose
|
|
|