War Files And Their Deployment and Redeployment

Howdy
I have a WAR file that a developer gave me which I deployed on a Linux box no problem.
Now I would like to add a jsp file and custom tag to this application.
This is what I tried:
I turned the war file into a zip file extracted the contents and then added my jsp page the class file for the custom tag modified the web.xml file for the tag and added a tld file for the tag as well.
Then I rezipped the files and renamed to a .war file and deployed it on the linux box. The previous existing files work but my new jsp page comes up with a HTTP 404 Not Found error.
Now the new jsp and custom tag work on my development machine just not on the live server when reployed into the other existing app.
What am I missing? Or am I totally off with trying to redeploy the app in this way?
Any help appreciated.
Adam

For deployment you need to use ant

Similar Messages

  • War file and deployment

    Hi,
    im new to j2ee and there are some qns i hope you can help me with.
    1. why is there a need to put my jsp and servlets in a .war file?
    2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?
    thanks a lot!

    1. why is there a need to put my jsp and servlets in a .war file?Answer- As technology evolved over ther period of time, it became more and more evident that the smaller and easier the things the better it is. WAR format is a ZIP format created to deploy your web application data. Hence called WAR(Web Application Archive). It usually contains your Images, JSP pages, and servlets and other related helper files needed by your web application. Java being a cross platform technology, it becomes easy and standardized to distribute your application(web) to other vendors/teams/people if one makes use of a WAR file. Once dropped in the root directory of the App server(i mean the proper webapp directory) the application server is smart enuf to load your WAR file and create respective directory structure.
    2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?Answer:- When you add the EJB files and distribute it along with your WAR file, its called EAR(Enterprise Archive) which is WAR+ EJB jar files. As for the JSP's they form a part of the WAR and should be bundled up while creating the WAR file.
    Hope this answers the question.

  • Porting *.war files and *.ear files to Weblogic 10.3

    If we can figure this issue out, I'll see if I can't publish/post a
    maven-based solution in the Maven and Oracle forums so that others
    will not have to go through our pain.
    We are having all the usual problems regarding where Weblogic expects
    to find things and what exclusions need to be made in weblogic.xml for
    war files and weblogic-application.xml for ear files. Any insights
    would be deeply appreciated.
    Here is what our exploded war structure currently looks like.
    |____index.jsp
    |____WEB-INF
    | |____lib
    | | |____...a long list of jar files
    | |____tags
    | | |____...a short list of tag files
    | |____applicationContext.xml
    | |____web.xml
    | |____content
    | | |____...a bunch of jsps
    | |____tlds
    | | |____...some tlds
    | |____classes
    | | |____mailProperties.properties
    | | |____struts.xml
    | | |____logback.xml
    | | |____com ... the root of our class heiarchy
    |____images
    | |____...a list of images
    |____META-INF
    | |____maven
    | | |____com
    | | | |____project-name
    | | | | |____pom.xml
    | | | | |____pom.properties
    | |____MANIFEST.MF
    |____script
    | |____...some java script files
    |____style
    | |____...some css files
    Exceptions when trying to deploy are as follows:
    INFO: ... initialized Struts-Spring integration successfully
    java.lang.Exception: Could not load
    servers/AdminServer/tmp//appmergegen_1254502686535_OurApp/war/WEB-INF/classes/com...
    at com.opensymphony.xwork2.util.finder.ClassFinder.readClassDef(ClassFinder.java:745)
    at com.opensymphony.xwork2.util.finder.ClassFinder.<init>(ClassFinder.java:148)
    The exception above repeats for every .class file found below
    WEB-INF/classes/com, i.e. the the ones in this module rather than the
    ones in included modules.
    Checking the file system shows that there is no such directory as
    "appmergegen_1254502686535_conap". I'm uncertain if there is actually
    supposed to be anything there, but it would seem like it.
    I've a theory that if we can solve the above issue, we can solve the
    rest ourselves.
    It would also be handy to know what packages may cause conflicts.

    Alright, my research points to the idea that this might have something to do with staging. Since this is a dev setup we don't have any managed servers or anything. All we have is AdminServer and that is it. We have only one domain and it is "base_domain". Does anyone know if this is wrong?

  • Difference between .war file and .ear file

    Hi,
    what is the difference between .war file and .ear file ?
    Please let me know with appropriate explanation.

    War file means web application archive. It is archived file having a collection of JSP, servlets and static pages that together costitute a web application. It contains one WEB-INF directory which will have a file named web.xml which defines the structure of the web application.
    On the other side EAR file is Enterprise application archive. It is file having packaged content of one or more modules into a single archive so that the deployment of all the modules can be done simultaneously on the application server. It also contains XML files called deployment descriptors which gives the details of the deployment method. This deployment descriptor will be present in the folder META-INF folder.
    So the main difference betwwen the two is that Ear file is having collection of various modules to be deployed on the application server while the WAR file is used to deploy the web applications.

  • Behaviour differences between  war file and exploded directory

    Hi,
    I'm baffled by differences in how my web app behaves when deploy in a war file and when deployed in exploded directory.
    Firstly when I deploy in exploded directory format (using wldeploy in ant) - the jsps do not precompile. However, when I deploy the war file - again using ant and wldeploy - precompile works just fine - and general performance seems better.
    Secondly - the webapp has a pdf file - which is used as a template to dynamically produce a document. When deployed
    in exploded format - the webapp works fine and is able to read the pdf. However, when I deploy in war file, the pdf cannot be read.
    Surely the behaviour should be the same whether we deploy as a war or exploded.
    Someone please help
    Tariq

    Some behaviors will be different between a WAR file deployment and an exploded WAR deployment.
    With respect to JSP precompile, you just say "they do not precompile", so I can't tell anything about that.
    When you read files from an exploded WAR, you can reference them in two ways: as a resource, or as an absolute file path. When you read files from a WAR file, you can only read files as a resource, and not as an absolute file path. You're not giving any information about how you're reading the file, so I can't tell about that either.
    You'd have to provide more detail to get better answers.

  • WAR file fails to deploy WEB-INF/classes

    Hi All
    I am attempting to get a simple JPA on JSE app running on WLS 9.1. I can deploy my WAR file and access the jsps no problem, however the WEB-INF/classes directory is empty on deployment. How can I tell if the classes are being deployed correctly? I have tried using autodeploy and console deployment, always with the same result. My war file is structured as follows:
    WEB-INF/
    WEB-INF/faces-config.xml
    WEB-INF/weblogic.xml
    WEB-INF/web.xml
    WEB-INF/classes/
    WEB-INF/classes/my/test/package/{all classes}
    WEB-INF/lib/{all reqd libs}
    index.jsp
    When I run the jsp, there are no errors, the classes just don't appear to be doing anything. The logs have absolutely nothing to help with this, I turned on app logging in weblogic.xml and it has nothing other than the initialization in it either.
    I've deployed and run the exact same app (less the weblogic.xml file) successfully on Tomcat and OC4J, any ideas out there? Am I looking in the right place for the deployed class files (Checking the WL_HOME/samples\domains\wl_server\servers\examplesServer\tmp\_WL_user\jpa-example\xb6q08)?

    Hi,
    I've faced the same issue in WLS9.2, and but it didn't affect my web application running, I guess that the classes are read from the WAR file directly, so for me to overcome this issue, I've changed the technique of how to install web application by selecting extracted war installation instead, and from the WLS Console selected
    "I will make the deployment accessible from the following location" and selected the folder that contains the extracted WAR.
    Hope this will help,
    Issa

  • How to uninstall a war file which is deployed as library in console

    Hi All,
    How to uninstall a war file which is deployed as library in console.
    Thanks in advance

    You cant uninstall it........first stop it , then delete it and then activate the session.
    Hope this helps.
    Regards,
    Karan
    Oracle Fusion Middleware Blog

  • War files and configuration files

    Hi,
    I'm trying to deploy servlets using a WAR file. Everything works fine except I can't read the configuration files from the servlet code.
    The code reading the configuration file is as follows:
    input = ClassLoader.getSystemResourceAsStream("test.properties");
    properties.load(input);
    Of course this code assumes that the file "test.properties" is in the class path.
    Where should I put the property file in the WAR file so that it is in the class path?
    If this can�t be done, how should I structure my code around this problem?
    I�m using Tomcat 3.2�
    Thank you very much

    I haven't had any trouble accessing properties files in the WEB-INF\classes using the following...
    public class MyAnchor
         private static Properties properties = new Properties();
         static
              URL url = MyAnchor.class.getResource("mywebapp.properties");
              try
              properties.load(url.openStream());
              catch(Exception e)
              e.printStackTrace();
    public static final String PROP_CONSTANT_1 = properties.getProperty("prop_constant_1");
    But I have now run into problems when trying to create a WAR file with the J2EE Deploy Tool, which will only allow *.class files to sit in the WEB-INF\classes directory.
    I'll be really annoyed if I have to change the properties file name to mywebapp.class just to get around this problem.
    Has anyone else found this?? I know I can add the *.props manually, but again would prefer not to.
    I'm hoping its only a J2EE problem and deploying to other servers will not have this requirement.

  • War files and server classpath on 6.1

    We used to have all of the jsp's and html exploded in a WebApp and the
              WebApp just used the same classes and property files the server was using,
              now we put all these files in a war file.
              My question is do I have to take the server classes and property files and
              put them in the war file also. Or is there another way in which I can still
              use the same server classes and property files. This is causing alot of
              headache trying to keep theses classes and property files in sync especially
              if we have to move them from one server to another, which each server having
              its on property files.
              Any help would be appreciated.
              Thx Kye
              

    What server classes are you using? They will still be available from any
              weblogic server instance.
              What property files are you using? Are these your own properties or weblogic
              properties? Are you confusing these with web.xml and weblogic.xml that live
              under WEB-INF? Managed servers don't need a config.xml file since they
              obtain all their configuration info from the admin server at startup.
              Alex
              "Kye" <[email protected]> wrote in message
              news:3c1048fb$[email protected]..
              > We used to have all of the jsp's and html exploded in a WebApp and the
              > WebApp just used the same classes and property files the server was using,
              > now we put all these files in a war file.
              >
              > My question is do I have to take the server classes and property files
              and
              > put them in the war file also. Or is there another way in which I can
              still
              > use the same server classes and property files. This is causing alot of
              > headache trying to keep theses classes and property files in sync
              especially
              > if we have to move them from one server to another, which each server
              having
              > its on property files.
              >
              > Any help would be appreciated.
              >
              > Thx Kye
              >
              >
              

  • Wl6.1, war files and 2 letter jar files....

    Hi,I have finally found why my WAR file isn't loading with weblogic 6.1. It seems that it doesn't like two letter class libraries (eg ab.jar) and will through a vague error message at deployment (Prefix string too short). I don't know what has changed between 6.0.2 and 6.1 in this area, but its worth making it apparent to developers in general.Regards,Mark BarryHewlett-Packard Consulting

    Are you saying that this error doesn't occur in 6.0?
    I think i knew what's the problem is, but it would be helpful if you could post the stack trace?
    Mark Barry wrote:
    Hi,I have finally found why my WAR file isn't loading with weblogic 6.1. It seems that it doesn't like two letter class libraries (eg ab.jar) and will through a vague error message at deployment (Prefix string too short). I don't know what has changed between 6.0.2 and 6.1 in this area, but its worth making it apparent to developers in general.Regards,Mark BarryHewlett-Packard Consulting

  • WAR file and necessary Tomcat settings

    Hello all,
    These are some basic questions i came across while deploying web application.
    I think, servlet being very basic for j2ee, it should be thouroghly dealt with.
    1. What is developer's role with respect to WAR file? Is it created autometically by Tomcat or developer has to create it and how?
    2. If i have to deploy a web application in Tomcat container, which are different essential settings i need to make in different config files such as server.xml, web.xml? Eg. time-out in wb.xml.
    3. What are server.xml & web.xml? is it a part of servlet specifications?
    I know you might find these very abcd.
    Thanks in advance.

    I'm using iPlanet Webserver but I've been working with these files so some of the stuff I know may help you.
    1. What is developer's role with respect to WAR file?
    Is it created autometically by Tomcat or developer
    has to create it and how?I think it's mostly a developer thing (not knowing much about Tomcat). Creating WAR files is quite simple - have a look here:
    http://access1.sun.com/techarticles/simple.WAR.html
    3. What are server.xml & web.xml? is it a part ofservlet specifications?Web.xml contains information about the servlets in the webapp. Server.xml contains a line which tells the server where the webapp has been deployed to.
    The following document is useful from an iPlanet point of view and may give you some more answers:
    http://docs.sun.com/db/doc/817-1833-10
    Hope this helps a little :)

  • War file and new Trusted attributes since SE 6 update 19

    We deploy a war file which provides multiple applets. The new mixed code warning dialog is being displayed multiple times per user session (whenever a user selects another applet). Our war file contains multiple signed jar files, and several other components/files that are not packaged in a jar file.
    Adding "deployment.security.mixcode=HIDE_RUN" to a client PC's deployment.properties file suppresses the new warning dialog, but is not a practical solution for our web customers.
    #1) Is there any logging facility available in a develop/test environment that identifies the offending unsigned item(s) ?
    #2) To use the Trusted-Only attribute, must every component/file in our war file be packaged in a signed jar file, or is there another alternative ?
    #3) For this issue and for similar deployment issues, how likely is the hope that the Oracle Java team will improve upon these Update 19 mixed code enhancements in a near-future Update ?

    What are you missing?
    I inherited this app and signing the third party jars is how it was setup, I was wondering the same thing too, why was it necessary to sign the third party jars?
    The applet runs in either JRE 1.6.0_13 or JRE 1.6.0_27 depending on the other Java apps the user uses. JRE 1.6.0_13 does not have the mixed code security (so it is like is disable), but JRE 1.6.0_27 does have the mixed code security and the applet will not launch with mixed code security enable, so we have to disable it. With all the hacking going on in the last two years, is important to improve security; so this is a must.
    Yes, I always clear up the cache.
    Any idea on how to resolve this problem?

  • War file and access control with WebLogic

    I am trying to put some access control on different files in my war-file, but just can't get it to work... It seems like all roles defined in weblogic.properties gives the user access to all files in the war. I just don't understand the connections between the security realm, the weblogicURL.policy file and the web.xml file... If I do not specify a weblogic.security.URLAclFile, no access control is done at all.
    This is how my weblogic.properties file looks like:
    weblogic.security.URLAclFile=e:\\weblogic\\weblogicURL.policy
    weblogic.password.koko=kokokoko
    weblogic.password.arnebelinda=arne1234
    weblogic.security.group.ppuseradmins=arnebelinda
    and my weblogicURL.policy:
    deny Principal weblogic.security.acl.GroupImpl "everyone" {
    Permission weblogic.security.acl.URLAcl "weblogic.url", "/admin/-";
    and finally, my web.xml-file:
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
         <session-config>
              <session-timeout>30</session-timeout>
         </session-config>
         <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
         </welcome-file-list>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>admin</web-resource-name>
                   <url-pattern>index.jsp</url-pattern>          </web-resource-collection>
              <auth-constraint>
                   <role-name>ppuseradmins</role-name>
              </auth-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>WebLogic Server</realm-name>
         </login-config>
         <security-role>
              <role-name>ppuseradmins</role-name>
         </security-role>
    </web-app>
    it does not matter which user is part of the ppuseradmins group. The user koko is not a member, but is given access to my whole .war anyway (after submitting correct username/password). Omitting the <realm-name> does not seem to work either; the default realm is not used, instead null is used.
    Does anybody have a clue? I would really appreciate it!
    I am using WebLogic 5.1 sp 9
    best regards,
    PJ

    In you pocily file entry, you have specified "/admin/-"
    However, in the <security-constraint> element in web.xml, your <url-pattern> is not set to /admin
    Could that be the problem ?

  • War file and access control

              I am trying to put some access control on different files in my war-file, but just
              can't get it to work... It seems like all roles defined in weblogic.properties
              gives the user access to all files in the war. I just don't understand the connections
              between the security realm, the weblogicURL.policy file and the web.xml file...
              If I do not specify a weblogic.security.URLAclFile, no access control is done
              at all.
              This is how my weblogic.properties file looks like:
              weblogic.security.URLAclFile=e:\\weblogic\\weblogicURL.policy
              weblogic.password.koko=kokokoko
              weblogic.password.arnebelinda=arne1234
              weblogic.security.group.ppuseradmins=arnebelinda
              and my weblogicURL.policy:
              deny Principal weblogic.security.acl.GroupImpl "everyone" {
              Permission weblogic.security.acl.URLAcl "weblogic.url", "/admin/-";
              and finally, my web.xml-file:
              <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
              "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
              <web-app>
              <session-config>
              <session-timeout>30</session-timeout>
              </session-config>
              <welcome-file-list>
              <welcome-file>index.jsp</welcome-file>
              </welcome-file-list>
              <security-constraint>
              <web-resource-collection>
              <web-resource-name>admin</web-resource-name>
              <url-pattern>index.jsp</url-pattern> </web-resource-collection>
              <auth-constraint>
              <role-name>ppuseradmins</role-name>
              </auth-constraint>
              </security-constraint>
              <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>WebLogic Server</realm-name>
              </login-config>
              <security-role>
              <role-name>ppuseradmins</role-name>
              </security-role>
              </web-app>
              it does not matter which user is part of the ppuseradmins group. The user koko
              is not a member, but is given access to my whole .war anyway (after submitting
              correct username/password). Omitting the <realm-name> does not seem to work either;
              the default realm is not used, instead null is used.
              Does anybody have a clue? I would really appreciate it!
              I am using WebLogic 5.1 sp 9
              best regards,
              PJ
              

    In you pocily file entry, you have specified "/admin/-"
    However, in the <security-constraint> element in web.xml, your <url-pattern> is not set to /admin
    Could that be the problem ?

  • WAR file and CSS

    I have a CSS file that is used inside a JSP page. These files are both in the same directory. The problem that I'm having is that when I deploy it on JBoss+Tomcat, for some reason, the JSP page doesn't display any of the classes. It's like it's not finding the CSS file. I did a little test on the side, by defining the styles inside the JSP and it worked fine.
    Has anybody had this problem before? Can anybody help me?
    I would truly appreciate any input.

    Solved it. My problem was in the href. I thought that I could include it with a simple reference to the file due to that fact that they're both in the same directory. But this didn't work. So what I did was include the whole path to the css file, and it worked.
    Thanx

Maybe you are looking for

  • Can't open BIOs Set-up, K8N SLI Platinum, after re-flash

    I used the USB Bio flash tool from the forum to re-flash the BIOs on my K8N SLI Platinum board to the latest BIOS from the MSI site, specs below. After the re-flash, which seemed to go okay, I cleared the CMOS (turned off and unplugged computer, push

  • Magic Trackpad won't work with Magic Mouse on brand new 2011 27" i5 iMac

    I have a brand new 2011 27" i5 iMac which I bought with Snow Leopard pre-loaded. Naturally, I included the new Magic Trackpad in my purchase, and though there were some problems with the device in SL - such as it going haywire without explanation - i

  • Email Feature in Acrobat 9

    Hi Friends, I have been using acrobat 7 for long and recently upgrade to acrobat 9 reader. In Acrobat 7 there used to be a email icon on the toolbar which allows user to attched the pdf document as link/attachment in email and sent it via oulook from

  • Error messages when trying to mark response as "solved" or "helpful"

    For about 3 weeks I receive error messages when I try to mark any responses to my questions as "helpful" or "solved." I've posted the error message below. Is there a way for me to solve this? I have been unable to find contact info for a system admin

  • Pasting files into Illustrator

    Hi, I am running Illustrator CS 11.0.0 on a MacBook Pro OS 10.6.7. I am suddenly having problems copying and pasting files from some graphic applications (DeltaGraph and Prism) into an open Illustrator file. I used to be able to do this easily. Is th