0

I'm working on a Java EE project made by someone else. They put this project in a VM and I can access to it to run the app. But the problem is that I can't find all the files of the project. Indeed, the project is using the model-view-controller and I find only the .jsp files (view). The app uses JBoss, Tomcat, Maven and Catalina. I have to start JBoss and Tomcat and then, in localhost, the app is running. So it works. I'm asking myself if there is a place defined by one of those technologies where I can find the other files. Because, they should be on the VM because the project is running well.

Can someone know if there is a global repertory for those files ?

Erlaunis
  • 1,433
  • 6
  • 32
  • 50

1 Answers1

0

Your VM will most likely contain only a runtime environment for the web application, consisting of a JBoss installation (including Tomcat) and the deployed application (in webapps folder), typically as a decompressed (exploded) WAR. See Deployment for an in-depth description of the web application's structure.

If you plan on modifying the application, the runtime environment will not help you much, because it typically does not contain the Java sources, but only their class files. You will instead need a development environment, consisting of your favourite IDE and the web application project, checked out from some revision control system (CVS, SVN, Git etc.) at best. This is the place where you can write/change code and JSPs and eventually build a WAR (e.g. using Maven) for deployment in the runtime environment.

Seems to me you should rather look for your files in a development environment.

f_puras
  • 2,521
  • 4
  • 33
  • 38
  • I tried to deploy a .war (inserted in /var/lib/tomcat6/webapps) but it seems that he doesn't care about the .java or .class files. Because I tried to remove these files, and the app is still working :/ – Erlaunis Oct 30 '15 at 10:37
  • I found ! When I removed the .java, tomcat was already started, so it already deployed the project with the file not deleted. So, I deleted the file first and then I started Tomcat. And it works ! Now, I know how it works and I can begin to developp ! ^^ Thanks a lot !!! – Erlaunis Oct 30 '15 at 10:48
  • You're welcome. Mind that the WAR's name must match the context of your application. Use *ROOT.WAR* for deploying to the root (`/`) context. – f_puras Oct 30 '15 at 10:50
  • I just have a last question ... My VM is under Ubuntu and the .war is actually a zip called "name.war" that I have to extract to have a basic directory. Is it normal ? – Erlaunis Oct 30 '15 at 10:53
  • Tomcat can be configured to unpack WARs automatically when starting up. Use `unpackWAR="true"` and `deployOnStartup="true"` in the `host` element (of Tomcat's conf/server.xml). Check the [config docs](https://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Standard_Implementation) for details. BTW Tomcat 6 is pretty dated, you should try and upgrade at least to version 7. Installation is easy! – f_puras Oct 30 '15 at 11:17