How to debug web services deployed on tomcat on different machine? - java

I have a machine say 'M1' on which I have tomcat server instance created. I have deployed a war file on this server. This war contains all web services and other stuff. So from web side whenever I work in debug mode, I can't debug web services on browser debugger.
In my local machine I have eclipse installed which contain all codes. Using this I have created war file which is deployed on tomcat server on machine M1.
Is there any way by which I can debug web service calls from browser? Or is there any different way to debug web services which are deployed on remote machine?

The short answer is to add the following options when the JVM is started:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
This way you can debug the Tomcat server remotely.
For more info, see: https://wiki.apache.org/tomcat/FAQ/Developing#Q1

Related

How to separately configure application server and web server using tomcat?

I want my application to run on server configured on a different machine how can I do it please help??
my application connects with the database so for security reasons I want to separate both application and server machine
I am using tomcat for server
and I have built a maven java project
right now y projects run on tomcat installed in the same machine but I want to separate my app and server

How to view all the published resources of my server RESTful web services

I've received a sample Java application, which contains some RESTFul web services. I've set it up in eclipse with Tomcat and it's in running state. Unfortunately I haven't received any information about the published Resources. So my question is:
How can I find out all the published resources of my app? Are they printed in any server logs at the time of server startup?
I have come to know about WADL file which serves my purpose. This file is generated automatically by Jersey-2.22 when the application is up & running. It is accessible by hitting
http://localhost:8080/<path to application>/application.wadl and
http://localhost:8080/<path to application>/application.wadl?detail in detail.
I've taken localhost because the app is deployed on my local machine and 8080 because app is deployed on Tomcat7 on that port.
Reference: https://jersey.java.net/documentation/latest/wadl.html

deploy java EE application on the server

I have just finished developing a java application angularjs and java EE and mysql and tomcat, spring boot, my manager has just given me a a real server with windows server 2012 and ip# x.x.x.x to deploy the app inside,but i have never done that before, can anybody please tell the steps to follow to make my application online, and deploy it on the server
step-1. here I'm deploying pos.war
First go to tomcat webapps folder and past it
step-2. go to tomcat->bin folder start tomcat by clicking startup.bat
step-3. go to browser write localhost:port/project name eg. localhost:8080/pos (here my tomcat run on port 8080)
Done....

Deploy finished jsf application on glassfish server

I have built a JSF application and used a local glassfish server on my computer and I have developed in NetBeans.
Now I feel finished and want to try to install the JSF applicationen on a non local glassfish server.
I have set up a glassfish server on a Winows 2008 machine and everything seems to work as it should.
But I have no idea how I will deploy my JSF code on the server, do I need to package it in some way?
Have tried googling but have not found a good answer so if someone could guide me I would be grateful.
I use:
glassfish 3.1.2
Windows 2008
JSF 2.1
NetBeans
Start your glassfish server using the command
asadmin start-domain yourdomain
Then go to the administration GUI:
http://localhost:4848
Under the point Applications you can deploy and activate your web projects.
To deploy your jsf-application you have to export it as a war-file.
But I have no idea how I will deploy my JSF code on the server => you can't deploy a code o web server directly
You need to make war file of you web app (jsf is a web app) and after than upload in glassfish via web admin consoleYou can see a detailed blog with pictures here as how can you deploy war

Deploying to a Tomcat server which is already running outside of IntelliJ IDEA

I have installed Tomcat server on my PC and I have added it as a service in Windows. So now it starts each time I boot my computer. Now, in IntelliJ I have configured an application server, and that is my Tomcat server, however when trying to "run" the application it says that the port is already in use....and it is ofcourse since Tomcat is started on boot. Is it possible that IntelliJ deploys to the already running Tomcat server instead of trying to start again?
If you want to deploy to Tomcat started outside of IDEA, use the Tomcat Remote Run/Debug configuration type.
The difference of the Remote configuration is that it doesn't start the server, ensure you create Remote configuration, not Local:
It's possible to update application without restarting the server, refer to the Updating Applications on Application Servers help section.
You can use Jrebel plugin. It will be helpful to update your application without restarting your server.

Categories

Resources