Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Small doubt..Servlets Naming Convention

 
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
javax implies extended api's
 
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
reply
    Bookmark Topic Watch Topic
  • New Topic