What need to do to copy Netbeans project on server? - postgresql

I have problem regarding on netbeans project. I had build the project using netbeans on localhost. It run smoothly on localhost, but when I try copy this netbeans project to the company server it cannot be run as like on localhost. On the server, not has netbeans. Is it possible to run my netbeans project on server that have no netbeans?
If yes, how is it?Please help me..
On my local machine I have netbeans, use tomcat and database postgres and at company server have java, jdk and database postgres.
Thank You.

Though the question is vague I will try to answer it.
First of all, if you are creating a standard web project using netbeans then you should be able to right click on your project name and create a war file. In the output window you will see where the war file is created.
Now move your war file on the server, server will need a tomcat.
Copy the war file in TOMCAT_HOME\webapps dir and restart the tomcat.
If you see a new dir created under webapps with the same name as you war file then you have successfully deployed your project.
Still there are no guarantees that it will work there because you might have other issues related to db connection etc.
Thanks

Related

How to run web pages without starting eclipse

I have created a dynamic web application using eclipse. it consist of java servlet and jsp and it run on tomcat 7.2.it runs fine under any browser if run it through a eclipse, copy the address and paste it in browser while eclipse is running. I wish to run this application without running eclipse. for this i run the tomcat manually using startup command. however than when i use the website address of my web site in the browser it says resource not found. I want to run this without actually running eclipse. any suggestion please.
You'll need to deploy the war file that was built by Eclipse to your new Tomcat server. You can just copy it to <tompcat-instrallation-path>/webapps location. It will be exploded by Tomcat automatically and you'll be able to see your pages at:
http://localhost:<port>/<name-of-your-war>/...
Where <port> is usually 8080 if you didn't change it in Tomcat's config and <name-of-your-war> is the name of your war without .war extension.
You will need to take the built war file, name it ROOT.war, and place it in the /webapps directory in your tomcat directory. Tomcat gives instructions for this, you will replace the ROOT.war that is there by default. You should also check to make sure you are using the same port on which Tomcat is running.

Deploying and managing Java EE applications on remote machine

I have a VPS machine running Ubuntu 12.04 and I want to deploy and run my local Eclipse projects (mostly wicket projects) on this machine. I installed and started Jetty server on it but could not figure out what to do next. Should I just copy my project files to the /webapps folder and edit configurations? I can sense it is not that easy (Consider me as a noob). Any help would be appreciated
Generate a war and copy it to webapps folder. Then startup server.
If you need further details, take a look at this:
http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications

Running Maven project on glassfish server

I want to run web based Maven project on glassfish server. I am totally new on maven. However, i have successfully build the maven project and glassfish server is up and running also. Moreover, there is WAR file also in target folder but i am confused what is the next step to run that project on glassfish ?
Any help will be highly appreciated.
You have different options to solve this task:
If you are new to Eclipse I suggest to change to NetBeans. It comes with integrated support for application server deployments. You just add your maven (or nearly any other type of project like WAR, EJB and EAR) project and your desired application server instance (Glassfish) and you are ready: Right-click your project and choose Deploy and it'll get deployed to your server. NetBeans also supports hot-deployment.
You can deploy your WAR file manually in GLASSFISH_ROOT/glassfish/domains/domain1/autodeploy and it'll get deployed if your server is running. But this is not very efficient during development.
If you want to stay with Eclipse you can use the maven-glassfish-plugin or this maven plugin to do the deployment for you. I'm not sure which one is better but this topic is also discussed in this question and this question.

Deploying GWT app to tomcat in eclipse

I want to use tomcat server in development mode with GWT. When I use embedded Jetty it deploys application to the current directory(where my war folder is located). So it generates all the files there. How can I configure eclipse to use tomcat server and all the deployment stuff to be copied to tomcat webapps directory. I have tried to use -noserver option in Run conigurations, but it doesn't copy any resource from war directory to server deployment directory.
Can I use tomcat server in such manner?
P.S. i want to solve this problem withou ant or maven
Using my own server in development mode instead of GWT's built-in Jetty instance
You will need to copy the contents of the WAR folder over, but only once.
Have you looked at Eclipse WTP? It allows deploying to a server right from within Eclipse.
For a GWT project, you'd then, in addition, follow that recipe: http://code.google.com/eclipse/docs/faq.html#gwt_in_eclipse_for_java_ee

Exporting Wicket to a Web Server

I'm serious when I say have been all over the internet and on google for past few hours trying to find an answer to this question. Ok, I have already coded and compiled a working wicket in Eclipse. It runs in Eclipse just fine but I now need to export this to my webserver. How do I do this!? It's such a simple concept and yet no one has talked about it. I know I need tomcat, but they don't say how to export the files. If a JAR file works. If I need to configure Tomcat is some way. How to get this to work with an already running web apache server. My guess is that tomcat has to be running to execute the java portion of the wicket and then you can just point a link to your index.html. But I have no idea. Enlighten me please with a step-by-step tutorial? I'm a slight beginner with Eclipse and started using Tomcat and Wicket only 2 days ago.
Its preferable to pack your project into a war file distribution.
An easy approach to do that, is to use Apache Maven for building it.
For Maven there are plenty of plugins available, one of them is a "war" plugin, which helps you creating your war / web archive.
The war file you have simply to put into the webapp of a fresh downloaded tomcat.
There's a couple ways but one way is you can compile to a .war file and deploy from the admin console in tomcat. See here for the tomcat documentation.
In Eclipse, right click your web application project, select Export -> War File and follow the wizard.
When you have your .war file ready you can then upload it to a Tomcat or Glassfish installation.