Unable to create the WAR of my web application on Jboss - java

I am trying to deploy my web application with Jboss AS 6.x.
The problem I am facing is when I try to export the WAR file by right clicking on the project from left menu and export, there is no such option as to export the project as WAR.
I have installed JBoss Application Tools successfully. Integrated JBoss server successfully.
Where am I missing? Am I missing some necessary tools?

This option is available only if your project is Dynamic Web Project. The Java project, which is decorated with J letter on folder icon doesn't have the capability to export as WAR archive. But to deploy a web project you might try the approach "Run as...". And choose the server configured before to run a web project.
You can't convert a Java project to a Dynamic Web Project automatically with JBoss Application Tools. But if you have MyEclipse IDE then it's easy done just by adding a web capabilities. So, choose "New..." project wizard and "Dynamic Web Project" then follow the wizard pages.

Related

Not able to run a service on tomcat via IntelliJ Idea

I am working on a framework "beadledom".
I am also relatively very new to IntelliJ Idea, I have used eclipse before, the beadledom framework contains the project sub-module,
api
service
client
In Eclipse if we want to run the services, I would right click on "service" sub-module Run on Server -> tomcat ; and it would run.
My webapp is stored in "service" folder.
I have no clue how do I do it on IntelliJ
I did set the Run Configuartion.
I am being asked to create a "artifact" in Edit Configuration>Tomcat
enter image description here
The artifact is an archive, built from your project sources which constitutes your application. For Java EE web projects it is usually a war achrive which you deploy to an application server (e.g. Tomcat). In case of a Maven-based poject IntelliJ IDEA automatically creates web artifact, based on Maven pom.xml configuration which then you can select to deploy in Tomcat Run/Debug Configuration Deployment tab.
You could check Developing a Java EE Application tutorial for the general workflows in JavaEE-based projects in IntelliJ IDEA.

Deploying to Weblogic 10.3.6 from Eclipse -- "There are no resources that can be added or removed from the server."

I have a Spring Boot application. I build it with Maven. I have the pom configured to produce a Weblogic-compatible .war file. I can deploy this war file manually via either the WebLogic console or via the weblogic-maven-plugin Maven command.
I have now added my WebLogic server and domain to my Eclipse servers panel. I can start and stop it just fine, but when I click "Add and Remove", I get:
There are no resources that can be added or removed from the server.
In my Project Facets, I have:
Dynamic Web Module 2.5
Java 1.7 (matches what WebLogic wants and what my pom specifies)
What else can I check or change?
Sometimes the problem might also because you did not select the dynamic web module .
To do so open your project properties then goto your Project Facets then Check/Select the Dynamic Web Module checkbox then apply & close.
So, even though I didn't have the Cloud Foundry facet checked, that was still the issue. I deleted the Cloud Foundry-related plugins from Eclipse, and it started working.

How to run on GlassFish in IntelliJ?

I am using IntelliJ, and I have a J2EE project. I have setted up a local GlassFish server in the IDE, but how can I configure the project to run on that local GlassFish server?
My project uses Java EE's features (such as servlets), but IntelliJ says that those libraries do not exist:
I can't run my project either:
How do I associate my local GlassFish server with the project, and enable the GlassFIsh's library?
I have setted up a local GlassFish server in the IDE, but how can I configure the project to run on that local GlassFish server?
I assume that you did this using Run > Edit Configurations... in which a local or remote Glassfish server can be configured. So in the window of Glassfish edit configurations there is a tab named deployment in which you can add source(s) to be deployed at the server startup.
My project uses Java EE's features (such as servlets), but IntelliJ
says that those libraries do not exist:
Go to File > Project structure or press Ctrl+Alt+Shift+S click to open Modules > Dependencies tab press the Add (+) button select Library... and there you can find Glassfish and add it as a dependency.
Did you follow the recommended way to create your J2EE project in Intellij?
Follow the guide here: Getting Started with Java EE 7 and GlassFish 4.0

Running Maven Struts2 app on tomcat

I created a Struts2 App using Eclipse M2 Maven plugin but there is no option to run the project on my tomcat server. I tried including the server runtime libraries in the projects build path but that doesn't work. How can I solve this problem?
In order to run project on server in eclipse, project must be in faceted form with Dynamic Web Module enabled. To convert project to faceted form: right click on project -> Properties -> Project Facets -> Convert to faceted form... -> check Java and Dynamic Web Module.
When you build the project, it should create an output, a war file or extracted war file. You need to deploy this on the server then only you can see the application. In eclipse I believe you can configure an server. Once you have configured a server in eclipse you can tell it to look for your project build output and deploy it.
Right click on the project and then Run As > Run on Server.
If you do not see that option that means your project is not configured as Web Application.

deploying Java web application in exploded directory outside the Tomcat server, using Eclipse

I have been using IntelliJ IDE (version 5.1) with Tomcat server (version 5.5) to build my Java web applications. I'm now trying to migrate my project to Eclipse IDE.
When I run my web application from IntelliJ IDE, it creates a exploded directory inside my web application project folder and then starts the server and runs the web app. (i.e. no WAR files and no copy to tomcat\webapps folder).
But in Eclipse IDE, it usually deploys the web app inside Tomcat's webapps folder.
Is there any way to deploy web applications to a exploded directory outside the Tomcat server, from Eclipse IDE?
There is pretty neat Eclipse plug-ins you can install that will allow you to do that.
Have a look at Plug-in, tutorial and from Sysdeo.
Sysdeo is the one that both Apache and IBM suggests.
There are actually quite a bunch of these plug-ins from different vendors.
The trick is to find the one that best suits your needs.
Hope this helps.

Categories

Resources