Hi i am working on tomcat webserver and there a problem in placing .jar i have calander.jar i would like to access it in my servlet when i placed my .jar file in tomcat\webapps\examples\web-inf\classes\ directory but it is not working(not able to access) can u please guide. as where to place a .jar file in tomcat webserver to access it from my servlet thanking u
/WEB-INF/classes is the location you place un-jar'ed class files. /WEB-INF/lib is the location you place your jar files. Tomcat will include any .jar file it finds in this directory in the classpath so...
i have placed my Calander.jar file in tomcat\lib directory still i am not able to access the class file in it. i have written as <applet archive="Calender.jar" name="calender" class="Cal.class" height= 200 width=300> i am not able to execute the applet file in the jar. please help me. thanking u
....\wlserver6.0sp1\config\mydomain\applications All jar files keep in this directory.Using this function U can get the EJBHome.Write another function or add adtional information in this function for getting remoteObject.
InitialContext initial = (InitialContext)com.modusmedia.seagatewcms.util.AppSvrContext.getEJBInitialContext(); // get enterprise bean Object objref = initial.lookup(jndiName); return (EJBHome) PortableRemoteObject.narrow(objref, Class.forName(ejbClass)); } [This message has been edited by DAYANAND BURAMSHETTY (edited August 10, 2001).] [This message has been edited by DAYANAND BURAMSHETTY (edited August 10, 2001).]
hi vishnu create a LIB folder directly under your context folder and place the jar file in this folder Samith.P.Nambiar
Joined: Jan 04, 2001
Hi Samith i tryed with the way the u have said but still i am not able to access my applet. help out na vishnu
Joined: Jun 13, 2000
/WEB-INF/lib is where you place jar files that the server needs to access. An applet isn't run by the server, it's run by the client. The easiest way to allow the client access to your applet is to place it in your application directory with the html page the applet is on.
Technically, /WEB-INF isn't your starting point (unless you're in the habit of deploying j2ee apps to the root of your file system!). More correctly, something like: /var/tomcat/webapps/examples/WEB-INF/lib/ is the place you want. Or, to be more specific, say web.xml contains this context:
And I'd put my jars in /home/httpd/listopt/WEB-INF/lib !
Customer surveys are for companies who didn't pay proper attention to begin with.
Joined: Jan 04, 2001
hi i have placed my jar file at tomcat/webapps/mydirectory where i have my html file also, and i set the classpath to this jar file but when i try to access the applet in this jar file it is executing only on the server machine where i have webserver but, when i try to access the same page from the some other machine other than server i am not able to execute the Calendar applet present in my jar file. please help me
Well, something we need to consider here is that this is an Applet unlike any other J2EE applications. Since anything under the WEB-INF is private, I am not sure that is the right place to put the jar file of an Applet. I am not 100 % sure of this, I should try something before I speak more. I know that the Applet jars should be downloadable to the client side and so placing the jars in WEB-INF maynot be appropriate. My choice would be to put the jar files in webapps/examples, if thats what the servlet-context is called (unless proven otherwise). As I said I haven't experimented with this take this advice with a grain of salt. And btw, if you place the jars in webapps/examples be sure to change the codebase=".". regds. - satya