Java Web Application Deployment - java

I am trying to deploy my java web application to Azure using FTP. Is the .war file enough to be uploaded? Or all the project files have to be uploaded?

I believe that .war file is enough, because in that file you have everything that your java web application need, like the java classes, servlets, static web pages, etc, as you can see in this example, opening the war file:
war file
In fact, when we use, for example, the Tomcat server, that's the only thing that the server use for running the web application.
I hope I have helped you!

Related

Securing subdirectory in Tomcat

So a bit of background I have a surface level understanding about Tomcat WAR/Java files but I am helping out the programming team as I am taking over managing our Linux servers.
We are utilizing Apache Tomcat 8.5 and we currently have a WAR file that has a database login xml file. We would like to pull out the xml file into its own directory but I want to secure it down to make sure it can only be accessed from the WAR files on the server and not directly by url.
(edit) XML outside of a war file not from within
I'm open to any idea and any form of implementation.

Deploying a War file to Azure [duplicate]

This question already has an answer here:
Deploying WAR FILE in Microsoft Azure Web App
(1 answer)
Closed 5 years ago.
I am attempting to upload a War file of a web service to Azure, running tomcat 8.
I have the war file in the relevant webapps folder on onedrive, however the deployment consistently fails, and frustratingly it does so without an error message.
I'm pretty sure that if I can't use a method involving uploading the binary file to Azure, I cannot use Azure. When using repositories like github, the build would fail due to reference issues, so I believe that is not an option.
Unfortunately I must use Azure, I'm aware that with other services like AWS I'd be done in 5 minutes as you can directly upload without any Microsoft (tm) hassle.
Normally, there are 4 ways to deploy a war file on Azure Web Apps: FTP, repository like Github/BitBucket or OneDrive/Dropbox, Kudu Tool, Azure Toolkit for Eclipse/IntelliJ.
First of all, you need to know File structure on azure. The Java war file must be deployed at the directory webapps under the wwwroot path of Azure Web Apps. You can access the Kudu tool url https://<your-webapp-name>.scm.azurewebsites.net/DebugConsole to lookup it.
Using FTP for deployment, you can refer to the Kudu wiki page Accessing files via ftp to know it, and set the FTP user & password via Azure portal as below.
Using repository like GitHub, you can refer to the Kudu wiki page Deploying from GitHub to know it. Please first make sure the file structure on GitHub repository as the same as its under your wwwroot directory, as below.
A convenient and fast way is using Kudu tool to drag & drop your war file into the webapps directory, as below.
If you had installed Azure Toolkit for Eclipse/IntelliJ, you can refer to Deploy Java Web Apps to Azure using Eclipse or IntelliJ: Deploy Java Web Apps to Azure to do it.
Hope it helps. Any concern, please feel free to let me know.
Quick note that gave me a lot of frustration to figure out. If you use ftp via a client (I use FileZilla for it), think about this:
Place the .war file under: site > wwwroot > webapps > [Place .war file here].
Do also change the .war file name to: ROOT.war
It has to be that name for the system to deploy it. At least for me, the GitHub integration is not working, so I use this ftp method.
The deployment via ftp can take several minutes to be deployed and running.

how to access external files that are not in the web app folder using apache server

I have developed a JAVA webstart application using JNLP,am planning access jar files related jnlp from the outside webapp folder how to access those jar files.
jar files related jnlp from the outside webapp folder
Jars in the web app. directory are never meant for client distribution. They stay on the server and are protected.
A Java Web Start app. obviously needs to download all the Jars and related resources to the client, so every one of those resources must be available by URL on a public part of the server. Always make sure you can fetch the resource (Jar, JNLP, icons etc.) using a direct link in your favorite browser. If it does not allow it, neither will it work in JWS apps.

How can i change deployed application to webserver from application server?

I am having a web application which is deployed in oracle weblogic application server. After getting analysed, i found that there is no need for application server(atleast for this application), i am in need to deploy this application into the oracle weblogic web server.
can anyone help on this, how can i change deployed application to webserver from application server ?
Or in a different words, i can say how can i migrate my application deployment from oracle weblogic application server to oracle weblogic web server ?
I am using weblogic 10. and Maven to build the application
About the application, it is using Apache axis, webservices, jsf, and few java classes.
Thanks in advance!
I've recently migrated one application from WAS to tomcat
The approach i followd is.
Identify and remove all the WL specific dependencies / jars (that you may not need of)
Change the build script to generate .war instead of .ear
deploy the generated .war to any servlet container/ webserver
with your specs (axis,ws,jsf) you dont need a .ear but .war will do.
if you are using ant modify your build script, i'd suggest go for maven for better dependency management
building of top of the answer by #TechExchange
even for Jboss, you still need to analyze the application to remove all WL specifics.
Ex: Descriptors for EJB's MDB's and so on.
with JBOSS you can still use the ear format.
A quesiton, you had mentioned that because you found that the application doesn't need a app server you decided to migrate it to web server, now with JMS in the picture do you still need to move?

How would I/can I post a java web project from Netbeans to Sharepoint?

I have a java web application that I am developing in Netbeans (and running through Tomcat). Is there any way to put this application on Sharepoint?
This is my first time doing this. I've read that to post the application to a tomcat server you just have to copy the .war file over, but I haven't been able to find an easy solution for Sharepoint.
Sharepoint isn't a Java Application Server. You'll have to use Tomcat (or another Java Application Server) to host your application. If you need to interact with Sharepoint from your application, you'll have to use web services, a shared database or something else to communicate.
That's not possible out of the box. SharePoint only runs ASP.NET applications, not java projects.
You can deploy the solution to a Tomcat server and then use the Page Viewer Web Part to show external content.

Categories

Resources