Install Glassfish on linux server for JSP & Servlet compatibility - linux

I am facing a issue that i had made a project in J2EE (JSP & servlet) and i had uploaded every file on web server.
My web server is linux server and so i need to install glassfish server on it.
And also i had stretched my hairs from many days but i am not successful in it.
Actually i am unaware that how can i install it.
If it happens then JSP and servlet files will be compatible and web server can read it perfectly.
Any kind of help is acceptable.
Thanks in advance.

Glassfish is JSP & Servlet compatible by default :)
To install it, you have different options, depending on your operating system.
1)
Just unzip it manually.
go to https://glassfish.java.net/download.html and download glassfish-4.1.zip
setup Java (JAVA_HOME and PATH)
use your favourite unzip tool or go to the folder with the zip file and type unzip glassfish-4.1.zip -d /here/
type /here/glassfish4/bin/asadmin start-domain to start the server
configure the server via asadmin or the Glassfish Admin UI
2)
For Glassfish 4.0 or 3.1 you can also use the installer package.
go to https://glassfish.java.net/download-archive.html and download glassfish-4.0-unix.sh
make sure that the file is executable (+x) before you run it
follow the installer instructions

Related

Database driver (com.mysql.jdbc.Driver) is not present. Please install it on your application server

After installing Liferay and configuring it to use my database, I get this error:
Database driver (com.mysql.jdbc.Driver) is not present. Please install it on your application server.
How to solve it?
Download the Java driver for your database. It is a .jar file such as mysql-connector-java-5.1.42-bin.jar for instance. It can be found on your database vendor's website.
Put that JAR file in the Tomcat of your Liferay server, in the lib/ext directory. Example: liferay-workspace/bundles/tomcat-8.0.32/lib/ext/mysql-connector-java-5.1.42-bin.jar
Restart Liferay.
Liferya DXP 7.2 version has missing this mysql connector jar so you need to place that jar file inside lib/ext.
I need to install mysql-connector-java-8.0.11.jar

Deploying Java Servlet applications on Windows with IIS

I have develop JSP-Servlert application (i.e. WAR file) which running perfectly on tomcat server. Now I want to run same web application on IIS without tomcat.
Currently I am following this url: http://www.helicontech.com/articles/deploying-java-servlet-applications-on-windows-with-iis/
But while configuring Java hosting package as per mentioned in the above article, it is giving error to download jetty 8. Other softwares from the same package is getting download and install successfully.
When I checked the logs, I found that it is downloading the jetty from the URL: "http://dist.codehaus.org/jetty/jetty-hightide-8.1.7/jetty-hightide-8.1.7.v20120910.zip" and all the codehaus services has shutdown.
Can anyone help me to install the jetty into IIS or any other option to deploy the WAR into IIS?
Thanks,
SameerK
Definately the easiest option, at the time of writing, is to use Microsoft's HttpPlatformHandler that you can install on IIS 8+ (Windows 8 or Windows Server 2012 at least).
You basically need to:
Install IIS on your machine
Install JDK
Install Jetty on Windows (just download zip and unpack it)
Create WAR file
Copy WAR file to your Jetty's installation folder under webapps directory.
Set up IIS web site with web.config as described here.
That's it. You can view your site using http://localhost:your_iis_defined_port/your_war_name. If you rename your WAR to root.war then 'your_war_name' will not be necessary.
I have prepared a step by step guide on how to do that with more explanation.
After hours of trying i managed it by adding a ReverseProxy Rule, this is fairly easy and done super fast.
I had these dependencies installed already: AAR and HttpProxyHandler

Deploying a JSP Website

I am trying to deploy a jsp website that I worked on. I implemented it on my windows machine and in the PATH variable I had the path to some bin directory, I am wondering where should I place this path or directory on the server I am deploying to.
The server is based on linux so I am not sure if that would make a difference.
I upload a single WAR file
I tried to place it in the lib directory but it didn't work.
Thank you
Assuming you have Tomcat installed on your Linux server then you can just place your WAR file inside the $CATALINA_BASE/webapps directory as described in the Tomcat documentation.
If you do not have Tomcat installed you can follow the Tomcat documentation setup guide or this blog post. You can also use a package manager such as YUM or APT depending on the server Linux distribution.

Unable to configure Tomcat 7 on Eclipse Juno

I have Eclipse Juno with Spring Tools Suite plugin installed.
I need to deploy a newly imported web project to Tomcat 7, which I installed on my system via repository.
The problem is that the New Server Wizard screen won't allow me to select Tomcat 7, as the description is empty and unmodifiable.
How can I fix this? I can select other versions of Tomcat but when I select the installation path of Tomcat I get an error that the installed version is 7.
As per the instruction s provided in this site
Follow these steps, as this is a known issue
Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server.
Rename the org.eclipse.jst.server.tomcat.core.prefs to org.eclipse.jst.server.tomcat.core.prefs.bak (or you can delete this file). This file can be found at \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings
Rename the org.eclipse.wst.server.core.prefs to org.eclipse.wst.server.core.prefs.bak (or delete the file). This file also can be found at the same location as above.
Follow these steps
1.)Go to Window–>Preferences–>Server–>Runtime Environments and fix the broken path/link for the server.
2.)delete this file org.eclipse.jst.server.tomcat.core.prefs under this location \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings
3.)delete this file org.eclipse.wst.server.core.prefs under this location \workspace\.metadata\.plugins\org.eclipse.core.runtime\.settings
After following these step's you can configure tomcat in eclipse.
Click on Add Configuration Runtime environments
On the Server Runtime Environments Window you will more than likely see Apache Tomcat 7.
If you remove the runtime environment and then go Back to the New Server Wizard Tomcat 7 will be available to add again.
Hope that helps. That drove me nuts for a few days
The Eclipse Juno may not be fully compatible with the Apache Tomcat 7 yet. Installing and configuring with Tomcat 6 works. Simple.

Installing jBPM on Linux

I have been using the following to set up a jBPM/JBoss server on a remote machine (linux)
http://docs.jboss.org/jbpm/v5.1/userguide/ch03.html
The above linked worked fine locally on my windows box, without any hitches. However, I am having numerous errors with starting/shutting-down the server, and having the drools-guvnor page run completely (or any other than the JBoss AS splash page on localhost:8080). Should this be working fine on linux as well, or are there any other references that I can seek? Also, I have no desire to install eclipse, just to get the jBPM designer going.
Or am I better off attempting to load jBPM into a separate JBoss install?
Running Red Hate Enterprise Linux Server release 5.8
Thank you for your time
I was unable to get the jBPM installer demo (packaged with jboss) to work. Instead I did a separate installation of jBPM and JBoss and set the JBoss home in the build.xml file. Then performed the individual installation of guvnor and designer using
ant install.guvnor.into.jboss
ant install.designer.into.jboss
Still having errors, but the designer/guvnor are up and running, now it is a database problem :(

Resources