How to run the first java web application? I work in intellij-idea on linux, create a Java Enterprise project, connect a web application and a glassfish server. I start the application and get Error running GlassFish address localhost:8080 is already in use . It looks like you need to change the port, but how, and will it help? I suppose the code implies the standard example "Hello, world" web.xml ( http://pastebin.com/TW0XjFD0 ) and index.jsp ( http://pastebin.com/D3GEJyvN ). The code without output is "Hello, world" in body , because for now the task is to defeat the error with the port. The code is compiled, but it does not start.

  • one
    you would write an application listing, it would be clearer what is happening there .. - Iga
  • A standard set of files after creating a project. Added a description. - Daineal28
  • one
    What does web.xml and index.jsp mean? Like the program, write in the aglitsky language, but you cannot understand the error. Ошибка запуска glassfish - адрес localhost:8080 уже занят . Your glare doesn't start, not to mention xml and jsp. Look for what you have there is this address or change the address of the eye of the eye. - Sergey
  • your application consists of classes. In classes there is a code (which you write in idea). show this code. - Iga

1 answer 1

In the directory glassfish4\glassfish\domains\domain1\config open a text editor domain.xml find your port and change to another. In my case was 8080, set 9999

  • The problem is solved, but another one has appeared. After compilation, the kswapd0 process kswapd0 and clogs up all the RAM - Daineal28