Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

apache in "org.apache.jsp"

 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi ranch buddies,

i was going through the code of generated servlet of a jsp file , what i see package org.apache.jsp; at top of file.

what is apache doing in the package declaration of a servlet since Apache is a open-source software foundation ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I assume you saw this while using Tomcat. Who do you think the implementer of the container is? As it's the Apache Software Foundation, why would you be surprised to see its name in its packages?
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

but i found that inside GlassFish server
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess they borrowed some classes from Apache?
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

its unlikely since found following directory structure in glaasfish server

C:\glassfish3\glassfish\domains\domain1\generated\jsp\DemoProject_j2ee\org\apache\jsp\"generated servlet of jsp files"


here is code of generated servlet of a jsp(first.jsp) file




it seems that glassfish server does not borrow any class from apache , since a package[org.apache.jsp] is created not imported

what do you think Bear ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It doesn't need to be imported because the base class and interface names are fully qualified.
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i didn't notice that ,my apologies . but why does glassfish server need to make package with apache as sub directory.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What makes you think that they are Glassfish classes and interfaces? As I said, it's more likely that they leveraged the Apache resources.
 
naveen yadav
Ranch Hand
Posts: 384
Java MyEclipse IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:What makes you think that they are Glassfish classes and interfaces?


GlassFish(GF) server would have been providing the container mplementation for servlet or jsp ?If that is the case then why GF server would create a sub-directory in the name of apache"org.apache.jsp" instead of glassfish("org. glassfish.jsp".

my problem is with apache when GF server is executing the web app.?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:As I said, it's more likely that they leveraged the Apache resources.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As this really has nothing to do with JSP technology, it's been moved to a more appropriate forum.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic