Deploying java application in jboss application server - java

I have a java application which I was running using tomcat server. Now I need to run the same application in jboss server.I am new to jboss, I tried deploying war file in jboss but not able to do so.
I don't know what changes needs to be done for application to run on jboss.
Any one please guide me.
Thank you.

An obvious answer would be Read The Friendly Manual.
You can configure JBoss to autodeploy files in the standalone/deployed/ directory for example, you can also use the maven-jboss7 plugin to handle deployment from maven.
I'm sure the jboss community forums have plenty of examples.

Related

Is it possible to make a Spring MVC web app run as a "standalone executable" with Java and Tomcat embedded?

I have a web app built with Java, Spring MVC, and JDBC. The result is a WAR file.
To run it, the user has to install Java 8 JDK and Tomcat, and deploy the WAR file to the Tomcat server.
It would be great if they could just download the one file run it as a standalone application.
That is, run "the WAR file" and just browse to http://localhost:8080/myapp
Also, on Windows it would be great it was setup as a Server (like Tomcat is when installed with the installer).
Is there any way to do this? Maybe with Spring Boot or something new like that?
Yep, Spring boot is the way to go.
It allows you to build an executable Jar with all dependencies and a Tomcat (by default, can be changed) embedded.
But users will still need to download a JRE to execute the Jar, and a database if it's required, but you can use en embedded database like H2, HSQLDB..., depends what is your needs.
Yes . you can use spring boot to achieve your results. Kindly refer the below link for sample code
https://mkyong.com/spring-boot/spring-boot-hello-world-example-jsp/
You can use embedded jetty server using maven but that would require you to setup few things your app and may have align your existing app, please check this article for more information.
Jetty is similar to tomcat server in terms of running spring application, there are not much difference in terms of development. Tomcat is just more famous.
Other option as others said, is to migrate your app to spring boot which would be easy if you already have app written in spring (But that depends how much code you have and how much time you have)

OSGi, Jetty - exposing the server to the outside

As a topic. I have the task to issue an OSGi, Jetty server on the outside. I have a host (Debian). I have read that this type of server best place with the help of Virgo.
Virgo Jetty server installed on Debian.
Just I do not know where I got there, throw your plug-in project to make it work.
Any suggestions? For all the answers, very thanks.
Take a look at the virgo user guide. Especially starting / stopping chapter and deploying artifacts.
Alternatively you might want to take a look at Apache Karaf. It is similar to virgo but works mainly using maven repostories. So you just build your OSGi application with maven and deploy it into karaf directly from maven. See karaf user guide and karaf tutorials.

Difference between an Enterprise application project and a Web project application in Netbeans IDE

Please I would like to know the major difference between a Jave EE project and a Java Web project in netbeans IDE with respect to the EJB. In fact you can create a web application based on EJB, JPA and JavaServer Faces in Netbeans IDE if you choose the Java Web category.
On the other hand you choose the project category as Jave EE project, NetBeans IDE will create 3 sub-projects, e.g: StoreApp (Enterprise Application project), StoreApp-ejb (EJB project), and StoreApp-war (Web project).
The first one will be packaged as a single .war file, the second one will be packaged as an .ear file, containing the web .war and the EJB .jar.
The difference between these is a bit broad to handle here, but I wouldn't advise on creating EARs unless you know that you want/need to.
I think you should learn firstly about web server and a application server..
well i'll happy to help you.
1) we cannot run enterprise application in web server.. i.e. if u are using EJB etc. to run this EJB project you have to use Application Server like JBoss and many more.
2) while using web server it cannot load any heavy application means if your application having multiple users , in that case connection pooling will come into the picture. for connection pooling Application server much better then web server.
For more you can visit below link:-
What is the difference between application server and web server?
I hope it'll helps you
Thanks!!!
There are 3 kinds of project/application:
Standalone Java application and sometimes call it as swing application. Bundle it in the form of Jar and you can run this application without any web or application server.
Web-application: Basically we have to create a war which is combined with html/jsp,jar etc. This war file has to deployed into webcontainer.
Enterprise Application: We have to create a EAR file which is combined with war, EJB & jar. This has to deployed into application server.
A very helpful tutorial https://www.youtube.com/watch?v=6vMB3rzN_Xw
Hope this helpes... cheers!!!

Viewing Deployed Apps in Weblogic Server

I am new to weblogic and I would like to find out how my files are arrange in Weblogic?
I have used only Tomcat and this is the first time where I will deploy in a Weblogic Server.
In Tomcat, I could view the exploded view of my projects by looking at the Tomcat Home Directory
and the WebApps folder. There I could view how my application css/js/resource files are deployed.
%TOMCAT_HOME%\webapps
I am looking for a similar functionality in Weblogic? Can somebody tell me how? Thanks
I am using Weblogic 10.3.4 by the way
WebLogic supports several different ways of deploying applications, so the answer to your question is not very straightforward.
Typically, if you deploy a war/ear, then WebLogic will place them in the $WEBLOGIC_HOME/application directory. WebLogic will then explode your ear/war into a separate wl_stage folder that will be under your managedServer directory.
You can also use the ability of WebLogic to autodeploy ( not recommended for production apps ) where WebLogic will automatically explode the app.
In summary, you probably need to reach for the documentation to get all your questions answered.
http://download.oracle.com/docs/cd/E13222_01/wls/docs81/deployment/overview.html
I'm not quite sure if you want to find out where to deploy or where applications have been deployed.
But if you want to see where are the deployed applications in weblogic, you can go to its console (e.g. localhost:7001/console) after start the server. Then follow the following steps:
Find and click "Deployments" label
Find and click your application in the right panel
Click "Overview" tab, then you will see "Path" in the opened information table.

How do I push an update to a war file to clients?

Assuming my clients are running my J2EE WAR application on their intranet, and I have an update for them... how do I push the updated war file to them?
I'd like it to be automatic and require no human interaction on the client's side.
Can this be done?
Any help would be appreciated.
Tomcat (if this is your target container...) offers a manager interface that will allow you to deploy/start/stop applications.
I have used both ant and maven tasks to great effect in deploying wars remotely all while being built-in to the build process.
Depending on your deployment process, this may not work for you, but for dev & qa: highly recommended.
Edit: of course apache has to be configured for this type of access to be allowed.
See: Deployer how-to
Glassfish has documentation on deployment here.
Ant tasks are also available here.
Glassfish uses Tomcat internally, but the Tomcat Manager is not available as it is a separate application.
If the glassfish admin console can be accessed, it can be used to upload and deploy war files.
I'm not sure if you're comfortable giving them access to your source code repository...even in read-only mode.
If you are, then you could script up something in ANT to check out the latest version of the source code (using CVS task) and then build the .war file (using WAR task).
The only trick would be automatically deploying it once the war has been built. Tomcat will automatically deploy applications copied into a certain directory. For Websphere, see this question and this question.
For other J2EE servers I don't know how it would be done.

Categories

Resources