why ,we are using jsp and html.which one is better?
Answers were Sorted based on User's Feedback
Answer / sivasubramanian.k
JavaServer Pages (JSP) is a Java technology that allows
software developers to dynamically generate HTML, XML or
other types of documents in response to a Web client
request. The technology allows Java code and certain pre-
defined actions to be embedded into static content.
The JSP syntax adds additional XML-like tags, called JSP
actions, to be used to invoke built-in functionality.
Additionally, the technology allows for the creation of JSP
tag libraries that act as extensions to the standard HTML
or XML tags. Tag libraries provide a platform independent
way of extending the capabilities of a Web server.
JSPs are compiled into Java Servlets by a JSP compiler. A
JSP compiler may generate a servlet in Java code that is
then compiled by the Java compiler, or it may generate byte
code for the servlet directly. JSPs can also be interpreted
on-the-fly reducing the time taken to reload changes.
So JSP is better than HTML as it contains both static and
dynamic content..
| Is This Answer Correct ? | 10 Yes | 1 No |
jsp is used for both static and dynamic contents in web
applications. But html is only for static contents.
So, as per my knowledge jsp is better than html
| Is This Answer Correct ? | 8 Yes | 0 No |
what is difference between business delegate and data access object(dao)? in java?
What are the drawbacks for singleton class?
What is a platform?
Write a program in java to establish a connection between client and server?
My interview asked what is dynamic variable in java and where we use them.
How many characters is 16 bytes?
What is io stream in java?
What is a singleton class in Java?
What is use of set in java?
What is the exact difference in between unicast and multicast object? Where we will use?
What will happen inside init() in servlet. my interviewer asked servlet lifecycle. i said "once servlet is loaded in to memory init() will be called which performs servlet initialization " . Again interview asked what values will be initialized . what is difference between init() and init(ServletConfig config).
2 Answers Infinite Computer Solutions, TCS,
11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.