1

Possible Duplicates:
What is the difference between JSF, Servlet and JSP?
JSP Servlet and Web Programming

When it comes to the open-source Java Platform, Enterprise Edition (Java EE) application server, how would you characterize the difference between:

  • JSP
  • Servlet

While both are able to generate dynamic Web content, I am unsure about how they differ and/or how on pertain to the other.

5
  • -1 - poorly phrased question. I know that English is not the OP's first language, but surely he could have made a better effort than that! Commented Jul 20, 2010 at 5:58
  • Couldn't you just edit it to fix it? I would if I had the rep... Commented Jul 20, 2010 at 6:38
  • @Catchwa - it is the OP's responsibility to do that. Honestly, if he had made >>>some<<< effort, I wouldn't have down-voted his question. Commented Jul 20, 2010 at 7:07
  • I hope the question may be a bit clearer, although a/ I am not a native English writer ;) b/ I made the edit mainly to use the word "pertain". Such an odd word. Commented Jul 20, 2010 at 7:08
  • 2
    @stephen either 1) edit his question to help him or 2) move on. No need to -1 someone struggling to cross a language barrier. Commented Jul 20, 2010 at 13:25

2 Answers 2

4

JSP is Java Servlet Pages and usually used in rendering HTML/XHTML pages. To me, it's a PHP clone. JSPes will be translated and compiled to Servlet classes eventually.

Servlet on the other hand is a class conforming to the Servlet API, to process HTTP requests, such as GET, POST, etc.

You can read more about Servlet API and its documentation here.

Sign up to request clarification or add additional context in comments.

Comments

0

I suggest you to read this DevX article discussing Servlet and JSP. If you want to know still some more... Go for this and this Wiki

1 Comment

A servlet is a java class where we could generate HTML code, while JSP is a sort of HTML page where we can write JAVA code. so JSP come handful when we wanna show the views of the application while the purpose of Servlets is handling the HTTP requests / Logic of the app, it plays the role of the controller of the app.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.