Hot Deploy Servlet in JAR file problem
I've been playing with hot deploying servlets in WLS 5.1. I have SP2
installed. I have things working fine with individual servlet class files. I
decided to try hot deploying with jar files.
I created a servlet, added it to a jar file, and then added the jar file to
the 'weblogic.http.servlet.classpath'. I then restarted the server. I
started the console and was able to hot deploy the servlet. So far so good.
My next test is what failed. I modified the servlet, and rebuilt the jar
file. I went back to the console, selected the servlet and hit the redeploy
button. I went back to the browser and hit refresh - nothing, still the old
servlet.
It appears that WLS isn't reloading the jar file and the updated servlet.
Everything works with individual class files.
Does anyone know how I can cause the reload of updated servlets embedded
within a jar file?
Weblogic group - If there is no way now, will support be added soon?
Thanks,
Rick
Hi,
If I use weblogic.servlet.ServletServlet to try just the servlet , It
works correctly.But When I develop it in a web application , there is a lot
of hypelink to this servlet,thus I can't use the relative path reference to
that servlet.I try to set the name of weblogic.servlet.ServletServlet same
as the webapp,It doesn't work,how do I solve this problem?
Thank you
Pan
Subject: Re: Hot deploy Servlet in webapp
> http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
>
> It even explains why you shouldn't use it in production environment.
>
> Dimitri
Similar Messages
-
Can I hot deploy a servlet within a web application ?How should I do it?
(When I compile my servlet into MyApp/web-inf/classes,user this URI -
http://localhost:7001/MyApp/mypackage.myclass to invocate it ,It does not
work correctly(error 404))
Hi,
If I use weblogic.servlet.ServletServlet to try just the servlet , It
works correctly.But When I develop it in a web application , there is a lot
of hypelink to this servlet,thus I can't use the relative path reference to
that servlet.I try to set the name of weblogic.servlet.ServletServlet same
as the webapp,It doesn't work,how do I solve this problem?
Thank you
Pan
Subject: Re: Hot deploy Servlet in webapp
> http://www.weblogic.com/docs51/classdocs/API_servlet.html#134798
>
> It even explains why you shouldn't use it in production environment.
>
> Dimitri
-
Has anyone successfully deployed servlets using WAR file?I think I did everything right. The WAR file was deployed. But I can't accesss it.
I use .war files for deploying servlets in WLS 6.0 - they are much easier
than exploded dirs...
Usually, when I have a problem accessing the servlet once deployed, it's
almost always the deployment descriptor.
"Randy" <[email protected]> wrote in message
news:3b311258$[email protected]..
> Has anyone successfully deployed servlets using WAR file?I think I did
everything right. The WAR file was deployed. But I can't accesss it.
-
How do I deploy an external JAR file
Hello,
How do I deploy an external JAR file?
I am grateful for every hint.Hi Manuel,
If you read my blog mentioned in the beginning of the thread, you will note that such solution is not supported in our engine due to number of reasons.
Please, read the blog and use application library shared among these two applications. You will achieve the same effect. Please note that the using application will need run and deploy-time dependencies to the shared library.
You should not add files to any of the folders manually or manipulate engine's classpath in such situations.
Best Regards,
Georgi -
Hi,
In my .ear file, one application-client jar(which contains all helper classes which are used in whole application) file is there. While deploying .ear file, all ejb are getting deployed well, while deploying application client jar file(Global.jar file here) it is giving the following message:
IO Error deploying Global.jar: D:\oracle9ias\oc4j_extended\j2ee\home\applications\trainiumear\Global.jar
Here is application-client.xml of Global.jar file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application PUBLIC '-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN' 'http://java.sun.com/j2ee/dtds/application-client_1_2.dtd'>
<application-client>
<display-name>TrainiumClientApp</display-name>
<description>Application description</description>
</application-client>
My Environment: Oracle9iAS (9.0.3.0.0), Windows-NT
Please let me know Why i am getting 'IO Error' , where i may done wrong ?
Thanks in Advance
SrinivasSrinivas,
Before we continue, PLEASE tell me if you've looked through the available
documentation, code samples, "how-to" documents, etc., for OC4J. It
seems to me that you're mixing things up a bit. I use the "deploy"
command to deploy my EARs, example (partial):
java -jar admin.jar ormi://<host> admin <password> -deploy ...
And my EAR file is not in the "application-deployments" directory
when I issue that command.
Perhaps you could also show me the contents of your "application.xml"
file for this application you are having trouble with.
But I repeat, please tell me if you have already looked at the
available documents regarding OC4J!
Thanks,
Avi. -
Hot deploying servlets without the admin tool
Hey, all! I was wondering if there is a way to hot-deploy
servlets without using the weblogic admin console.
With ejbs, this is done through weblogic.deploy
standalone. Thanks for your help!
Alex Kagan
WMarks,
We've done something similar for one or two low-profile apps.
You can use a tool such as wget ( Wget for Windows ) to download the installer to a known location on the user's workstation, and then run that installer as either a dynamic administrator or the system account in order to perform the installation.
As others have mentioned, there will always be applications you'll need to find workarounds for if the vendor didn't code their application to be launched as a non-administrative user.
Along with the least privilege solutions (mostly AD-based), you could investigate options such as VMware ThinApp or ZENworks Application Virtualization for apps that you absolutely have to have run as a non-admin, but remember there is always overhead introduced into the management and deployment process by re-packaging.
pitcherj -
How to run servlet inside jar file
Hi
I have a problem on running a servlet class which resides in a jar file.
At first, it runs if it is located in the root directory of jar file, but if I put in inside a sub directory, I wasn't able to run it. It seems that the servlet class was not found.
Here's the contents of my jar file:(eg. application.jar)
META-INF/
META-INF/MANIFEST.MF
Business/
Business/Business.class
TransferManager/
TransferManager/Default.class
TransferManager/Application.class
DAL/
DAL/XMLDocument.class
DAL/ParameterCollection.class
DAL/ConnectionReaper.class
DAL/JDCConnectionPool.class
DAL/JDCConnection.class
DAL/JDCConnectionDriver.class
DAL/DataAccess.class
Presentation/
Presentation/IPresentation.class
Presentation/XslTransform.class
When I deploy this jar in tomcat4.0 and try to run the Default.class
in the TransferManager package, the server can not locate the class.
But if I put it in the root directory of the jar it works.
Is there any additional setting in tomcat for this? Anyone can give
me an idea for this?
Thanks in advance...If you want to put the compiled servlet into Business/Business.class, you need for it to be in the Business package. I.e. the first line of code should be "package Business;" It looks like your jar file is in the right place, since Tomcat is finding something in it. So put your servlets in the appropriate packages and they should run. Also, you would have to change the configuration to refer to "Business.Business.class" and so on.
-
Servlets in Jar files in WLS 6.1 ?
Trying to port a WLS 5.1 servlet into 6.1 (an entirely different
animal it appears)
I have added an application to my config.xml file as below as well as
trying to start it
PasswordPolicy="wl_default_password_policy"
Realm="wl_default_realm"/>
<Application Deployed="true" Name="DefaultWebApp_cb2java"
Path=".\config\PM\applications">
<WebAppComponent Name="DefaultWebApp_cb2java"
Targets="PCPNEARN"
URI="DefaultWebApp_cb2java" WebServers="PCPNEARN"/>
</Application>
<StartupClass Arguments="servlet=ProMan"
ClassName="weblogic.servlet.utils.ServletStartup"
FailureIsFatal="true" Name="StartPMServlet1"
Targets="PCPNEARN"/>
Now my servlet is packaged in a JAR file under the lib directory of so
when I assume that WLS will automatically pick this up from
C:\Weblogic6.1\wlserver6.1\config\PM\applications\DefaultWebApp_cb2java\WEB-INF\lib
directory ? ( as the lib directory is where the doc says it picks up
jar files from )
Now when I start WLS it cant find the servlet? Is that because I cant
package it in a JAR as of WLS 6.1 and have to move the class files to
the Classes directory instead ?
Furthermore the Servlet itself references JavaBeans deployed in a
totally different application. Can I also assume that if I have my
Classpath correct these will get picked up ?
I would look here
http://e-docs.bea.com/wls/docs61/webapp/security.html#100365 for methods on
protecting web app resources.
"zhen Ni" <[email protected]> wrote in message
news:3c86d70c$[email protected]..
Hello:
I have some derectories and files on my web site,and only appointed usersstored in my database can access their special directories.how can i do?
thank u! -
Deploying icons as jar file in Forms 9i
We (Cancer Research UK) don't quite understand what is happening -
We followed the guidelines in the white paper "Oracle 9IAs Forms Services - How to Deploy Icons"
to deploy the images in a jar file:
Altered the formsweb.cfg file to contain
archive_jini=f90_jinit.jar, our_images.jar
imagebase=codebase
Seemed to work, jar file downloaded to browser (IE 6 ) ok , web deployed form shows toolbar icons, great..
However, when we removed an existing entry in orion-web.xml which maps our application/icon directory
or remove the *.gif files from this directory, our web deployed form no longer shows the icon images.
Does it still need these to be present on the server, if we direct it to use cached images ?
We are test running just the Application server components installed with the IDs 9.0.2 on a Windows 2000 server.Hi Steve,
I have the exact same problem. The jar is downloaded and everything is 100% best practises, but there is no way I can make the damn system use the files in the JAR file. No matter if imagebase=codebase: it will only use files on the server, and if I remove the gif files they don't show up.
I think there must be a glitch in the system somewhere. I don't completely understand this part of it: the codebase is mapped to /forms90/java - but how does that add up when you put your files in c:\my_gifs (as detailed in Best Practices section of the Deploying Icons paper). How does the server know where to look when codebase are two different places - I'm thinking it can't for some reason.
My Apache/Apache/logs/error_log clearly states that files (real files) are not found in c:\my_gifs if I remove them from the file system. The JAR is downloaded, but the server doesn't use it.
However, most people have all their gif files in the same folder as their images.jar file, so they don't ever discover that the server ignores the jar and uses the files instead.
Regards,
Jesper Vad Kristensen
Aarhus, Denmark -
Hi all!
How can I declare and execute a servlet from a JAR-file? I tried
severel times with different parameters in the properties file
and in the browser, but always was getting error 500. Standalone
servlet class, properly declared, is executed without problems.
Thanks in advance
Boyko Trendafilov
Smalltalk developer
If it isn't a Web application, but a stand alone servlet, what do you do?
We added the jar file to the classpath used to start the server and this
worked, but we wondered if there was a better way.
"Mark Spotswood" <[email protected]> wrote in message
news:[email protected]..
> For web applications, jar files should go in the WEB-INF/lib directory.
> --
> mark
>
> Boyko Trendafilov wrote:
>
> > Hi all!
> > How can I declare and execute a servlet from a JAR-file? I tried
> > severel times with different parameters in the properties file
> > and in the browser, but always was getting error 500. Standalone
> > servlet class, properly declared, is executed without problems.
> > Thanks in advance
> >
> > Boyko Trendafilov
> > Smalltalk developer
>
-
Hot Deploying supporting Java class files
I have a statful session bean that has supporting classes. Is there a way I can hot deploy these into WLS 5.1?
Hi
I guess u r running apache-jserv as servlet engine for your jsp and servlets. If its so, jsp files can be run without any additonal configuration by putting the jsp file under document root or any subdirectory and for running servlets u have to add classpath entries for your servlet in jserv.properties file.
To make sure that your servlet engine is working, try
http://servername:port/servlet/IsItWorking, if u get success msg that means servlet engine is working fine.
Hope this will help
Regards
Kumaran -
Hot Deploying Servlets from the command line
Is it possible to hot deploy a servlet from the command line?
Use the mbocutil command line tool located in:
server root/bin/msg/admin/bin
You can create a folder with spaces by using quotes like thus:
./mboxutil -c "user/Tuser/Test Folder"
-Chris -
Jar File Problem Using External Packages
I am having problems creating an Executable jar file that imports classes from my own package.
I can create an exe jar no problem without using any external packages, but when I use an external package the jar will not execute.
I am using WindowsXP, my package is in,
C:/MyClasses/Database
the class files are stored loose, not in a jar file
I have tried altering the class-path in the manifest file, but to no joy - I may have not changed the classpath correctly!
Please help
MagicThis is a mine field of "correct programming style."
External jars, if very general, could be placed in the directory jre/lib/ext.
In some cases you can unzip the external jars and add them to your own jar.
The manifest.mf migth be looked into, and of course you need to communicate your patching!
As you remarked, it might be a problem of class path usage.
For that the jar tool documentation might explain it better than I. -
Jar file problem , please help
Hi guys , i am not sure if i am in the right place to have this post in so i'll give it a try
i know my explanation might be a shot in the dark but i'll try my best
i have made a program using eclips , to send emails using my email , on certain conditions
so when that codition happenes on some class in my program
this class will call the email class and send an email to someone
now the problem is not in the program , because as along as this program is in eclips and i run the program in eclips , everything goes fine , No errors what so ever
but , if i make jar file , using eclips "export"
once i run the program , the program would run , but once the same condition that ihave specified previously happenes , the current class never calls the email class , and no emails would be sent
i am very confused wether
1) it throws a class not found for some wierd reason
2) or the external library that i used to send emails , is not exported
i tried to check the CLASSPATH file and i think everything seems to be fine , so i dont know what the problem is
so in short
if the program is in eclips , every thign goes fine
if the program is a jar file , then it would work fine but once it needs to send an email , it never does and i can still work on the program , but no emails will be sent
thanks please some one help me out with thisfor more information here is the senario
because i see that you guys are some how lost because i am not providing enough information
so this is a detailed info of the problem
i have 3 classes
1) mybankmain (jframe)
2) mybankbody (all labels and buttons and events included here)
now: within some events in my program ,
it calls a class called.....
3) myEmail
this class imports two things that are comming from an external jar file , so in short , if the external jar file is not available the program would complain
i run this on windows xp (SP2)
now: if this program runs on eclips , it would do everything it is supposed to do and all kind of calculations will be done and emails will be sent on the conditions that i have specified within the program
if i make a jar file on windows , and i run the jar file , the file would work , all functionalities will work
EXCEPT: sending an email
- either my class is not found
- or external jar file is not found which causes my class not to be able to perform its tasks
i did only one test
which is that i switched the main and i made myEmail as a main and i tried to export the jar file
Result: jar file doesnt work
the way i view whatever inside my jar file , i use Winrar and it would view everythign in the jar file and i see that all my classes are included there
if i open my CLASSPATH , i see that there is a pointer to the external jar file
if i open my manifest : i DO NOT see the exrernal jar file in there but i do see that its pointing to my main class
class main : mybankmain
and there is only the version and signiture
i hope all these additional details would help in determining the problem that ihave been trying to solve for 2 weeks now -
Hello,
I have a jar file with some code I wrote that accesses a jar file from a 3rd party. I want to include the 3rd party jar files inside my jar file. So I basially have a jar file with my code (unjarred) and include the 3rd party jar files in my jar. In my MANIFEST.MF file I have properly set the Main-Class property correctly, as well as the Class-Path property. I have set my Class-Path value to 3rdparty.jar which is the jar file at the root directory of my jar. When I run my jar file I get a NoClassDefFoundError saying the 3rdparty jar file is not found. I have added a new line at the end of my MANIFEST.MF file, and am actually using ant to create my MANIFEST.MF file. When I unjar my file everything looks correct. What is the problem here? I have made sure the 3rd party classes that my code access are in the jar. What could I be doing wrong??Standard Java does not support placing a jar file within another jar.
You can search for 3rd-party alternatives, ow write your own custom classloader.
Maybe you are looking for
-
How to access var in outter class inside inner class
I've problem with this, how to access var number1 and number2 at outter class inside inner class? what statement do i have to use to access it ? i tried with " int number1 = Kalkulator1.this.number1; " but there no value at class option var y when th
-
Computer won't recognize network printer - HP OJ Pro 8600
My computer and printer are both connected to the same wireless network, but my computer won't recognize the printer (using the host name, IP address, or otherwise). It's maddening, because it worked when I first set it up a year ago and just recent
-
Portletized ADF application as WSRP Provider
Hi , I am trying to register portletized ADF application as WSRP provider on Portal 10.1.4.2 . My ADF application is deployed on a standalone OC4J 10.1.3.3 . When I try to register this portletized ADF applicaiton as WSRP provider I get the below err
-
Error in reporting emails.
To date I have recieved over 4000 emails from users of the support community identifying their problems and asking for assistance. Obviously I have have made a mistake somewhere when using the support community. Can somebody please tell me where I
-
I am getting frustrated I purchased the Adobe pro so that I could convert and edit my PDF's however there are no tools showing except the convert and there is nothing on the main header that would allow me to add tools.