iis 8 java and .net web services - java

I currently have web services written in .NET being hosted on a Windows 2012 server with IIS 8. The .Net services were written by someone else. My experience is mostly in Java so I figured I'd write my web services in Java. Now I'd like to host the Java web services on the same server. I know I can't use Java web services directly in IIS 8 but is there a way to have Tomcat hosted through IIS 8 and then have the Java web services routed through IIS 8 to Tomcat? I've seen the Tomcat connectors being used but the main thing I want to do is host both Java and .Net web services.
Is this possible and if so, how?

Both IIS and tomcat are web application servers. When they work, what they do is to listen to http requests on some specific port and handle them. So, as long as they are configured on different ports, there should be no problems.

Related

Is it a good idea to host Java JAX-RS web services on IIS?

We are required to build some Java JAX-RS web services that will connect to some other external web services to retrieve data. Logically, we should host these new JAX-RS web services on a container like WebLogic. Due to cost saving measures by management, we are told to use IIS to host these JAX-RS web services as it is supposedly cheaper than WebLogic. They want the services to be written in Java because it is OS independent, so using .NET is out of the question.
(1) Is using IIS to host Java JAX-RS web services instead of a fully J2EE compliant container like WebLogic to save cost a good idea?
(2) How do we host Java JAX-RS web services on IIS 7.5? What are the required add ons?
Thanks in advance.
First of all, IIS does not support Java. See this old post in MSDN (2005)
IIS can never directly support the use of JSP because it requires an add-on to run Java code in a JVM to Load,
Therefore you always require a J2EE server to execute J2EE services, and the IIS add-on isapi_redirect (see the link). The add-on will capture the requests and forward them to the J2EE server (in the example is used tomcat)
So the answer to your question
(1) Is using IIS to host Java JAX-RS web services instead of a fully J2EE compliant container like WebLogic to save cost a good idea?
No, because you allways need a J2EE server., so the cost parameter is non applicable (without considering other aspects). I suggest also to consider some free of charge servers like Jboss, Tomcat or Jetty
Note also you do not need a fully compliant J2EE server to use JAX-RS. Latest versions of JVM are shipped with an implementation of JAX-RS.

Deploying PHP and Java EE applications in Apache Tomcat server 7.0

I have Apache Tomcat 7.0 and have developed two different applications in PHP and Java EE. I want to deploy these two applications in the same server, Apache Tomcat 7.0.
Is there any possibility of deploying both applications in the same server?
Is it possible to have inter application communication?
Can I pass data from one application to the other?
Yes, you can run PHP and Java applications in a same server with Tomcat 7, Apache 2 and JK Connector.
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
You can use database or webservice to share data.
Java, obviously, runs on Apache Tomcat already. But you can also install quercus/php on your Tomcat Server, and then run your PHP application directly on Tomcat as well, eliminating the need for Apache HTTPd and mod_jk. (No I dont work with them. Just a user.)
Once you have both Apps on same Tomcat server, you have several options to have them communicate with each other.
Web Services expossed by either or both apps.
crossContext=true
Having a Shared Memory Block seems to be an option, as described here.
There would be more ways I suppose, these are the ones that come to mind.

Processing web requests in Java desktop application through tor network?

I write Java desktop applications sometimes and sometimes I would like for my web requests to be processed through the tor network.
How can I go about configuring this properly in Windows and/or Linux?
Have a look at the netlib library to push all your JVM traffic through TOR.
I think you have to using Web Service technology. Web Service is independent technology and by it can connect several application with different technology together. For example you can develop server with .Net platform and develop client with Java,Php,Python or others (or vice versa). Web Service in java has JADX-RPC(older) and JAX-WS standards.

Difference between web server and application server [duplicate]

This question already has answers here:
What is the difference between application server and web server?
(28 answers)
Closed 4 years ago.
As a layman, how do I understand the difference between web server and application server ? If you could give an example using a Java based web app in very "simple" terms that would be really great..
Also when we say Weblogic, is it a web server only ?
A web server is something that handles HTTP requests and responses.
An application server (like WebLogic, WebSphere, JBoss AS, Glassfish, etc) usually includes a web server, but also adds a lot more features. The most important is that it manages objects. Whether they will be servlets (Servlet container), EJBs (ejb container), JMS listeners, etc.
Webserver can execute only web applications i,e servlets and JSPs and has only a single container known as Web container which is used to interpret/execute web applications
Application server can execute Enterprise application, i,e (servlets, jsps, and EJBs) it is having two containers 1. Web Container(for interpreting/executing servlets and jsps) 2. EJB container(for executing EJBs). it can perform operations like load balancing , transaction demarcation etc etc
I would say definitions vary. In the generalized context, a Web Server is a server that can receive incoming web-requests and have knowledge about how they should be handled and responded to. Some requests are static (html files, images etc), some are dynamic. In the case of dynamic requests, the web server will know where to route handling of the request, could be a JSP page or a java servlet, a PHP script, a perl CGI script etc etc.
While the "web server" in this context executes the dynamic handler, it is not considered to include any supporting middleware features for the dynamic handler.
An Application Server, by contrast, is a general execution environment that offers some type of middleware tier support. Examples are EJB containers or the .NET framework built into Windows (in where Windows in itself is an "application server"). There is no inherent requirement that an application-server have anything to do with web requests (although many do), it's just a general execution context and container for any type of application that offers some sort of additional middleware support.
In a purely web-centric context, many people will draw the line at static vs dynamic content. In this definition, a "web server" can only handle requests for static information itself and it will pass on requests for dynamic content to the "application server". For example, Apache httpd is a web server and Tomcat is an application server. IIS is a combination of both. In the Java web world, an application server can be either a servlet container (like Tomcat), or a full blown Java EE container (like JBoss, WebLogic or WebSphere) that provides the Java EE middleware support (EJB) container in addition to the servlet container.
And adding to previous answers, Weblogic is app server and not only web server.
Basically if we say the major difference between Web Server & Application Server, is the protocols on which these servers work.
Web Server -- it works on protocols like HTTP & HTTPS. Example of this server is Apache. For web server you use JSP, Servlet.
Application Server -- it works on any protocol. example is JBOSS. On application server we host EJB, web service or any business Logic.

running php and java on the same server

I have web services written using java which interacts with the android application only now we need to implement a front end web portal using php frame work codeigniter. We have common database mysql 5.1 which interacts with both the web services and also web portal, is it possible to configure the LAMP stack in a server which is already running tomcat6 servlet container but with out apache web server. How do I processed further and when Iwas search for same issuse I found something called php java bridge is that what I have to use??
Let me be more precise on this, I have ec2 ubuntu instance already running, domain is parked in godaddy, i have configured the A records with the ip of my ec2 instance, so when the requests comes in it will be directed to the application which is running in the tomcat6/webapps/ROOT but now I need to redirect it to the php application how do I do it and also requests from android should be directed to web services which are java based, how do I manage this?
Kindly help out
You can proxy requests to the tomcat server from Apache ... have two virtual hosts, one for the tomcat and one for the php ... all co-ordinated by apache.
http://tomcat.apache.org/connectors-doc/webserver_howto/apache.html
It is recommended that you also read the Workers HowTo document to learn how to setup the working entities between your web server and Tomcat Engines. For more detailed configuration information consult the Reference Guide for workers.properties, uriworkermap and Apache.

Categories

Resources