How jetty server can be integrated with apache server? - java

I am developing an web application where some existing part is written already in php and for that apache server is being used. But now i have to complete rest of module in Java using jetty web server. Is there any way to integrate jetty webserver with existing apache webserver so that i can simply deploy as war file?

Yes, of course. Jetty is a servlet container similar to tomcat. There are instructions here:
http://wiki.eclipse.org/Jetty/Tutorial/Apache#Configuring_Apache

Related

Apache web server or Tomcat for java war and php

I'm building an application for a company and I also have to handle the deployment.
The application is a java restful API which I usually deploy on a tomcat. The front end for the application in written in PHP (not by me) and will be installed on the same machine. The back end must be reachable both from the front-end and from the web.
What is the best approach, considering that this is a production environment?
Do I install everything on a tomcat? Both the war and the php application.
Do I install the war on a tomcat and the PHP front end on Apache web server?
Do I connect the tomcat to the Apache web server?
Something else entirely?
Also are there downsides on having both the back-end and front-end on the same machine?
If your back-end uses the Servlet API, you require a servlet server and Tomcat is a common choice. Even if Tomcat provides CGIServlet, I believe nobody uses it on production servers to run PHP scripts. So you need at least two servers.
I would extend it to three servers and run:
the back-end on Tomcat (bound to localhost),
the front-end on a PHP FastCGI server like PHP-FPM (bound to a Unix socket),
a proxy server like NGINX (lighter than Apache2) to connect to PHP-FPM. It does not have to proxy Tomcat, since everything is on the same machine.

What is the relationship between Apache Tomcat and Apache Axis2 in the context of RESTful API and WSO2

I know I want to build a RESTful api and use Angular on client side. I am choosing between server technologies. Apache Tomcat can do RESTful web services and could do for years now. I was wondering if Axis2 is meant to be replacement for Tomcat. Also I have been encouraged to incorporate WSO2 middleware which uses Axis2. Ideally I'd like to use REST on Axis2 and then WSO2 middleware.
What is the relationship between Apache Tomcat and Apache Axis2 in the context of RESTful API and WSO2? Does Axis2 run within Tomcat?
Apache tomcat is an application server whereas Axis 2 is a Web Services engine.
So no, Axis2 is not meant to be replacement for Tomcat. An application built with Axis2 can be deployed on Tomcat or any other compatible Application Server(AS).
So yes, Axis 2 can run within Tomcat.
WSO2 is irrelevant to your question. Middleware includes Web servers, application servers, content management systems, and similar tools that support application development and delivery.
For a quick description Apache Tomcat is a web server and more precisely a servlet container that allows you to handle HTTP resquest inside servlet.
Apache Axis 2 is a librairy that can handle web services (SOAP and RESTFull), it can run on a server such as Tomcat.
For REST API you can use WSO2 ESB or WSO2 API Management...also if you want to build a restful service you can create a webapp with JAX-RS and deploy it in WSO2 Application Server. As WSO2 Application server use Apache Tomcat you donĀ“t require an Apache Tomcat Server.

How to Consume java web-service (jetty) in C#

I am a newbie to C# development.
Scenario -
We have an application running on .NET 2.0 framework and IIS 6.5. Now, we have installed another application on a remote server which utilizes Jetty web server. For us to integrate both the applications we need to add a reference to a web service in jetty. I have found the web service path on the server which is a .class file and I want to add a reference to my .NET application.
My problem is - how do I find the URL to add a web reference to the .NET application in Visual Studio ? or is there another way to integrate both the applications ?
Thanks
Have you tried using the .wsdl of the .NET web service to generate a proxy class in the Jetty web server? I am assuming there is some type of discovery mechanism built into the Jetty web server for web service capabilities, right?

Deploying SIP servlet on Jboss

I'm new to SIP Servlet development and I would like to know how to deploy my Sip servlet to my Jboss server.
I can't seem to find how to do it by googling it. I see a lot of information on using mobicents but do I have to?
Can't I just deploy directly like I would my HTTP servlets?
Thanks!
EDIT:
Also what is the exact difference between JAIN sip servlets and Sip servlets?
Mobicents provide Jboss and tomcat applications servers with additional modules which are required to deploy and run your sipservlet application
if you download and extract the jboss distribution you can see there are some modules call
sip-presence,sip-balancer , mobicents-media-server-1.0.3.GA.sar in deploy folder these are few and you will find a lot of additional modules/resources.
What you have to do is download the jboss from here and deploy your sipservlet war file as a normal web deployment.

Embedded Jetty and SOAP

I am trying to run an embedded Jetty and would like to expose a soap webservice. The project is loaded as a WAR generated by netbeans. The webservice is generated from a WSDL. What is the simplest way to add SOAP support to embedded Jetty
The axis2 web services framework can be deployed as a normal web application onto your embedded Jetty instance.
It provides a framework for the execution of your web service. You can embed such services within the Axis2 war file or deploy them separately .aar files (Special Axis2 archive file format)
It seems like there is a bridge to use JAX-WS with Jetty. Though I never use it personally.

Categories