Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use XAMPP's apache tomcat to execute java Dynamic Web Project?

I am using eclipse and I have a Dynamic Web Project .

To execute it I need apache tomcat 7.0.

But I have already installed XAMPP server that include both apache web server & apache tomcat server.

How can I mount my java web app to XAMPP's apache tomcat server?

like image 825
user3773380 Avatar asked Apr 10 '15 22:04

user3773380


1 Answers

There are 2 possibilities

Option 1

  • You have two tomcat server running
  • one inside eclipse and the XAMPP Tomcat
  • you have to give the XAMPP Tomcat another port number
    here we give it a new port (8090) and redirectPort (8444).

..XAMPP\tomcat\conf\server.xml


original

<Connector port="8080" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   redirectPort="8443" />

changed to

<Connector port="8090" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8444" />

disadvantage you have to deploy the Web application 2 times

  • 1 Eclipse deploy it to the eclipse Tomcat server
  • 2 Manually deploy it to your XAMPP Tomcat server.
  • 3 Manually start your XAMPP Tomcat server with ..XAMPP\catalina_start.bat
  • 4 Manually stop your XAMPP Tomcat server with ..XAMPP\catalina_stop.bat

here Tomcat runs on 8090

enter image description here

Option 2 Change Eclipse settings.

  • Windows -> Show View -> Servers
  • In the servers view, right click and add new.
  • It will show a pop up containing many server vendors.
  • Under Apache select Tomcat v7.0 (Depending upon your downloaded server version).
  • In the run time configuration point it to the XAMPP Tomcat folder (....\XAMPP\tomcat)

Advantage

  • You need in XAMPP settings to change nothing.
  • Eclipse deploy it for you.

Disadvantage

  • on shutdown Eclipse, it will also stop XAMPP Tomcat server
  • so you have to start and stop it manually with
  • ..XAMPP\catalina_start.bat
like image 168
moskito-x Avatar answered Oct 29 '22 04:10

moskito-x