Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
287 views
in Technique[技术] by (71.8m points)

java - difference between jstl-api and jstl-impl

I'm a beginner in Java EE technologies. I wonder what the difference is between the jstl-api jar and the jstl-impl jar.

Why are the API and implementation separated? Does it mean there are other implementations available?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The API and implementation are separated, because Java EE works with a standardized specification.

The API is part of that specification, and contains a set of mostly interfaces to which everybody that participated in creating said specification agreed. In theory everyone can make an implementation that implements the published standardized API and behaves as described in the associated specification document. You are allowed to call your implementation "certified" when it passes the so-called TCK (Technical Compliance Kit).

It's a stated goal of this specification system to encourage competition, while at the same protected users form being locked-in to any specific implementation.

JSTL in particular is part of the JSP spec, which has been developed under JSR 245. If you would like to make your own implementation, you'd begin with reading the spec document.

Could you point me to any tutorials that explain how to write our own impl for jstl?

There are as far as I know no specific tutorials for creating your own implementation of whatever Java EE specification. It's in nearly all cases pretty much an expert job, and a job which is typically only carried out by a select few organizations or individuals. This kind of material doesn't really lend itself to tutorial-like write ups, although David Blevins (of TomEE fame) has given us the occasional glimpse in the work that is approximately involved with this.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...