Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Small doubt..Servlets Naming Convention  RSS feed

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
javax implies extended api's
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

thanks.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

http://java.sun.com/products/jfc/tsc/articles/getting_started/


regards,
-siva
 
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
I am not young enough to know everything. - Oscar Wilde This tiny ad thinks it knows more than Oscar:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!