GeeCON Prague 2014*
The moose likes Other Java Products and Servers and the fly likes apache in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "apache in "org.apache.jsp"" Watch "apache in "org.apache.jsp"" New topic
Author

apache in "org.apache.jsp"

naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

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

Joined: Jan 10, 2002
Posts: 61314
    
  66

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?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384


but i found that inside GlassFish server
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

I guess they borrowed some classes from Apache?
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384


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

Joined: Jan 10, 2002
Posts: 61314
    
  66

It doesn't need to be imported because the base class and interface names are fully qualified.
naveen yadav
Ranch Hand

Joined: Oct 23, 2011
Posts: 384

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

Joined: Jan 10, 2002
Posts: 61314
    
  66

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

Joined: Oct 23, 2011
Posts: 384

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

Joined: Jan 10, 2002
Posts: 61314
    
  66

Bear Bibeault wrote:As I said, it's more likely that they leveraged the Apache resources.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61314
    
  66

As this really has nothing to do with JSP technology, it's been moved to a more appropriate forum.
 
GeeCON Prague 2014
 
subject: apache in "org.apache.jsp"