Solved

I've got a WAR-file, what now?

Posted on 2011-09-22
13
391 Views
Last Modified: 2012-05-12
Hey!

I've recieved a few WAR files that I need to be able to open, edit in some easy fashion and then recompile/export. I've been able to extract all the project-files from the WAR using Unarchiver(Macs version of winRar), but I've got no clue where to find the text. I'm only able to find a few images here and there... Quite confusing!

Which IDE/application should I use(got Eclipse but no way of importing WAR-files?) ? And how do I edit all the text in the project? Is there some easy way to gain access to the database or files with all the variables?

Thanks for any help!

Cheers,
Chris

I've got a Mac but if necessary I can procure a PC for this task.
0
Comment
Question by:Somersault
  • 6
  • 5
  • 2
13 Comments
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 36580707
Jsut put it in tomcat server in webapps folder , and restart your tomcat then you can extract what in War file
0
 
LVL 4

Author Comment

by:Somersault
ID: 36580717
dravidnsr: Thanks for the answer, but I'm going to need to recompile it to deliver to the right person. Tomcat is merely for deploying no?
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 36580741
Recomplie what ??

My step is for deploying only . deploying is some what extration only so it will extrat with all folder .
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 36580761


Or use Eclipse

1.Select File > Import .
2 select WAR file and then click Next.
3.Locate the WAR file that you want to import using the Browse button.
4.The wizard assumes you want to create a new Web project with the same name as the WAR file. If you accept this choice, the project will be created with the same servlet version as specified by the WAR file and in the same location. If you want to override these settings, you can click New and specify your new settings in the Dynamic Web Project wizard.
5.Click Finish to populate the Web project.
0
 
LVL 4

Author Comment

by:Somersault
ID: 36580763
Yes. But that is only part of what I asked for. :) I already have it extracted, what I would like to know is how you actually can edit the project in a sane manner. And how you would recompile it after making the necessary changes.
0
 
LVL 4

Author Comment

by:Somersault
ID: 36580780
dravidnsr: Alright, thanks. I'll have a look at that!

Cheers,
Chris
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 36580788
Ok thats gd ...

crtl+B (build) then it  will as you to config server , if you alreday done the server config then it will build wiill compile your code .

after that run you build script that it ...
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 36580795
build script  run is for creating war file
0
 
LVL 4

Author Comment

by:Somersault
ID: 36580894
Okay, now I've imported the WEB-INF folder and so on into Eclipse, so that's great. How would I go about checking any databases or similar that is in the project? Would I need some add-on to Eclipse or is it possible from the get-go?

Sorry, never worked with a Java web archive before. :)

Cheers!
Chris
0
 
LVL 20

Accepted Solution

by:
Sathish David  Kumar N earned 300 total points
ID: 36585181
you can check the property file ...

in that property file they will define the DB conntion URL ,username,password  and all
0
 
LVL 10

Assisted Solution

by:gordon_vt02
gordon_vt02 earned 200 total points
ID: 36586749
You need the source code for the project if you want to be able to edit the program.  WARs typically only have the compiled classes and resources required for the web application.  Depending on the technologies used for the front-end, you might be able to edit the JSP pages, HTML, or other plain-text elements (CSS files, properties files, etc.) that are included (usually in WEB-INF, WEB-INF/classes or top level directory), but if you want to modify the Java code, the WAR won't help you.
0
 
LVL 4

Author Closing Comment

by:Somersault
ID: 36939359
A bit of an odd question, as it kind of changed from what it originally was. The people trying to help did their best and with their help I found my way to the real solution
0
 
LVL 10

Expert Comment

by:gordon_vt02
ID: 36942374
What was the solution you arrived at?  Mostly curiosity, but good to post your solution as well so others can view it if they have similar problems.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Formula for calculating ROI on training 6 68
Java program running SQL query 5 48
hashmap order 17 40
Website checklist for browser compatibility? 2 37
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question