• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff between javax.servlet.* and javax.servlet.http

 
Chaitanya Vivek
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
according to java packaging fundamentals

if import javax.servlet.* includes everything under <i>servlet</i> which is again under <i>javax</i>, then why should we again say import javax.servlet.http n servlet code.
 
Hendy Setyo Mulyo
Ranch Hand
Posts: 219
Firefox Browser Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chaitanya Vivek:
according to java packaging fundamentals

if import javax.servlet.* includes everything under <i>servlet</i> which is again under <i>javax</i>, then why should we again say import javax.servlet.http n servlet code.


Hi Chaitanya,

import javax.servlet.* doesnt meant includes everything under the subpackages inside. it will only include classes, not subpackages inside.
 
Chaitanya Vivek
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WoW! Thanks for Enlightening me!
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chaitanya...are you an SCJP already?? If yes, you should have known this. Anyways, it's good to ask and javaranch is always there.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic