Replacing class file instead of redeploying whole WAR package

Hi,
This may sound very silly question, but I thought to post it just as to confirm.
I have an application deployed in websphere ver 5. Usually when there are any changes to any class files, we rebuild the entire package, and then redeploy it using the admin console.
Now, this time I've got only a couple of classes modified...my question is that can I just replace the modified classes directly instead of rebuilding the entire package and redeploying it?
I'd assume that this is different from hot deployment, as I am prepared to start the server again if needed be. Please advise folks.
Thanks

The problem is that this particular class (servlet) can run only in production environment...there is no test environment to run it..but thanks...I did see IBM's take on this.
http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.zseries.doc/info/zseries/ae/trun_app_hotupgrade_war.html
I think it does answer the question, I can replace the .class file directly in the expanded version of the war package, and then restart the application. It should be picked up automatically.
Thanks for your response.

Similar Messages

  • (newbie) Question about replacing .class files and web.xml file

    I'm new to servlets and I have two quick questions...
    Do I absolutely need a web.xml file to define all my servlets, or can I simply place .class files into the WEB-INF directory and expect them to run?
    If my application server (for example Tomcat) is running and I replace a servlet .class file, do I need to restart the server for the new .class file to take effect?
    ...or are both of these questions specific to the application server I'm using?

    Hi,
    From an article I read:
    With Tomcat 3.x, by default servlet container was set up to allow invoking a servet through a common mapping under the /servlet/ directory.
    A servlet could be accessed by simply using an url like this one:
    http://[domain]:[port]/[context]/servlet/[servlet full qualified name].
    The mapping was set inside the web application descriptor (web.xml), located under $TOMCAT_HOME/conf.
    With Tomcat 4.x the Jakarta developers have decided to stop allowing this by default. The <servlet-mapping> tag that sets this mapping up, has been commented inside the default web application descriptor (web.xml), located under $CATALINA_HOME/conf:
    <!-- The mapping for the invoker servlet -->
    <!--
    <servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
    </servlet-mapping>
    -->
    A developer can simply map all the servlet inside the web application descriptor of its own web application (that is highly suggested), or simply uncomment that mapping (that is highly discouraged).
    It is important to notice that the /servlet/ isn't part of Servlet 2.3 specifications so there are no guarantee that the container will support that. So, if the developer decides to uncomment that mapping, the application will loose portabiliy.
    And declangallagher, I will use caution in future :-)

  • Replacing .pkg files to fix "Error: No valid packages"

    Hi all -
    I've just learned the hard way that I'm not supposed to delete files from the Receipts folder.
    I've done my due diligence, so I know that I need to replace at least "BaseSystem.pkg", but I have questions;
    Is it ok, if I'm running 10.4.9, to copy it from my other mac running 10.3.9?
    Should I try to replace the other .pkg files I deleted?
    Should I just copy the whole Receipts folder?
    What'll happen if I get packages I didn't have before, or that don't match the versions of the apps they're supposed to be associated with?
    Sorry for all the questions, just want to be certain so I don't have to learn any more lessons the hard way.
    Thanks!
    OBTW: I've also finally learned - after 10+ years as a Mac user - to back up my hard drive.
    PowerBook G4 Ti 550 (10.4.8), PowerMac G4 466 (10.3.9)     3rd gen iPod 30gig, 2nd gen Nano 8gig

    Hi Dennis
    my basesystem.pkg is specific to the 10.4 Tiger that was originally installed on my iMac G5 - numerous updates have not altered it.
    I'll happily let you have a copy of my Tiger basesystem.pkg file - just email me.
    What issues came up for you after deleting the files?
    here's a list of the pkg files in my receipts folder....
    BSD.pkg
    CPU_AppleWorksCH.pkg
    BrazilianPortuguese.pkg
    BaseSystem.pkg
    CPU_AppleWorksS.pkg
    AppleAppSupport.pkg
    BroadbandTunerUninstaller.pkg
    Flip4Mac Web Plugins.pkg
    Flip4Mac WMV Player Installer.pkg
    French.pkg
    CPU_AppleWorksZ.pkg
    CPU_AppleWorksE.pkg
    AppleMouse_PPC.pkg
    Automator.pkg
    GarageBand20Loops.pkg
    GarageBand_202.pkg
    2005 World Book Installer.pkg
    Dutch.pkg
    DVDPlayerUpdate.pkg
    iChat.pkg
    iDVD.pkg
    iDVD5Themes.pkg
    iDVDThemes.pkg
    iMovie.pkg
    iMovieHD502.pkg
    iPhoto.pkg
    iPhoto504.pkg
    iPhotoContent.pkg
    Italian.pkg
    iTunesX.pkg
    iWork Fonts.pkg
    J2SE50Release3.pkg
    J2SE50Release4.pkg
    Japanese.pkg
    MacOSXUpd10.4.7PPC.pkg
    Java.pkg
    Java131and142Release2.pkg
    Keynote 2.pkg
    Korean.pkg
    MacOSX-File-0.66.pkg
    MacOSXUpd10.4.5PPC.pkg
    MacOSXUpd10.4.6PPC.pkg
    MacOSXUpd10.4.9PPC.pkg
    MacOSXUpdate10.4.4.pkg
    MacOSXUpdateCombo10.4.3.pkg
    MacOSXUpdCombo10.4.8PPC.pkg
    QuickTime716.pkg
    Mail.pkg
    MediaFiles.pkg
    MigrationAssistant.pkg
    Norwegian.pkg
    OnyX.pkg
    OxfordDictionaries.pkg
    Pages.pkg
    psync.pkg
    Safari.pkg
    SecUpd2005-009Ti.pkg
    SecUpd2006-002Ti.pkg
    SecUpd2006-004Ti.pkg
    SimplifiedChinese.pkg
    SecUpd2006-007Ti.pkg
    Spanish.pkg
    Swedish.pkg
    TraditionalChinese.pkg
    X11User.pkg
    CPU_RegionalBoot.pkg
    CPU_MarbleBlast.pkg
    CPU_Nanosaur.pkg
    CPU_WorldBook.pkg
    Danish.pkg
    GarageBand10Loops.pkg
    Finnish.pkg
    Flip4Mac QuickTime Components.pkg
    AdditionalEssentials.pkg
    Essentials.pkg
    CPU_AppleWorksT.pkg
    CPU_AppleWorksJ.pkg
    CPU_AppleWorksK.pkg
    CPU_AppleWorksTA.pkg
    CPU_AppleWorksUS.pkg
    CPU_AppleWorksF.pkg
    CPU_AppleWorksH.pkg
    German.pkg
    iCal.pkg
    iWork Extras.pkg
    GarageBandApp20.pkg
    GarageBandDemoSongs.pkg
    CPU_AppleWorksDK.pkg
    AsianLanguagesSupport.pkg
    AppleMouseBluetoothPPC.pkg
    iTunes.pkg
    iTunesPhoneDriver.pkg
    CPU_AppleWorksD.pkg
    CPU_AppleWorksKH.pkg
    CPU_AppleWorksN.pkg
    AdditionalSpeechVoices.pkg
    CPU_Help.pkg
    CPU_Manual.pkg
    AddressBook.pkg
    DVDPlayerUpdate200506.pkg
    AirPortTi2005-001.pkg
    AppleIntermediateCodec.pkg

  • Where has 'do you want to replace this file' gone when copying items in lion?

    Hello, can anyone tell me if I can still have the option when copying items from one folder to another to be asked ' do you want to replace this file' instead of only having the new options to: stop / keep both / or replace all?  thanks for your help.

    If you don't mind losing them, it's all right to do it.
    Maybe you just want to delete them instead?
    Or do you mean you want to replace the faulty one in your Projects folder with a correct one from your Applications folder?
    Is this the Application you're talking about moving?

  • Flash Vars is not working when we accessing from other class files

    Hi all, I'm currently developing a flex application where i
    need to pass the data from the flash vars to the other class files
    instead of the main actionscript class file.
    Does any body know how i should go about doing that?? you can
    see this below code : please help me out if u know how to solve
    testnew2.as file
    package {
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew2 extends Sprite {
    public var
    xmlfile:String=String(root.loaderInfo.parameters.lists);
    public function testnew ():void{
    package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew extends testnew2 {
    public function testnew () {
    var myText:TextField = new TextField();
    // this assumes that you are going to pass in an id variable
    // on the end of the myFile.swf?id=12345 or
    // use FlashVars in the HTML parameter list for instance
    // 'FlashVars', 'id=123456', 'width', '1024',
    myText.text = new testnew2().xmlfile;
    addChild(myText);
    but if we access in same file it is working fine:
    package {
    import flash.text.TextField;
    import flash.display.Sprite;
    import flash.display.LoaderInfo;
    public dynamic class testnew extends Sprite {
    public function testnew () {
    var myText:TextField = new TextField();
    myText.text = String(root.loaderInfo.parameters.lists);
    addChild(myText);

    Pass the data into the main app, then from there either pass
    it into the sub-components or use
    Application.application.parameters, or bind to the values.
    Tracy

  • Signing class files

    Dears,
    Is there any possiblity to sign the class files instead of jar files.
    Esakki

    Hi,
    why do you want to sign the class file?
    Using a jar file you'll have all the classes into one single file and you'll have all the classes signed, and then you won't need to sign every single class, you'll do once and no more.
    Moreover, using the JAR type file, your classes will have smaller size and so they load up faster.
    See you

  • Jsp to class files

    All,
    I am pretty new with jsp and java. I want to know if how do I deploy a jsp application as class files instead of sources. Can someone give me how do I get start with this? Many thanks.

    You can do this:
    1. Install Jakarta Ant
    2. Create a file called jsp.xml that contains
    <?xml version="1.0"?>
    <project name="jspc-test" default="main" basedir=".">
    <target name="main" depends="myjsp">
    </target>
    <target name="init">
    <property name="uriroot.dir" location="."/>
    <property name="jsp.dir" location="<your jsp directory>"/>
    <property name="jsp.output.dir" location="<your output directory>"/>
    <property name="jsp.verbosity" value="3"/>
    <mkdir dir="${jsp.output.dir}"/>
    </target>
    <target name="myjsp" depends="init">
    <jspc
    destdir="${jsp.output.dir}"
         uriroot="${uriroot.dir}"
    srcdir="${jsp.dir}"
    verbose="${jsp.verbosity}">
    <include
    name="<your jsp file name>.jsp"/>
    </jspc>
    </target>
    </project>
    3. Run a batch file that looks like this:
    set CLASSPATH=<path to your jar>;<path to your jar>
    <full path>\java -Dant.home="<full path>\ant" org.apache.tools.ant.Main -f "<full path>\jspc.xml"
    This will create a <your jsp file name>_jsp.java
    4. Compile the resultant java file
    Or if you want this done automated, then use this tool
    http://download.com.com/3000-2417-10227362.html
    Write your .jsp file. Compile. You can find the .java and the .class file in \workarea

  • Help compiling with .class files

    I am using JGrasp and I am trying to compile a program that uses .class files instead of the .java files, but JGrasp will not recognize these at compile time. How do I get my program to compile with these .class files?

    I prefer using Jenuity:
    [http://www.nmmu.ac.za/jenuityIDE]
    It's much simpler to use than JGrasp and isn't nearly as confusing.
    For the record, you compile .java files into .class files. There is no need to "compile" existing .class files. If you have the class files you can run them from the command line. e.g. if you have a class file named Orange.class you should be able to type "java Orange" from the command line to run it. If Orange is inside a directory structure based on packages you may need to execute this command from just outside the 'highest" folder.
    If you just need to link to these class files, copy them into the "/jre/lib/ext" folder of your JDK.

  • For every import ,there should be class file

    suppose, i have written some servlets and complied .
    Their class files will be placed in their packages.
    does we need to set class path for those classes?
    i think that ,those classes we are using i.e weblogic.jar or rowset.jar for them we have to set the class path.
    but why do we need ,for our classes ,need to set.It will check in web-inf ->classes
    please clear information

    suppose, i have written some servlets and complied .
    Their class files will be placed in their packages.
    does we need to set class path for those classes?No. Because your app server will take care of that anyway.
    i think that ,those classes we are using i.e
    weblogic.jar or rowset.jar for them we have to set
    the class path.No.
    but why do we need ,for our classes ,need to set.It
    will check in web-inf ->classes
    please clear informationAll you need to do is to create a bundle (WAR, EAR) with all the JARs you need. What you're doing might not work because you're also relying on JARs you're notnecessarily supposed to use and that aren't provided to you by the app server.

  • One class type compiles into many .class files

    I have written a single large GUI file that is composed of a single class (FCTabGui class). When I run javac FCTabGui.java it generates around 190 classes with the same name (FCTabGui) but each one after the first is attached with $# at the end (ie FCTabGui$1.class, ..., FCTabGui$189.class) . I have never seen this before. Does anyone know why this is happening and how I can keep it to just one .class file instead of 190. Thanks.
    Jason

    What I meant by "standard to jar up files for a GUI"
    is that if there are lots of buttons that create
    anonymous classes then you HAVE to jar up the files
    because there is no alternative to it. One cannot
    preserve the single .class file setup with a GUI,
    unless its really small and has no action listeners.I suppose you could contort your code so that the single class not only creates all the widgets but also acts as the single action listener for every single button. This way you could avoid creating anonymous inner classes. But anyone who needs to maintain your code will grow to hate you.
    One can double click on a jar file and it will start
    running automatically, (assuming the JRE is
    installed), right?You can do that, but it's not automatic. You have to explicitly list what class has the main() method to invoke when the jar is double clicked. If you're using a wizard to create the jar, this may be easily specified. Otherwise you can do it by creating a jar manifest file with a "Main-class:" attribute.

  • How do i compile a class file to become an exe (application file)

    I know jbuilder and other 3 rd party software are able to to that. I just want to know whether jdk1.3 compiler able to do it...

    Hm ...
    if you think of a compiler producing an executable file, this means, the application is compiled, linked and bound at file-level - what about the features of loading and linking classes during runtime or the ability to replace class files during runtime and load/link it dynamically?- Guess, a compiler for java can compile static applications, which need no dynamic linking of classes, but is it also able to keep this functionality of java this way?- I don't think so (but I never tested one of these compilers).
    greetings Marsian

  • How to Load a class file base on .class file name???

    Hi,
    Can anyone help me?
    1) Based on filename (d:\temp\bla.class), I want to load this bla.class and get the actual package of this class.
    example:
    package something.temp;
    public class bla
    I want to load the file base on filename and get the package of the class. Is it possible ?
    Thank you.

    Hi nikki96,
    It will not work. I will get java.lang.NoClassDefFoundError eventhough I extends classloader to use the findClass(String filename);
    Example:
    import java.security.*;
    import java.util.Enumeration;
    import java.util.NoSuchElementException;
    import java.util.jar.Attributes;
    import java.util.jar.Manifest;
    import sun.misc.Resource;
    import sun.misc.URLClassPath;
    public class MyURLClassLoader extends ClassLoader
    String host;
    int port;
    public Class findClass(String name)
                   try
         byte[] b = loadClassData(name);
         return defineClass(name, b, 0, b.length);
                   } catch(Exception e)
                        e.printStackTrace();
                   return null;
    private byte[] loadClassData(String name) throws Exception
                   // load the class data from the connection
                   File file = new File(name);
                   InputStream is = new FileInputStream(file);
                   long length = file.length();
                   // You cannot create an array using a long type.
                   // It needs to be an int type.
                   // Before converting to an int type, check
                   // to ensure that file is not larger than Integer.MAX_VALUE.
                   if (length > Integer.MAX_VALUE) {
                        // File is too large
                   // Create the byte array to hold the data
                   byte[] bytes = new byte[(int)length];
                   // Read in the bytes
                   int offset = 0;
                   int numRead = 0;
                   while (offset < bytes.length
                        && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                        offset += numRead;
                   // Ensure all the bytes have been read in
                   if (offset < bytes.length) {
                        throw new IOException("Could not completely read file "+file.getName());
                   // Close the input stream and return bytes
                   is.close();
                   return bytes;
    Problem: The class file is not in the proper package (d:\temp\bla.class) where the proper package is d:\something\temp\bla.class.
    Objective: I just want to base on the bla.class (no matter where is it located), then get the package of the classfile (bla.class) like example something.temp.
    Simple as that but I don't know how to do :(.

  • How do you specify class file for appletviewer?

    List,
    I have searched over dozens of posts for "NoClassDefFoundError" and "wrong name" as well as "appletviewer" and others. I have read many posts about people who have the same problem I do, but I still can't seem to find a remedy:
    My machine is running Windows ME
    My application runs fine stand-alone
    (it's main() method sets up and runs the init() method it is intended to be an applet)
    My classpath includes "." as well as the JDK directory and the full path to my applications jar file
    All classes are part of the package iCalendar and jar'd in a file called iCalendar.jar
    When I compile and run my app stand-alone I use the following:
    javac ./iCalendar/ViewController.java
    java iCalendar.ViewController
    However I cannot get the application to run in either appletviewer or the browser. My applet tag is as follows:
    <APPLET CODEBASE="." CODE="ViewController.class" ARCHIVE="iCalendar.jar" width=700 height=700>
    I consistently get the message NoClassDefFoundError wrong name: iCalendar/ViewController
    So if anyone could tell me what set up is need to get this app running in appletviewer/browser I would be greatly appreciative, I've been on this all day!
    Patrick

    Drop one iCalendar out. The classpath should not
    contain the path C:\JavaObjects\iCalendar.I did this, I also removed all duplicate copies of the .class files to make sure appletviewer only has the jar file to work with. My new CLASSPATH is:
    .;C:\JavaObjects;C:\JavaObjects\iCalendar\iCalendar.jar
    You should also decide whether to use the jar file or
    not - that can cause problems with netscape -
    weird problems.I definetely want to figure this out using the jar file, I want the entire jar downloaded to minimize trips to the server.
    Try putting iCalendar.jar and iCalendar.html to
    another directory and it should work - somehow
    (probably because of the classpath or because
    iCalendar.html is not where it should be) the
    appletviewer is picking the class from outside the
    jar.I created a directory off of the root C drive and called it temp, I copied the jar file and the html file to the temp directory and then tried appletviewer from the command line:
    NoClassDefFoundError: ViewController (wrong name: iCalendar/ViewController)
    Can this be because the jar file contains all of the class files whom all belong to the package iCalendar? Because to run it stand alone I must address iCalendar.ViewController, do I need to jar these files differently, and if so can I jar the directory structure?
    Thanks again for the help, I have no clue at this point.

  • Importing a PAR file ---- not able to retrieve java class files(components)

    hi all....
    i've gota .par file....which i imported into NWDS.
    i can find all da files except the component classes i.e java class files...in the corresponding packages.
    can anyone help me.....
    thanx in advance....
    regards,
    Sudheer

    Hi Sudheer,
    you do not need the NWDS to find out what's in a PAR file. Basically, PAR files are ZIP archives. Rename the the PAR file (change the suffix to ".zip") and open it with your standard archive tool (WinZip, WinRar, etc.)
    Best regard,
    Martin

  • Error while using .jar file instead of class file.

    Hello friends,
    I created a java class which are referred and called from other jsp\xml and java files. I compiled this java class and everything is working properly. However, I do not want to use class files but want to use jar files instead. So, I created a jar file of this class file by using the command "jar -cvf jarfilename.jar".I kept the jar file in its respective folder .Also, I removed the class file from its path, just to see that the jar file will work automatically.
    Unfortunately, I am getting an error:
    java.lang.RuntimeException: Component.createComponent(...) Component class not found: <java class path>. I also tried giving the path of this jar file in the classpath. This also does not seem working.
    How to solve this problem?
    Thanks,
    Ranjith M.V
    Edited by: RanjithM.V on May 11, 2008 10:34 PM

    You probably populated the jar file incorrectly.
    A common mistake is to include the path that you had on the classpath, in the jar file.
    So a person will have a classpath like this: /foo/
    And a class in a package bar, like this:
    package bar;So that other classes would include the file like this:
    import bar.TheClass;And the class file is on the filesystem like this:
    .../foo/bar/TheClass.classThen they'll create the jar file including the foo directory, so if they list the jar's contents, they'll see the above (/foo/bar/TheClass.class). But this is wrong. It should start off so that the jar entries start with the top-level package names (like /bar/TheClass.class).
    Maybe you've done that.

Maybe you are looking for