Forums Register Login
Small doubt..Servlets Naming Convention
I have a question regarding why all the servlets (or for any web api) is put in package starting with javaxjavax instead of regular java.*, does X signifies here something?? thanking you all
Most of the times, every java technology starts as optional package to the standard JDK. Later when it get very matured, they will start bundling the optional component along with standard JDK. So my best guess is that, javax stands for Java Extension.
I also think that the x comes from extended, and javax packages began to exist to have a difference between the old classes and the newer ones, so you can support the two versions. As an example you have the awt and the swing packages.
javax implies extended api's
Its not a Servlet question. But you intelligently made use of word servlet and asked a general question. As far as I know most of the other packages, other then web api, starts with javax.

hi adithya kallu ,

Dont think only servlets contains the package names starts with "javax".From advanced java onwards,we should use the packages starts with "javax.<something>.*"

javax represents java extension.upto AWT we can treat them as "java" packages.

Upto AWT we can't say those r fully platform independent.bcoz all the core applications developed in C or C++ or someother native languages.so core applications have direct communication with OS.so sometimes it doesnot support for platform independence.
where as Advanced applications(we can say from Swings),developed in pure java.so these applications doesnot have direct interaction with the OS.thats y to develop webapplications ,we r using advanced apps.

check the "A Brief History of Swing " in the following link


Hi Siva,

Welcome to the ranch and thanks for the outstanding explanation about the javax packages. Just a quick reminder, please remember to use real words in your posts as opposed to "u r" and "bcoz". It makes your posts harder to read, especially if English is not your first language, or you use some type of visual impairment software. Thanks!
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

All times above are in ranch (not your local) time.
The current ranch time is
Oct 20, 2017 19:49:48.