Difference Between Servlet & Struts

Servlets and Struts are two related, but distinct technologies used to create dynamic web pages using the Java programming language. However, since the two technologies overlap, it can be difficult to know where one begins and the other ends.

  1. Introduction to Web Servers

    • A web server receives specially formatted requests from web browsers that specify the page the user wishes to view. On older pages, sometimes called "Web 1.0," these requests could be mapped to actual HTML files on a hard drive. However, on modern pages, sometimes called "Web 2.0," this has proven too limiting and many HTML pages are generated as needed by computer programs.

    Intro to Servlets

    • Servlets are Java classes that are created to respond to the web requests from a browser. Typically, a servlet takes the web request as an argument and writes HTML code back out to it. Tools to create servlets are published as part of Java Enterprise Edition by Sun Microsystems.

    Intro to Struts

    • Servlets are a great tool for web developers, but assembling a Web 2.0 page using only servlets is still a time-intensive and difficult task. Apache Struts is an entire web framework that solves this problem by providing a complete structure of common Web 2.0 tasks that can be built on top of it. Struts provides a relatively easy interface to databases, support for alternative output formats such as XML and RSS and user authentication tools. The programmer then modifies this structure and adds custom servlets as needed to create the web page.

Related Searches:

References

Comments

You May Also Like

Related Ads

Featured