• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are classes shipped automatically?

 
Sahil Reddy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am writing web application in my "development Environment " where i am writing classes .
Classes are using other SDK classes such as from java.io package and from the javax.servlet package.


When i copy these classes into Server , which is my localhost , how come container (TOMCAT) knows about the SDK classes i am importing and using into my Servlet class. I have not configuered TOMCAT to use and CLASSPATH
and all that jazz...

Thanks and Regards
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sahil,

The basic Java runtime classes are by default available with the Java runtime (rt.jar). However servlet.jar has to be typically available to any web/app server. It is still working fine because Tomcat has got the servlet.jar in its own classpath which is NOT the exact CLASSPATH of your system.

Remember Tomcat is the RI (Reference Implementation) of Servlet/JSP and it is written in Java!

Hope this helps!
 
Sahil Reddy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Raghvan

But i need to ask more

1. If i ship jar file to certain machine having only JAVA. Will it run ?? I mean that machine do not have JAVA SDK .
2. What is RI (Reference Implementation) of Servlet/JSP means ??

Thanks and Regards
Sahil
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. If i ship jar file to certain machine having only JAVA. Will it run ?? I mean that machine do not have JAVA SDK .

No. Servlet containers require a JDK. If your Jar were a simple Java application rather than a web application then the machine would need a JRE rather than a JDK.


2. What is RI (Reference Implementation) of Servlet/JSP means ??

See this.
 
Sahil Reddy
Ranch Hand
Posts: 145
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic