How to Compile and Generate a .WAR?

1

I have a project carried out in MAVEN with Eclipse which consists of connecting to a database with APACHE and showing some data ... how and where do I configure which database to connect to? What I do is:
1) Run As
2) Tomcat V7 Server at localhost ...
say that the database that I want to connect to I have it on the XAMPP server I have started the Apache and MySQL services ... so I get the following error:


-> How do I change the ports of the JAVA tomcat?
-> Once I do it as I do to indicate which database should be connected ?? Thank you and if you need more information ask me !!

    
asked by Alexander Torres 22.06.2016 в 20:53
source

1 answer

1

You could change the tomcat ports, in the tomcat /user/home/apache-tomcat-7.0.70/conf/server.xml folder.

Before:

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

After:

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

Before:

<Server port="8005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

After:

<Server port="28005" shutdown="SHUTDOWN">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />

Before: <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

After: <Connector port="28009" protocol="AJP/1.3" redirectPort="8443" />

To compile and generate the war you just have to do this:

    
answered by 23.06.2016 в 01:15