what is the difference between servlets and jsp?
Answers were Sorted based on User's Feedback
Answer / sanjay deorari
JSP is used mainly for presentation only. A JSP can only be
HttpServlet that means the only supported protocol in JSP is
HTTP. But a servlet can support any protocol like HTTP,FTP,
SMTP etc.
Is This Answer Correct ? | 15 Yes | 4 No |
Answer / j
in Servlet, presentation logic(HTML) is embedded in java
code (between out.println()). whereas in JSP, javacode is
embedded within HTML.
one more thing is while compilation, servlets will compile
and form .class file. whereas JSP will undergo a
translation phase. During which its converted into Servlet
first and the compiled to .class file.
Is This Answer Correct ? | 13 Yes | 4 No |
public class ActionSearchBean extends GenericSearchBean<ActionDTO, Long, ActionDTO> { @Override public String search() { data.setRowCount(null); if(data.getRowCount()==0){ data.getNoRecordFound().setRendered(true); data.getDataScroller().setRendered(false); } return "searchAction"; } @Override public String clear() { data.setRowCount(null); if (data.getRowCount() > 0){ data.getNoRecordFound().setRendered(false); data.getDataScroller().setRendered(true); }else{ data.getNoRecordFound().setRendered(true); data.getDataScroller().setRendered(false); } data.setModel(new ActionDTO()); data.setRowCount(null); return "searchAction"; } } what is the purpose of @Override ...what will do @Override here ?
What is containers in java?
What is external entity?
what is external varibles in jsp?
What is application client container?
What is cmp in j2ee?
What is meant by j2ee?
What is the use of method save()?
Is class a data type in java?
What is isv?
What are the advantages of object-relational mapping (orm)?
Can I run seam in a j2ee environment?