Deployment of Web Application with ECLIPSE - eclipse

I have developped a web dynamic application using JSP and servlet and I want to deploy it.
How to do it with eclipse.
how to do to launch the application.
Thanks for help.

Try Tomcat to deploy your application. You can easily integrate Tomcat into the Eclipse.
http://www.eclipsetotale.com/tomcatPlugin.html
Alternatively, instead of plugin, you can add the server into the Eclipse.
Ctrl -N > Server > Select Tomcat Server adapter
If you've developed your application as 'Dynamic Web Project' in Eclipse, the above process will detect your application, and asks you to select if it has to be deployed in the new server configuration.
To generate war file, right click on your project in 'project explorer' window, and click 'export as'. In the dialog box, select WEB > WAR file

Related

Creating a new Tomcat Project

I want to create easily a Tomcat Project in eclipse. This means that I want file tab then new tab then Tomcat Project tab. How can I do that?
You need to install the web tools into Eclipse, and then you'll be able to create a new web application project and then target it to a Tomcat server.

Running GWT on tomcat in eclipse

I am trying to get a GWT Project running on a Tomcat 7 server in eclipse. I installed Tomcat and i can run other web application out of eclipse on Tomcat without a problem.
Now i generated a gwt maven project for eclipse with the following command and importet it as maven project to eclipse:
"mvn archetype:generate -DarchetypeGroupId=org.codehaus.mojo -DarchetypeArtifactId=gwt-maven-plugin"
I can run this now as Web application (with the google plugin) and i can build a "war" with maven and deploy this with the Tomcat management console on the server. Both is working. But if i choose the option in eclipse "Run on server" and choose tomcat than just the html is loaded but not the application itself. See the screenshot: It doesn't find the "GWTModule.nocache.js".
This file is available in the target folder. What do i have to change to tell tomcat to look in the correct directory?
Tomcat is not able to run GWT code in development mode. You can use Tomcat for server side code, but in this case you need to run GWT development mode with -noserver option (to prevent built-in Jetty instance from running). See this article for more details.
I would recommend using the wtp plugin for eclipse. If you do this you can add your project/resource to tomcat when adding a new server. Here are the steps to use if you already have your project imported into eclipse.
Window -> Show View -> Servers
In Servers
New -> Server -> Choose apache tomcat
Point to the location of your tomcat installation/download
Next
At this point you should be able to add your gwt-maven project which will add the target/project.war to the tomcat modules.
Save it
Click on the newly added server, then click the modules tab at the bottom kind of hard to see.
This should have your project shown in the list of web modules.
Start your tomcat instance then on your gwt application right click and choose Run As -> Web application. Make sure your configuration settings are correct and when the development server starts it should give you the development url to browse to.
You can configure some aspects of tomcat in the overview tab, I would recommend making sure that "Modules auto reload by default" is checked so that tomcat will watch the filesystem for class changes.

How to deploy a portlet to Liferay from Eclipse

I've made a portlet in Eclipse and now I'd like to deploy it to a running Liferay-6.1 instance and debug it. I guess this should be described in documentation, but I was only able to found how to create the portlet, but not how to deploy it.
Here is a screenshot which shows how-to deploy Liferay portlet directly from Eclipse
How to deploy a portlet in Eclipse (using Liferay IDE) is documented here. This assumes that you have installed Liferay IDE, then created a Liferay Server adapter, and then created a project using New Liferay Project wizard.
After completion of developing the portlet go to the browser open the localhost sign in and then-->Goto Add--->more-->expand the sample--->Select Add
You can deploy it by using command prompt. Go to location of your plugin portlet and execute the following command:
eg:
D:\Projects\plugin\portlets\test-portlet>ant deploy
Note: you need to configure ant home like this.
If you have a plugin project, but you need to deploy it onto your Liferay Server. Let’s do it now:
Select your new plugin project then right click the Liferay Server in the Servers tab;
Select Add and Remove….
Select your plugin project and click Add to deploy it to the server.
Click Finish.
You should see the project get deployed to Liferay Tomcat server; in the console you’ll see a message indicating your new portlet is available for use.

Difficulty to run simple GWT application on tomcat server

I am creating a gwt application as following steps:
First install gwt plugin in my eclipse(Helios).
Create GWT project
Add Dynamic web plugin
going to property page of the project
project Facets tab
Select Dynamic Web Module and java
ok to apply changes.
Write code
and i try to run on server tomcat7 then it shows resources not available.But when i run as internal server of gwt as just right clicking on project and selecting run as web application.
then it run successfully. so please help to run my application on tomcat server.
Thanks
Rahul
Did you Compile your Application? (GWT Compile Project)
You can then run this Ant buildfile and deploy the WAR file on your Tomcat Server.

How to set Tomcat or JBOSS or Glassfish as App-Server for GWT Web Project in eclipse

How to create and run GWT web project in eclipse with tomcat or another app-server?
I created a Gwt Project and when i run or debug it, eclise did use GWT hosted mode server.
I can not find and configuration in project properties to select tomcat or another server for the project/
Regards
In the GWT Run/Debug configuration of the project you want to run/debug, tab Main, deselect the "Run built-in server" option. After that, it's your responsibility to generate the html/js/images of the GWT module you want to run, and place them somewhere where Tomcat or JBoss can see them. That usually means deploying a war at least.