diif b/w servlets and jsp
Although i know jsp and servlets up to some extent, but i have some confusion i know the advantages of jsp over servlets!but the problem is that can any one tell me what are the advantages of servlets over jsp. I think servlets may b quick but please reply. Bye :)
Re: diif b/w servlets and jsp
We already discuss about this....Goto the following URL....It may be helpful to you...
[url]http://www.geekinterview.com/talk/1797-why-we-shift-servlet-jsp.html[/url]
------------------
suresh
Re: diif b/w servlets and jsp
hi suresh
I think so u have got it wrongl,but my question was
ADVANTAGES of SERVLETS over JSP ?(and not vice versa)
the link provided by you tells the advantages of JSP ,but not to my question
During an interview,the interviewer asked me to tell advantaes of SERVLETS over JSP?
Bye:)
Re: diif b/w servlets and jsp
I think in JSP, they acheive all the goals of servlet.....
According to my knowledge i hava only one difference.
"Servlets are faster than jsp". (Sorry for the wrong post)
------------------
suresh
Re: diif b/w servlets and jsp
hi suresh
its fine! no need to be sorry.
but plz see my first post, where i have written the same thing which u have written now i.e "servlets are faster than jsp".
(I have written in my post that "servlets are quick".)
I told the interviewer the same thing i.e when we save JSP program then v save it as .jsp .So i told him that JSP take more time since .jsp is converted to .java.
But then interviewer told me (and rightly so)that this will happen only ONCE, i.e once .class file is formed then this is not a problem. Then i didnot knew any other differences.
Anyway if u get one ,then plz do tell me
bye
:)
Re: diif b/w servlets and jsp
hi kalayama
(please read the previous posts too)
I think you can explain this topic more!So asking you. I asked from many
but iam not sure what exact answer.One told that in servlets we dont have unnecessary coding! is it correct?
Also if you know some other points, then please tell me!
bye
:D
Re: diif b/w servlets and jsp
[quote] java server pages (jsp) is basically sun's answer to microsoft's active server pages (asp). They work in very similar ways. Asp allows for vbscript, jscript, or perlscript code to be placed in between sections of html. Jsp does the exact same thing only using java as the language of choice. Both asp and jsp combine the design (html) and the code (asp or jsp) in the same file.
Java servlets are a java equivalent of a cgi script. Like cgi it can generate html, but it does not allow for html to live in "raw" form within the program. Servlets can be used to process a set of instructions and then return the values that were created by the servlet.
Jsp also supports "tag libraries" these are simple tags that you embed in your jsp, which execute java code that is stored in a separate class. This allows you to keep your keep complex page logic encapsulated in separate classes, while keeping your jsp pages "clean", and free of java code. By doing this, you keep the page design in the jsp, and the page logic elsewhere. This makes it easier to develop and maintain your pages. In addition to writing your own tag libraries, you can also obtain free open-source tag libraries to perform various functions.[/quote]
[url=http://www.faqts.com/knowledge_base/view.phtml/aid/3827/fid/165]FAQTs - Knowledge Base - View Entry - What is are the differences between Java Server Pages and Java Servlets?[/url] cheers! kalayama
Re: diif b/w servlets and jsp
the main differerence is in servlets we must use java code completely.where as in JSP ni need ti use java code.without knowing about java we can devolop JSP's.And also we use JSP's kto kdesign user interface screens where as servlets we write internal logic of the application......bye chary.
Re: diif b/w servlets and jsp
even though jsp is converted into servlet only once, the time require to dovelepe a jsp takes very less time than doveloping a servlet, but performance wise servlets are first over jsp
but majority of doveloperd preferedf jsps because of two reasons
1.time required to dovelope jsp is takes less time than servlet
2.so, overall dovelopement time and cost can be redused
3.in majority of cases the performance level expected by clients can achived by jsps
Re: diif b/w servlets and jsp
One of the main difference between Jsp and Servlets is content separation. ie. static content and dynamic content can be separated in Jsp not as servlet