Deploy vaadin 7 war file in EC2 - amazon-ec2

I'm trying to deploy a Vaadin 7 example.war file in tomcat 7, using an EC2 server. I upload the file to /var/lib/tomcat7/webapps but then when I go to myIp:8080/example it doesn't find the resource.
Any idea why?
Thanks!

You have to use the tomcat manager (usually http://[YourHost]:8080/manager) to add a new webapp / war file, it is not just uploading the file to the webapps folder.
To install tomcat, the manager webapp, and configuring access credentials (debian or debian based distros), check this tutorial: https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-apache-tomcat-on-a-debian-server

Solved!...
To install the manager:
sudo yum install tomcat7-webapps tomcat7-docs-webapp tomcat7-admin-webapps
To solve the Java Version mismatch, org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/prueba2]]:
On Eclipse:
Preferences >> Java >> Installed JREs
On EC2 server:
sudo yum remove java-1.7.0-openjdk
sudo yum install java-1.8.0
Then reinstall Tomcat7 and restart
Thanks #BlunT for all the help!!

Related

Install servlet 3.1 on Websphere liberty core manually

I would like to install servlet 3.1 on Websphere Liberty Core 8.5.5.7.
I cannot reach the the Liberty repository so I can't use :
installUtility install servlet-3.1
How can I install servlet-3.1 manually without connection ?
You need a other computer with Liberty Profile 8.5.5.2 or higher and internet connection.
You can download in this computer the needed features with featureManager utility with --downloadOnly option.
bin/featureManager install feature_shortName1 feature_shortName2 --downloadOnly=[all|required*|none]
You can specify a local destination directory with --location optinon.
Then copy the download directory in your computer without internet connection and install the feature:
bin/featureManager install feature_shortName1 feature_shortName2 --location=directoryPath
More information in:
https://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.wlp.doc/ae/t_install_assets_cmd.html?lang=en
you can download the .esa file form IBM website then install it with the command
installUtility install localrepo3\com.ibm.websphere.appserver.servlet-3.1.esa
where localrepo3/ is a directory in the bin directory of WebSphere

Unable to start tomcat7 in ubuntu

I installed tomcat7 but when I tried to start it. It fails to start.
previously I'd installed tomcat7 and it was working fine, But when I tried to add tomcat7 server in netbeans it gave me error of some Catalina home or something. I looked for that solution and applied. Then after adding the tomcat7 server to the netbeans, it won't start. Later I install glassfish server. It also got failed. So again I uninstalled the tomcat7 and tried again to start it. But now it is not getting started.
Creating config file /etc/logrotate.d/tomcat7 with new version
* Starting Tomcat servlet engine tomcat7 [fail]
invoke-rc.d: initscript tomcat7, action "start" failed.
Setting up tomcat7-admin (7.0.52-1ubuntu0.3) ...
Setting up tomcat7-docs (7.0.52-1ubuntu0.3) ...
Setting up tomcat7-examples (7.0.52-1ubuntu0.3) ...
Processing triggers for ureadahead (0.100.0-16) ...
Try this!
Step 1:
When Install tomcat 7 on Ubuntu 14.04
$ sudo apt-get install tomcat7
Step 2
If You find an error post installation which could look something similar to the code below:
Creating config file /etc/logrotate.d/tomcat7 with new version
* no JDK or JRE found - please set JAVA_HOME
invoke-rc.d: initscript tomcat7, action "start" failed.
Setting up authbind (2.1.1) ...
Processing triggers for ureadahead (0.100.0-16) ...
To rectify the above please do the following:
$ sudo mkdir -p /home/data/backup_scripts
$ cp /etc/init.d/tomcat7 /home/data/backup_scripts/
$ sudo vim /etc/init.d/tomcat7
After you open the file i.e tomcat7, please find the following line
JDK_DIRS="/usr/lib/jvm/default-java ${OPENJDKS} /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-oracle"
Change the above line by appending the following to it:
/usr/lib/jvm/java-8-oracle
Thus the line would now become:
JDK_DIRS="/usr/lib/jvm/default-java ${OPENJDKS} /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-7-oracle /usr/lib/jvm/java-8-oracle"
Save the file and start the tomcat server. This time it should happen at ease:
$ sudo service tomcat7 start
Hope it works!!!

Install Liferay as Windows 2012R2 service

I am a newbie on Liferay and furthermore 100% Windows infrastructure knowledge based. I installed Liferay 6.2 on my Windows 2012R2 server together with Java jdk-8u5 version. All is running perfect as long as I am logged in as user on the Server via remotedesktop having open the tomcat startup.bat window.
What have I to do exactly to start Liferay and/or tomcat as service?
Thanks in advance for your efforts.
Configuring liferay or tomcat to run as a service on a windows server doesn't differ that much.So in order to do that you have to add some files to the LIFERAY_HOME\tomcat\bin directory.
To get those files you have to download a full version of 64-bitWindows tomcat from here :
http://tomcat.apache.org/download-70.cgi.
Extract the zip and go to the bin directory, copy service.bat , tomcat7.exe and tomcat7w.exe to this location : LIFERAY_HOME\tomcat\bin
Setting Up the service
Open the commad prompt (Make sure you have admin rights or run the command prompt as administrator),In Command Prompt go to LIFERAY_HOME\tomcat\bin and Execute the following command
service.bat install tomcat7
This will install the tomcat6 service in windows.
Now execute following commond to setup additional configuration for the service
tomcat7w.exe ES tomcat7.exe
2 . Extra configuration :
-XX:MaxPermSize=512m
-Dfile.encoding=UTF8
-Duser.timezone=GMT
-Djava.security.auth.login.config="%CATALINA_HOME%/conf/jaas.config"
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
and make sure to provide enough memory for your service by setting the initial memory pool and the maximum one.
Either go with Rafik Beldi's answer (quite an effort, wow) or just go to tomcat's documentation in case you're still missing some information
I had to delete what was in Java Options completely or it wouldn't start: and then I entered:
-XX:MaxPermSize=512m
-Dfile.encoding=UTF8
-Duser.timezone=America/New_York
-Dorg.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES=false
-Djava.net.preferIPv4Stack=true
note that where I am: America/New_York allows for both EST and EDT

How to add TomEE to already installed Tomcat7 - ubuntu server

I have Ubuntu server with LAMP and Tomcat7. I want to add TomEE so that I can work with EJB. I don't see anything related to installing TomEE on a server that already has Tomcat7. What are my options? Do I need to uninstall Tomcat7?

load mod_wsgi failed on apache 2.2

All,
I want add mod_wsgi modules to my local apache 2.2 server. But when I add "LoadModule module_wsgi modules/mod_wsgi.so" into https.conf file. the apache service will be unable to started. follow error is added to error.log file.
httpd.exe: Syntax error on line 129 of C:/Apache2.2/conf/httpd.conf: Can't locate API module structure `module_wsgi' in file C:/Apache2.2/modules/mod_wsgi.so: No error
For additional information, folloing is my computer's settings.
My computer is run Windows 7 system.
I had install xampp 1.8.1 (It has built in apache 2.4 service). And I install apache 2.2 with a standalone setup package. and binding it to port 8888. If I don't add wsgi module. it work normal. So, my computer has two apache service instances.
I had install python 2.6.6 in my system and add c:\Python26 in my system path.

Resources