Configure netbeans to deploy a web application in a real server - netbeans

I have an external Server consider its IP is https://10.6.99.88:4949
Now I want to deploy my web application directly to this server instead of localhost:4848, Is there any way to configure Netbeans to deploy this web application directly to the server, if yes how can I do it ?

Yes, this is possible.
First you have to enable securehub-admin on Glassfish:
asadmin change-admin-password
asadmin enable-secure-admin
asadmin stop-domain
asadmin start-domain
Then add a remote Glassfish Server in NetBeans (Choose Remote Domain when creating the server) and fill in the details for your server instance.
If it doesn't work, you may have to restart NetBeans and Glassfish again. IF you have a proxy configured in NetBeans, this could also cause problems with the connection.
See also:
NetBeans Wiki - Remote Glassfish
Netbeans and Glassfish remote deployments

Related

How to debug deployed war on tomcat ec2 instance with local eclipse source code

I have set up an AWS Linux EC2 instance and install tomcat.
successfully deployed my war file and everything works fine.
I need to connect my development eclipse to remote tomcat for debugging.
how I can connect my local eclipse source code to remote tomcat deployed to war.
I already follow some tricks and tips but unable to connect.
It will help if you can you share error messages or screenshots when you enable debugging while starting your tomcat (Remote debugging Tomcat with Eclipse) and assuming your EC2 is reachable to your host running eclipse and you have opened debug port in your security group?

Tomcat can be started using startup.bat but not from eclipse

I have installed apache tomcat 7.0.47. I have used netbeans for a while, now i want to try eclipse. I've installed eclipse kepler. I have created my first struts application using it.
I have deployed few applications from netbeans which worked well. Now i cannot start up the tomcat server from eclipse. I'm getting message as
Several ports (8005, 8181, 8009) required by Tomcat v7.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s).
I have checked that no javaws.exe running in process explorer. Also checked no processes using the port 8181 using netstat.
When i start the tomcat from bin using startup.bat it starts normally and i have checked in browser. It is showing the default page on localhost:8181 and listed in netstat.
Any way to start my first struts application in eclipse. Tried almost every thing but no improvement.

Are Tomcat server and Tomcat linked with Eclipse different?

I have installed Tomcat 7 server on Windows on port 8088.
Now I have added the server in Eclipse.
But I am not sure whether I need to keep the Tomcat running by going in the Tomcat directory or I have to close that and run from Eclipse?
And how will Eclipse know that I have setup the Tomcat on port 8088?
In the server view, you can double-click on your tomcat server and change the ports. This means that the folder where you have tomcat running (CATALINA_HOME) can still be used run Tomcat "production" and eclipse will use the same binaries to run within WTP. However, all other folders will be confiurable for your "dev" instance.
Actually you'd better change the settings to make sure there is no collision between eclipse ports and the ports declared at windows level.
Another simple solution is to stop tomcat at the windows level. Eclipse will take care of its own instance.
Other useful settings you can modify are the timeouts (in debug it's sometimes necessary), the deploy folder and even add some more web apps (modules tab).
do i need to keep the tomcat running
by going in the tomcat directory or i
have to close that and run from
eclispe.
No you don't need to keep tomcat running outside. You can run/stop it whenever you want from eclipse.
how will eclipse know that i have
setup the 8088 port
You will find project named Server or Servers; depends on eclipse version; in your workspace; in which you have added tomcat. It has tomcat configuration file which tells eclipse how to manage tomcat. It has a file called server.xml which contain port information that is on which port tomcat will run.

Eclipse: How to deploy ear project into separate managed server in Weblogic (non AdminConsole)

I'm using Eclipse for J2EE project development. Target app server is Weblogic10R3.
I was successfully deployed my ear project to weblogic via Run As.. Eclipse feature.
By default it deploys to AdminConsole server. Because of project specific issues I have to deploy into separate managed server (not Admin Console).
Am I able to override deploy behavior? I didn't find required settings inside server plugin.
Deploying to a managed server is supported as long as you have configured the server connection as remote vs local. You can do this even if your "remote" server is localhost. If you aren't sure, you probably need to create a new instance in the Servers View. The local vs. remote option is set in the new server wizard.
Once you have a remote server defined, double-click on the instance in the Servers View and you will see an editor open with various options, including those related to publishing.

Remote deploy from Eclipse to JBoss AS and integration Eclipse with remote JBoss

I have the following situation. My JBoss server runs on the remote server under some bound address. I would like to run Eclipse on my local machine and deploy results of work to the remote server where I could test it and debug it. I'm working on enterprise Java project and I'm normally deploying one ear file.
I know how to provide remote debugging but what possibilities exist for integrating remove deploy in Eclipse?
I was trying for first the JBoss tools plugin. There is a deploy-only server for the only deploying the project. I'm connected on the network disk on the remote server where JBoss instance runs.
But this plugin deploys ear exploded and afterwards because of the one persistence.xml in my project where tag defines what jars contain entities and instead of the jar there are something.jar directories. Then hibernate isn't able to load entities.
Is there some possibility how to easily make a remote deploy directly from Eclipse? Or better is there possibility how to integrate work on remote JBoss server in Eclipse (I mean run JBoss server, stop it.)?