ArticleslgStudy

science

Apache Click

Apache Click is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Apache Click rather than just read about it. In short: Apache Click is a page and component oriented web application framework for the Java language and is built on top of the Java Servlet API. It is a free and open-source project distributed under the Apache license and runs on any JDK installation (1.5 or later).

Key takeaways

  • Apache Click belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Apache Click to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Apache Click from memory before moving on to harder problems.

Reference excerpt

Apache Click is a page and component oriented web application framework for the Java language and is built on top of the Java Servlet API. It is a free and open-source project distributed under the Apache license and runs on any JDK installation (1.5 or later). Click was initially created by Malcolm Edgar as the click.sourceforce.net project in 2003. The project then graduated to an Apache top-level project in November 2009 with Bob Schellink. The project was retired in May 2014.

Overview The main design goals are simplicity, ease of use, performance and scalability. To achieve these goals Click leverages an intuitive page and component oriented design. Pages and components provide good encapsulation of web concepts and enables rapid application development. Click takes a pragmatic approach and expose few abstractions to learn and understand. The Java Servlet API is fully exposed to the developer which eases the upgrade path from an action based framework to a component based one. Pages and components are developed in Java while templates can be written in Velocity, FreeMarker or JSP. Components know how to draw themselves alleviating developers from maintaining redundant markup. A major difference between Click and other component oriented web frameworks is that Click is stateless by design, although stateful pages are supported.

Competing frameworks There are a number of other component oriented frameworks available for Java such as JSF, Tapestry, WebObjects, Apache Wicket and Vaadin. Some developers prefer the more traditional action-based web frameworks including Apache Struts, Spring MVC, and Stripes.

Example A Hello World Click application, with four files:

hello-world.htm The default template engine for Click is Velocity, the htm file will be similar to a normal, static HTML page.

HelloWorld.java The page model that will be bound to the template.

click.xml The heart of a Click application is the click.xml configuration file. This file specifies the application pages, headers, the format object and the applications mode. Click is smart enough to figure out that the HelloWorld page class maps to the template hello-world.htm. We only have to inform Click of the package of the HelloWorld class, in this case org.wikipedia.click. We do that through the click.xml configuration file which allows Click to map hello-world.htm requests to the org.wikipedia.click.HelloWorld page class. By default the ClickServlet will attempt to load the application configuration file using the path: /WEB-INF/click.xml

web.xml The servlet application definition.

Bibliography

See also Comparison of web frameworks

References

External links Official website

Worked examples

Example 1 — a first encounter with Apache Click

Start with the simplest possible case. Write down what Apache Click claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Apache Click before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Apache Click ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Apache Click

In research
Apache Click appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Apache Click in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Apache Click is common in secondary-school and first-year university syllabi. It links to neighbouring topics Java enterprise platform, Web frameworks, so understanding it makes those chapters shorter.
In everyday life
Look for Apache Click outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Apache Click” →

How to study Apache Click in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Apache Click means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Apache Click out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Apache Click in simple terms?

Apache Click is a page and component oriented web application framework for the Java language and is built on top of the Java Servlet API. It is a free and open-source project distributed under the Apache license and runs on any JDK installation (1.5 or later).

Why does Apache Click matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Apache Click?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Apache Click.

Tags

  • Java enterprise platform
  • Web frameworks

Keep exploring