Manually extract WAR file?
I have a completed JSP/servlet website that I'm trying to deploy on a webhosting site but I'm having some problems. The root directory is apparantly /html and then there's a /web-inf folder in that that containts a /classes and /lib folder. I've tried placing the war file in the /html and the /web-inf folder and having them restart tomcat, but it won't automatically uncompress the war file. I don't have access to any of the server configuration files. Is there a line of code I can use to telnet in and manually extract the war file?
Easy enough,
*.jar, *.war, and *.ear files are really zip files. What you can do is use the jar command "jar -xf file.jar" since your extention is war you might want to do "mv blah.war blah.jar". I am not sure if jar will spit errors cause of the extention. So just rename the war file if it does.
You can also do "mv blah.war blah.zip" followed by "unzip blah.zip"
I hope this helps.
-Richard Burton
Similar Messages
-
how to extract war file? explain technoloby behind in war
hi
go to your dir :
jar xvf filename.warhelp, simply type jar, above baluc mention is right, jar/war/ear is like a zip file contains *.classes, images, xml , etc....
jar i hope it will help u -
Cannot extract .war file in linux
Hello,
I had a problem in extracting .war file.
I got a .war file to deploy in weblogic application server.
I want to extract this file and look inside it (need to edit) but i couldn't.
I use this commnand and got following error.
[sarad.mk@inek2 sampleapp]$ ls
orgtestApp.war testApp.war
[sarad.mk@inek2 sampleapp]$ jar -xvf orgtestApp.war
bash: jar: command not found
Can anyone please help me out quick. I am in real difficult.
Thanks in advance,rocky777 wrote:
Hello,
I had a problem in extracting .war file.
I got a .war file to deploy in weblogic application server.
I want to extract this file and look inside it (need to edit) but i couldn't.
I use this commnand and got following error.
[sarad.mk@inek2 sampleapp]$ ls
orgtestApp.war testApp.war
[sarad.mk@inek2 sampleapp]$ jar -xvf orgtestApp.war
bash: jar: command not found
Can anyone please help me out quick. I am in real difficult.
Thanks in advance,Re: jar -xvf orgtestApp.war
This means you have not been able to locate the 'jar' command on your local path:
( echo $PATH ).
The solution is to locate the full path to a jar command. These are likely to be in a java sdk bin directory; if you have one on your machine. You should then be able to work by adding that directory to your path or perhaps specifying the full path to the jar file.
Some other utilities are able to do this also: in checking my memory on this i seen the following thread on java coderanch: http://www.coderanch.com/t/91536/java/edit-war-file-JSP -
Extract WAR file while deploying
hi
Is there any way or option which we need to give in deployment descripter to
extract the war file while deploying.
Any one can suggest me how to proceed in this aspact.
Thanks and Regards
Anand MohanAnand,
Can you give a context for this question? Are you packaging your J2EE modules
into an ear file and need to extract the war file? What is the use case for
the scenario you are describing?
Chuck Nelson
DRE
BEA Technical Support -
Any option to extract WAR file at the time of deployement?
hi
Is there any attribute to extract the WAR file at the time of deployment.Please
Help me if any one know about this one.
Regards
Anand MOhan
On Wed, 04 Dec 2002 00:30:57 +0000, Anand wrote:
>
> hi
> Is there any attribute to extract the WAR file at the time of deployment.Please
> Help me if any one know about this one.
>
> Regards
> Anand MOhan
Not quite sure what you are asking. Are you saying to extract the files
inside the WAR file during deployment? To do deployment, either with
packaged or exploited view deployment only.
Thank you,
Neo Gigs
"Follow the white rabbit..."
-
Error while deploying war file with jsp precompile option in weblogic 7.0
Hi
I am trying to precompile jsp file which is there in a war.Main jsp file code
includes one more jsp which is there in other folder under defaultweb directory.
While deploying the war i am getting the following error.Can any bosy help me
in this regard
<Nov 23, 2002 5:01:28 PM IST> <Error> <HTTP> <101045> <[ServletContext(id=464413
3,name=ArkinTestWeb,context-path=/ArkinTestWeb-3)] translation of /Admin/account
_access.jsp failed: weblogic.utils.ParsingException: nested TokenStreamException
: antlr.TokenStreamException: Could not include ./../includes/sessionStatusPage.
jsp>
<Nov 23, 2002 5:01:28 PM IST> <Error> <Deployer> <149201> <The Slave Deployer
fa
iled to complete the deployment task with id 1 for the application ArkinTestWeb.
weblogic.management.ApplicationException: Prepare failed. Task Id = 5
Module Name: ArkinTestWeb, Error: Could not load ArkinTestWeb: weblogic.utils.Ne
stedException: ArkinTestWeb:ArkinTestWeb Failure while Precompiling JSPs: weblog
ic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamExcepti
on: Could not include ./../includes/sessionStatusPage.jsp - with nested exceptio
n:
[weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStream
Exception: Could not include ./../includes/sessionStatusPage.jsp]
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:657)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:548)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
veDeployer.java:1026)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
loyer.java:700)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
dler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
>
Regards
Anand Mohan
Hi,
1] Remove following from server.xml
<Context path="/SEA" docBase="SEA" debug="0"/>
2] Paste SEA.WAR (test WAR file) into /webapps of TOMCAT
3] Start Tomcat Server - This will create SEA folder under webapps
4] Stop server.
5] Add following to server.xml
<Context path="/SEA" docBase="SEA" debug="0"/>
6] Start Tomcat Server
7] Access the URL.
This will work. Somehow Tomcat does not extract war file contents which are mentioned in server.xml.
I have Apache Tomcat 4.0.3 and faced this problem. The above solution works for it.
Regards,
Sandesh
hi.
I have put my SEA.WAR (test WAR file) into /webapps of
TOMCAT.
I checked the server.xml and put:
<Context path="/SEA" docBase="SEA" debug="0"/>
I restarted TOMCAT and tried to execute the file:
http://localhost:8080/SEA/index.jsp
But I got error message:
Apache Tomcat/4.0.3 - HTTP Status 404 -
/SEA/index.jsp
What was happenning?
Anyone can help me?
Thank you. -
Problem in deploying war file to weblogicportlet
Hi,
while running build file of portletpreparer tool to create .portlet files from the war.
The build file extracts war file into tempDir and its raises null pointer exception when it runs "com.bea.task.PreparePortlets" class.
code is :
<taskdef name="preparePortlets" classname="com.bea.task.PreparePortlets" classpath="classes" classpathref="class.path"/>
<property name="tempDir" value="tempDir"/>
<target name="clean">
<delete dir="${tempDir}"/>
</target>
<target name="extractWar" depends="clean">
<mkdir dir="${tempDir}"/>
<unwar src="${war.file}" dest="${tempDir}"/>
<preparePortlets tempDir="${tempDir}" portletDir="${tempDir}/portlets"/>
</target>
Running the above build also fails for DeployingJavaPortlets.zip obtained from URL
http://dev2dev.bea.com/pub/a/2004/09/deployJava81sp3.html download link.
If any one knows help me.Hi,
while running build file of portletpreparer tool to create .portlet files from the war.
The build file extracts war file into tempDir and its raises null pointer exception when it runs "com.bea.task.PreparePortlets" class.
code is :
<taskdef name="preparePortlets" classname="com.bea.task.PreparePortlets" classpath="classes" classpathref="class.path"/>
<property name="tempDir" value="tempDir"/>
<target name="clean">
<delete dir="${tempDir}"/>
</target>
<target name="extractWar" depends="clean">
<mkdir dir="${tempDir}"/>
<unwar src="${war.file}" dest="${tempDir}"/>
<preparePortlets tempDir="${tempDir}" portletDir="${tempDir}/portlets"/>
</target>
Running the above build also fails for DeployingJavaPortlets.zip obtained from URL
http://dev2dev.bea.com/pub/a/2004/09/deployJava81sp3.html download link.
If any one knows help me. -
Deploying war files on iplanet web server 6.0
Hello All,
I tried to deploy an war file on iplanet web server 6.0 using both command line wdeploy and iplanet webserver browser based admin tool. Both the times it did say successfully deployed. I checked the WEB-INF files and it does contain all class files..But the problem is when I try to post a form to one of the class files the error log says as if it cannot find the class file.(I tried the sample app HelloWorld supplied by vendor)
=========
05/Mar/2002:13:19:14] config (13777): for host xx.xx.xx.xx trying to POST /samples/helloworld/GreeterServlet, handle-processed reports: The request method is not applicable to this requested resource.
=================
any help in this regards is appreciated
Thanks
sudhirHello,
I got few steps to deploy the WAR file, if you followed the same steps and got the error then ignore this else try with this steps.
a) Set your environment variable IWS_SERVER_HOME to your server_root directory.
b) Add the server_root/bin/https/httpsadmin/bin directory to your classpath.
c) Configure your virtual server for web applications.
From the Server Manager page, select the VirtualServerClass tab, select a Class, and click the Manage button.
Select a Virtual Server and go to the Java Web Apps Settings page for that virtual server. Make sure that the virtual server has Web Apps State turned On, and web-apps.xml is the name of Web Apps File.
To extract the sample WAR file HelloWorld.war in server_root/plugins/servlets/examples/web-apps/HelloWorld, use the wdeploy command as follows:
wdeploy deploy -u /hello -i server.iplanet.com -v testvs -d
/iws60/https-server.mydomain.com/testvs/web-apps/hello
/iws60/plugins/servlets/examples/web-apps/HelloWorld/HelloWorld.war
The syntax for the command is as follows:
wdeploy deploy -u uri_path -i instance -v vs_id [-d directory] war_file
uri_path Specify the URI prefix (a path to access the web application from the browser).
instance Specify the server instance name. (Note: Do not include "https" in the front.)
vs_id Specify the Virtual Server name as it appears on the Manage Virtual Servers page.
directory Specify a directory to extract WAR files. If this directory doesn't exist already, it will be created for you now.
war_file Specify the name of the WAR file.
If the WAR file is extracted successfully, the message "web application deploy successful" appears at the command line.
For verification, go to the /iws60/https-server.iplanet.com/testvs/web-apps/hello directory. It should have the following contents:
colors
index.jsp
META-INF
WEB-INF/
web.xml
/classes/
HelloWorldServlet.class
HelloWorldServlet.java
SnoopServlet.class
SnoopServlet.java
In the server_instance/config directory, the web-apps.xml file should have the following entry:
<vs>
<web-app uri="/hello"
dir="/iws60/https-server.iplanet.com/testvs/web-apps/hello"/>
</vs>
Restart the server instance from the command line or go to the admin GUI and apply configuration changes to the server instance.
Now when you access the webserver instance in your browser, the Error log of that server instance will record successful initialization of the web application environment(web-apps.xml) for the virtual server(vs name). You can access the web application from a browser as follows:
http://server.Mydomain.com:80/hello/index.jsp
or:
http://server.Mydomain.com/hello/
The syntax is as follows:
http://vs_urlhost[:vs_port]/uri_path/[index_page]
Thanks
Selva -
9iAS Error in deploying WAR file
When i run the following command :
dcmctl deployApplication -f ............
It fails and return a ADMN-906013.
What should i do ???Hi,
1] Remove following from server.xml
<Context path="/SEA" docBase="SEA" debug="0"/>
2] Paste SEA.WAR (test WAR file) into /webapps of TOMCAT
3] Start Tomcat Server - This will create SEA folder under webapps
4] Stop server.
5] Add following to server.xml
<Context path="/SEA" docBase="SEA" debug="0"/>
6] Start Tomcat Server
7] Access the URL.
This will work. Somehow Tomcat does not extract war file contents which are mentioned in server.xml.
I have Apache Tomcat 4.0.3 and faced this problem. The above solution works for it.
Regards,
Sandesh
hi.
I have put my SEA.WAR (test WAR file) into /webapps of
TOMCAT.
I checked the server.xml and put:
<Context path="/SEA" docBase="SEA" debug="0"/>
I restarted TOMCAT and tried to execute the file:
http://localhost:8080/SEA/index.jsp
But I got error message:
Apache Tomcat/4.0.3 - HTTP Status 404 -
/SEA/index.jsp
What was happenning?
Anyone can help me?
Thank you. -
How to create a war file from extracted file-system on server?
Hi!
On a weblogic I have
to offer a test environment
where users can exchange classes in the folders
of the extracted archieve for faster testing.
Now I need a command (should be easily to use) where
you can achieve the following logic
create war-file host:user:passwort/webapp-folder
Is there anything? Up to now I havent find someting!
Nice greetings Starkialternatively you could create the required directory structure and use winzip to zip the file .. save the file with .WAR extention .
-
WAR file is not getting extracted even though server.xml is configured
Hi all,
I'm using tomcat 4.1...
I created the rmitunneler.war file which contains one servlet and configured the server.xml as the following:
<Context path="/rmitunneler"
docBase="/opt/uas/rmitunneler"
crossContext="false"
debug="0"
reloadable="true"
allowLinking="true"
caseSensitive="true" />[/b
I also put the war file in /opt/uas/rmitunneler and restarted tomcat, but the war file didn't get extracted. I tried to put the war file one directory above (/opt/uas) - but again with no success.
What could be wrong?From the Tomcat document :
"The Document Base (also known as the Context Root) directory for this web application, or the pathname to the web application archive file (if this web application is being executed directly from the WAR file). You may specify an absolute pathname for this directory or WAR file, or a pathname that is relative to the appBase directory of the owning Host."
I believe you need to put the file name in the docBase:
docBase="/opt/uas/rimtunneler.war" -
Starting Weblogic 6.1 failure extracting WAR classes file access denied
When I start Weblogic I get following error
<[WebAppServletContext(4057696,cert ificate,/certificate)] failure extracting WAR classes java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.
When I am shutting down weblogic with following command
java weblogic.Admin -url 10.170.80.140:7001 SHUTDOWN -username system -password mydomainIt is not shutting down properly
It does not show following message
E:\bea\wlserver6.1>goto finish
E:\bea\wlserver6.1>cd config\mydomain
E:\bea\wlserver6.1\config\mydomain>ENDLOCAL
which normally it should.Hi.
Not sure what could be the cause. Are you running the latest service pack (sp2)? If not
please upgrade and try again. You might also check rwx permissions on the war file and
the directories.
Regards,
Michael
Alex wrote:
Hi there,
I'm getting several error-messages when starting my weblogic 6.1 saying:
<Jan 10, 2002 9:07:32 AM CET> <Error> <HTTP> <[WebAppServletContext(4057696,cert
ificate,/certificate)] failure extracting WAR classes java.io.IOException: Permission
denied
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1162)
etc...
but the server is running and the applications work fine. Should I just ignore
the error-messages or how can I avoid them?
Any help is appreciated
thanx
Alex--
Michael Young
Developer Relations Engineer
BEA Support -
How to extract a WAR file..
Hi,
How to extract a WAR file.. please help me..
thanks in advanceHi,
It's simple. If u use tomcat server it put in webapps directory and start server u can see unzip war file. OR
If u have eclipse editor than u go to project explor and click right than select Export file-->War-->select War file where u put it and click next ---> finish.
try it -
Not able to create EAR file for WAR file extracted project
Hi Experts,
I am trying to import a WAR file, make changes to the project and create an EAR file for the same. I am not able to remove import
errors despite of adding required jar files to it.
Also, I am not able to create an EAR file for the same.
I have copied the steps here with screen shots. Below are the steps :
Import WAR file in NWDS 7.3 – Enterprise Portal perspective
Select WAR file to create WAR and EAR project for it.
Project created with import errors. e.g – com.sapportals.portal.prt*
Found jar file from Class – target jar file table.
e.g – for Class com.sapportals.portal.prt.resource.IResource needed jar file is tc~epbc~prt~api.jar
Copied required jar files in WEB-INF -> lib folder.
Configure Build path and Add External jars.
Portalapp file screen shot
I think errors should go now, but they still exist.
Next I right click on WAR project and tried updating related EAR project.
Next, Export EAR file from EAR project.
I have tried both EAR types.
But EAR file is not created.
Please help me in removing the errors.
Thanks in advance :-)
Anubha PandeyHi Anubha,
I feel that you're missing JAR dependencies and hence not able to resolve the above import errors.
Please go through the below thread for the AFP Masthead customization and follow the same:
How to download and change AFP Masthead on SAP Portal 7.3
Hope, this will help!!!
BR,
Anurag -
Deploying a Web Service w/o WAR files
I've seen several posts on this (including a few from me about a year ago), but I haven't seen anything from Sun on how to do this.
In JWSDP 1.1 xrpcc would create a *Config.properties file, and I would add the following to my web.xml file
<servlet>
<servlet-name>API</servlet-name>
<servlet-class>com.sun.xml.rpc.server.http.JAXRPCServlet</servlet-class>
<init-param>
<param-name>configuration.file</param-name>
<param-value>/WEB-INF/APIService_Config.properties</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>API</servlet-name>
<url-pattern>/api/*</url-pattern>
</servlet-mapping>The xrpcc tool would create all my stubs, and it would create the *Config.properties file referenced in the web.xml. I could bundle these with my other classes, and everything would work. Very nice.
JWSDP 1.2 introduced wscompile/wsdeploy. These tools started requiring WARs (which SUCKS for large projects during development, btw. PLEASE ADD OTHER OPTIONS, SUN!!!!!).
wscompile also quit creating the Config.properties file. However, I was able to keep my old build process working by holding onto the Config.properties files from 1.1 and using the same web.xml definition.
My questions are:
1. What tool generates this *Config.properties file? How can I get back to this?
2. Is the configuraiton I'm using optimal for use with 1.2 (I haven't even looked at 1.3 yet)?
3. Does anyone else build/deploy not using WAR files?!? Do you have any ideas/suggestions/experience that might be helpful.I dont know if this will help, but I also use a config.properties to load my servlet values and also using JWSDP 1.2 .
I manually create the config file ( since i know what values to expect )
I run wscompile/wsdeploy over my files to create the war file containing tie + wsdl + utility classes
This is then extracted to a temp directory .
Here I maually edit my web.xml and copy the config file across to WEB_INF directory .
Note that the wsdl file has to be in the same directory as the WEB-INF....
This may sound quite long winded to do , but works fine for me ..
Maybe you are looking for
-
This is quite a complicated request but I hope someone maybe able to make a suggestion. In lightroom when you are in the develop module detail module you have the optoin to mask the amount of sharpening on a photo. When you hold down the alt key / ap
-
Link to a file on a middle tier in notification
Dear, Can I have a link to the file located on the middle tier (or somewhere) on a workflow notification so that when a user clicks on a link it will open a file for reading? What item attribute can I use for this - URL? If yes what would be the synt
-
OAM and MS Active Directory Integration on Non-Windows Server envrionment
I will start by saying that I am dealing with a heterogeneous environment here where multiple systems are run by different levels of management. Our Oracle systems chose to go all *nix (Oracle Solaris and Red Hat Linux) and hence we do not have a sin
-
Trigger an outbound idoc to sender system after inbound idoc has status 53
Hi all, We have two different partners (say A and B)which send inbound idoc to ECC of same message type WMMBXY. This updates goods movement. The partner A collects the idocs(WE20 partner profile setting) and partner B trigger's immediately. Now our r
-
Problems playing movies from Time Capsule
I am having a problem playing movies from my Time Capsule to my Apple TV. I can make them work but have to go through the following process: I have to play the movie through iTunes and then stop it, and then go play the movie on apple TV. I have to d