aspose file tools*
The moose likes Servlets and the fly likes Which one to choose Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Which one to choose" Watch "Which one to choose" New topic
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: 6920
"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.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
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: 6920
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Which one to choose
 
Similar Threads
some general queries
nanananananana
i am a green horn now, how can i get upgrade?
Unidirectional & Bi directional
WA #2 ..... word association