upload java web application to xampp [closed]


I have made my first web java in netbeans and now I have to upload it to a local server (xampp) the issue is that I do not understand the topic well, I generated the file .war (right clicking on the project in netbeans and then clean and build) then take the .war and take it to C:\xampp\tomcat\webapps , create a folder x and put the .war inside C:\xampp\tomcat\webapps\x , then in the browser I put localhost:8080/x/index.jsp and I get an error:


HTTP Status 404 - Not Found


type Status report


messageNot Found


descriptionThe requested resource is not available.


GlassFish Server Open Source Edition 4.1.1

I searched, but nothing comes of it. Thanks.

asked by elsa 25.05.2016 в 22:08

6 answers


Hello, I understand that XAMPP now includes apache tomcat, now if you want to use xampp as a learning tool, verify that the tomcat service is turned on, you see a green indicator. If you see the service on try going to: localhost: 8080

Although I consider it better to use only tomcat, as mentioned by the partner in the post above.


answered by 26.05.2016 в 00:20

This line of error message:


"GlassFish Server Open Source Edition 4.1.1"

Indicates that you are not accessing the Tomcat.

You may not even have it ripped off, or if you have it ripped off, be it in another port.


GlassFish is another alternative server to Tomcat.

One possibility is that, when trying to start the tomcat, since you already had GlassFish on the same port, the Tomcat will fail to boot.

Could it be that you use GlassFish as a netbeans server for development and that is why it is running?

answered by 26.05.2016 в 11:55

Well I do not know if my answer is useful, but when creating some pages in C # for example. When I had it as such, the page created and compiled basically what I did was to copy the app to the WWW folder and configure the port where it was going to run.

The problem is that good as such what I did was not an app but rather a very basic web page, because for that I better put it in ISS which is quite simple when working with C # and applications using entity Framework

answered by 26.05.2016 в 10:55

Download Tomcat and unzip the .zip somewhere on your computer

Place your war in the webapps folder

Inside the bin folder you will find the scripts (startup. *) to be able to start the service .bat if you are in Windows, .sh if you are in Linux

In the directory conf you will find the file server.xml where (by default) the option autodeploy is found with value true this means that when you start your Tomcat service all wars will be displayed find in the folder webapps

You can check it

With all the above, when you start the Tomcat service you should see something like this

And your application (if it does not have a problem) should be accessible from a browser, where?

You can verify in the same server.xml


For your problems when starting the Tomcat I recommend the following:

  • Verify that the JAVA_HOME environment variable (really) exists
  • Using cmd , locate yourself in the directory /bin of Tomcat directly execute the following command
  • If you do not have the environment variable set, you should do it

    In my case I have Java 7, after this you should not have problems.

    answered by 25.05.2016 в 22:45

    If you want to host your app in a localhost, in the upper part of the jnlp file the codebase address, keep in mind that if you use xampp you just put localhost and the name of the folder where the file is hosted , I mean, if your location is: C: \ xampp \ htdocs \ java-test then you place link I hope not to make a mistake.

    answered by 04.11.2016 в 11:19

    From what I see your project you generated it with the glassfish, for this you have to understand that a web application made in java always needs a server, for obvious reasons to deploy the application you need to do it on the same server that was developed, in this case what I imagine is that you installed netbeans and started working without taking into account an architecture, netbeans when you install it by default brings the glassfish server so when you deploy the application it asks for GlassFish the correct way to deploy your project It is as follows:

  • Download the glassfish server from your official page.
  • Unzip the server somewhere on your computer.
  • Start the glassfish server.
  • Access localhost: 4848 which is the glassfish administration console
  • If you used persistence engines in your application, generate the connection pool.
  • In the administration console navigate to the application menu, then choose the deploy option and choose the war generated by netbeans.
  • After this you can enter the address of your application: localhos: 8080 / Miaplicion

    I hope you greetings

    answered by 26.05.2016 в 18:21