I've just finished a web project, working with Struts2, and now I want to add this project to my FTP site. The site runs smoothly on Tomcat 8, but I am not sure how to deploy it to an actual site.
How do I add this .WAR file that has .jsp and .xml files to a website? I've tried to just put it in a directory and launch it with fileZilla, and it doesn't work.
What should I do to launch my Struts2 project to my FTP site?
In FileZilla put your user name and password.
In left side will show your machine file
On right side put path of your webapp folder, It will come in mail when you buy any server from hosting providers or ask them.
Upload your .WAR file in webapp folder.
Restart Tomcat.
I assume you need to deploy it again on your FTP site. You need to deploy it into your webapps folder of your server. You may look at this link. This might help you :)
Related
I have a jersey web service. I am trying to download a file on my hard disk through my localhost Tomcat server.
window.open("D:\\mario.zip");
This line doesn't work due to security reason.
My 2nd try is creating a folder in the project which can be accessible like localhost/myfolder then I put a file there which can be accessed through http.
Now I copy files from a specific folder to "myfolder" so that they can be downloaded.
The problem is: although the files exist in my hard drive, they cannot be accessible through http. Only after I refresh the project in Eclipse. The files can be accessible through http.
Is there any trigger for the server to update its file list?
How do you create "Aliases" in Apache Tomcat?
This is the answer. I don't know much about other solution than creating an "alias" as in Apache server. Olaf Kock's answer would be interesting too if he can be more beginner-friendly.
Further notice, you can find server.xml in your Tomcat server "project" in Eclipse.
I have a website someone's developing for me on a VPS (Java, javascript, CSS, HTML) that I would like to run on my Macbook Pro.
He commits the source on Github, which I download with Sourcetree.
I have Tomcat 6 and MySQL running on the Macbook fine.
Can I bring the root folder, the mySQL db and an associated media folder over without creating a .war file to run it on tomcat on localhost by simply setting up the connections properly in datanucleus, or is it much more complicated than that?
Thanks in advance for your thoughts.
I know people who try to develop application directly in die Webapp Folder from Tomcat but that is not the right way.
At your place i'll do this:
clone the application locale on your mac
Use an IDE(eclipse/Netbeans/IntelliJ) to open the project
Build a local war file which you can deploy directly to your $CATALINA_HOME/webapp/
Do not forget the make all required mySQL settings (context.xml) and so on...
Yes, you can. But it is necessary to have compiled webapp.
Simply put root folder contents (your deployed application) to "/webapps/ROOT" and start tomcat by running script in "bin" folder.
Make sure that you properly configured database properties of your application.
If you have only sources - it is not such simple. You have to build war and deploy it. Or ask developer to include "target" directory in git repository and then copy "classes" folder to /webapps/ROOT/"
I have problems with file uploading on Tapestry 5.3.6.
I am using this as a reference http://tapestry.apache.org/uploading-files.html
With Jetty web server, everything is fine, file gets uploaded into project directory.
But, If I run app on Tomcat, file get uploaded into Tomcat directory.
Is there any way to point Tomcat to upload file to project directory?
Thanks in advance :)
As far as i know, you can contribute with a parameter in the contributeApplicationDefaults method in AppModule, like
configuration.add(UploadSymbols.REPOSITORY_LOCATION,);
Try that.
I am a PHP programmer.But i have a website code which was developed in jsp technology..
I dont know the environment of jsp engine. I wan to run my website in my localhost using Tomcat server..Please help me to do that...
You first need to install and download Tomcat. Of course you need to have a Java runtime in your machine. The website should have been given to you as a WAR file. To install it, simply copy the WAR file in the webapps folder of Tomcat. If you only have a bunch of JSP files, put them in the ROOT folder of Tomcat.
Hello i have a java backend running on tomcat. java creates a .txt File that is saved locally in the Webcontent Folder. But the file is not found on the client side, altought it exists on the Webserver. After a refresh of my java workspace the file is found. Is there a way to tell tomcat to refresh / redeploy using java?
greetings!
Tomcat does not see your WebContents folder, but a copy create by the Tomcat server connector. Refreshing updates the copy.
What generates the .txt file? A separate program or code embedded in your web application?
There are a number of cases where the app would have to generate the file to be immediately available to the browser. For example, an image upload window. When the server creates the file from within WTP, it will have to also create the file at the published location where Tomcat is expected to pick it up. Open the server properties, tomcat arguments, catalina root parameter to find out where this location is. When the application is deployed this functionality will need to be disabled, of course.