Hosting Java Web Project on IIS [duplicate] - java

Has anybody found a way to run a Java web application within IIS? It seems to me it should be entirely possible to write an ISAPI plugin (is that the right word?) that integrates Jetty or a custom servlet container with IIS. The benefit of this is that a lot of great high end Java applications like Jira require separate infrastructure for an otherwise all Microsoft shop.

I think you will find of use the following two articles
Use Microsoft's Internet Information
Server as a Java servlet engine
Java + ISAPI + Jetty = JSP on IIS

Running JVM inside IIS worker process currently is a bad idea. I suggest you to use solution from this article instead: Deploying Java Servlet applications on Windows with IIS

Microsoft has recently released (2015 Q1) HttpPlatformHandler module for IIS 8+ that lets you host java (or node/ruby applications etc), on IIS.
http://azure.microsoft.com/blog/2015/02/04/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/

AFAIK Java EE cannot be hosted in IIS. To host Java EE Application you need at least Servlet container or a full Java EE container which is not supported by IIS. Although, some plugin might be able to do so.
As for your reference, below link is Java EE compatibility by oracle:
http://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html

Related

Java JVM versus Glassfish

I'm really new to Java and I have a basic question. I'm getting ready to deploy a Java web service that I have created in Netbeans/Glassfish. I used Netbeans because of the development GUI and tools. Of course I also deployed to Netbean's built in GF server because of easy and simplicity. I have a Windows 8 server with IIS that I now need to deploy this to. I was thinking that since Java 1.7 EE was already on my IIS server, than I wouldn't need a "container server" like GF but that doesn't appear to be the case. So, I'm confused. What's the difference between the server that Glassfish creates and the JVM that Java EE creates when it is installed? If I have to install Glassfish on my IIS server, am I going to have competing web services and port conflicts to resolve?
Thank you.
The Java Virtual Machine (JVM) is used to execute any Java program. However, all it does is execute the byte code in a Java binary, for example a Java archive (.jar) file. It does not include implementations of many of the Java EE libraries.
A web application, typically deployed as a web archive (.war) file, usually requires libraries not provided by the JVM. In addition, the standard Java web application architecture means that the entry point for the application is not in the .war file - it is in the web application server, which then calls into the code provided in the .war file.
The web application server, which includes full J2EE containers like Glassfish and also more limited web servers like Tomcat and Jetty, acts as an intermediate layer, running on a JVM and executing the web application provided in the .war file.
Probably the best way to run your application on an IIS server is to set up the IIS server as the front end - so the client facing ports would be under IIS control - and set up the web server as a back end to which IIS forwards the relevant requests. The answers at the following question provide some links that may be useful:
Deploy War File in Microsoft IIS 7

Spring application deployment on Java-ee servers

Can I deploy a Spring java application on all (or at least most) of JavaEE servers ? like Weblogic, JBoss, Webshpere, Tomcat, Jettty etc.
And is there is preferred Java EE server for Spring ?
Yes you can. And no - there isnĀ“t. Errata: you can take a look at the SpringSource dm Server. Be aware that spring is not a java EE implementation. Read this post here.
Yes, you can deploy it on any server, and you can use it on standalone applications and even on mobile applications. It is in no way restricted to web deployment. It is not even restricted to java, there is Spring.NET and even a Python version. However, java and web servers are a common if not the most common use for it.
Currently recommended web server by VMWare/Pivotal (current owner of Spring) is VFabric tcServer, which is a Tomcat fork containing some extra tools and functionality. But server in itself does not matter, Spring is container agnostic.
There is no preferred EE server. VFabric tcServer is a servlet container, not an EE server. It contains "enterprise capabilities" instead, but that's not the same thing. As said however, you can use whichever EE server you want.

Can Java EE web applications be hosted on IIS

Can we host a Java EE web application on IIS 5.1 server on windows XP?
You can forward your requests from IIS to another local tomcat or other java application server.
You can install your Application Server into the same machine as the IIS server. Then use AJP to connect IIS to your Java APPServer.
But I don't think you will be able to run Java Applications directly from IIS only.
AFAIK Java EE cannot be hosted in IIS. To host Java EE Application you need at least Servlet container or a full Java EE container which is not supported by IIS. Although, some plugin might be able to do so.
As for your reference, below link is Java EE compatibility by oracle:
http://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html
IIS can never Java web-applications directly. But with a plugin we can do it..
You can refer this page.
Absolutely you can. If you need further info you'll have to provide more info about the type of Java application you wish to use, and the version of IIS.

Which application server should i choose for my project?

I am currently developing an application for some researchers in my university.It's a small java program that you can use by command line. The next step is to package that program and deploy it to an application server. Some clients program will submit requests to the server who will call the tool that I wrote. Lately, we will add more tools to the server and he has to dispatch the requests to the right tool.
Which application server fits my needs ? I have looked for Tomcat, Jetty and Glassfish but it seems that they are only used for web application.
Is it possible to use those servers in some context different from web context? Which package archive should i use (jar, war) ?
Any advice?
Some clients program will submit requests to the server who will call the tool that I wrote.
The big question is what server-side technology and what communication protocol can you use between the clients and the server. You basically have two major options: HTTP and web services (in that case, consider using either JAX-WS or JAX-RS) or RMI-IIOP and EJBs (in that case, you'll have to use a Java EE compliant server like GlassFish).
I have looked for Tomcat, Jetty and Glassfish but it seems that they are only used for web application.
Not really. As I said, they can also be used for web services oriented applications. And GlassFish can be used for EJBs applications.
Which package archive should i use (jar, war)
The packaging will depend on the type of application you'll write, it's not something that you choose upfront, it's just a consequence. EJBs are packaged in an EJB JAR and typically deployed inside an EAR; Servlet based web services are deployed inside a WAR.
You really need to think about what technology to use first (with the current level of detail, I can't provide more guidance).
Do you even need an application server? There's nothing stopping you from adding the necessary network bindings and deploying it on its own.
Of the servers you mention, you've got 2 different categories: servlet containers and full-stack Java EE servers
Tomcat and Jetty are servlet containers. That doesn't mean that you can only do web stuff with them and you could manually add the required libraries to get a full Java EE server.
Glassfish is a full-stack Java EE server and can be compared with JBoss (both are open source) or the commercial rivals Weblogic and Websphere.
Sometimes this question is simple as the environment you are working in mandates a particular flavour of app server. You should check this first.
If you're not forced to use an app server, I'd ask why you think you need to use an app server?
I don't see why you would want to use tomcat, glassfish or jetty for a command line program.
If it's command-line based, and you want it to run server-side, you could write a little program that allows users to, for instance, telnet to your server, which in turn starts the CLI-application in question, and relays input / output to the client.
You may also want to look into Java Webstart, which makes deployment of new versions a breeze.
Actually we can't answer with so few elements.
- What are you planning to do
- With what technologies
- Where are you planning to host your application (have you got budget?)
- In which language are written the clients (even the future ones)?
- Could clients be on mobile phones (add some technlogy constraints...)
....
It would also be great to know what kind of request the clients will do, and what kind of response the server will provide...
Actually with what you tell us, all those application servers can do what you want...
I have looked for Tomcat, Jetty and
Glassfish but it seems that they are
only used for web application
You could even make a webapplication (servlet) and on the clientside use a httpclient to call that servlet... there are so many options :)
vive Paris!

Running a java web application in IIS

Has anybody found a way to run a Java web application within IIS? It seems to me it should be entirely possible to write an ISAPI plugin (is that the right word?) that integrates Jetty or a custom servlet container with IIS. The benefit of this is that a lot of great high end Java applications like Jira require separate infrastructure for an otherwise all Microsoft shop.
I think you will find of use the following two articles
Use Microsoft's Internet Information
Server as a Java servlet engine
Java + ISAPI + Jetty = JSP on IIS
Running JVM inside IIS worker process currently is a bad idea. I suggest you to use solution from this article instead: Deploying Java Servlet applications on Windows with IIS
Microsoft has recently released (2015 Q1) HttpPlatformHandler module for IIS 8+ that lets you host java (or node/ruby applications etc), on IIS.
http://azure.microsoft.com/blog/2015/02/04/announcing-the-release-of-the-httpplatformhandler-module-for-iis-8/
AFAIK Java EE cannot be hosted in IIS. To host Java EE Application you need at least Servlet container or a full Java EE container which is not supported by IIS. Although, some plugin might be able to do so.
As for your reference, below link is Java EE compatibility by oracle:
http://www.oracle.com/technetwork/java/javaee/overview/compatibility-jsp-136984.html

Categories