6

I am trying to understand what's the correspondent of servlets and applets in PHP but I don't have much experience in JAVA.

I want to know what is the equivalent of Java Servlets and JSP in PHP ?

2 Answers 2

8

In Java the Servlet delivers the web page to the client. In PHP there are multiple web server which delivers the same functionality:

  • Apache2
  • NginX
  • lighttpd

The PHP script is similar to JSP. It was designed to be used as template.

However overtime PHP was used more and more also not only for templates. In the last year there are appearing new approaches where PHP is used to write an entire web server. E.g.

  • appserver.io
  • reactphp
Sign up to request clarification or add additional context in comments.

Comments

0

I think the equivalent of Java Servlets and JSP is PHP.

Taken from Wikipedia - https://en.wikipedia.org/wiki/Java_Servlet:

"The servlet is a Java programming language class used to extend the capabilities of a server. Although servlets can respond to any types of requests, they are commonly used to extend the applications hosted by web servers, so they can be thought of as Java applets that run on servers instead of in web browsers.[1] These kinds of servlets are the Java counterpart to other dynamic Web content technologies such as PHP and ASP.NET."

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.