Hi guys i just want to know the main differnce between servlets and JSPs? If the Jsps are converted to servlets, why not directly write servlets?? Is there any other reason , than JSPs being more easier to write?? Wating for a response Thankx in advance neeti
Hi, JSP defines clearly application programmers and Html art worker responsibilities. Let us assume that you develop java servlets that tells user saying thankyou(A) later you want to change that to thankyou very much(B). if you use servlets in both A and B then you need to compile java code and stop server and uplaod new version of code if you use jsp you don't have to re compile and stop server and upload the program. Thanks Vetri Selvi
Hi Neeti, If you work with straight Java servlets, you have to deal with HTTP input and HTML output from within Java classes, and you need significant Java experience to build complex applications. With JSP thrown into the mix, you can separate your HTML presentation logic from the more complex business logic embedded in servlets. This means that developers who are experienced with scripting can write the presentation code while more experienced Java developers can focus on solving complex problems in servlets and beans. JSP can be used with or without Java programming knowledge. In fact, JSP contains a few server-side tags that make it possible to display dynamic data without writing a single line of Java code. You can access beans directly to perform operations and then use JSP tags to display results as dynamic content. You can also use servlets that generate beans which hold results of the servlet operations, and again use JSP tags to display the results without requiring Java coding in the JSP page.