C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Webservices »

Hosting JAVA web services on IIS


Posted Date: 08 Sep 2008      Posted By: Venkataraghavan.T.S      Member Level: Bronze     Points: 1   Responses: 3



Hi,

Is it possible to host JAVA web services in Microsoft IIS, If it is possible kindly guide me about the way of doing that.

With Regards,
Venkat





Responses

Author: nirmala    09 Sep 2008Member Level: BronzeRating:     Points: -20

Actually, your question has nothing to do with IIS nor web servers in general. Let me explain...

IIS provides no configuration options that tell the browser the JVM version to download... not because Microsoft/IIS has any prejudice against Java, but rather because that option makes no sense from a web server.

In fact, you will find the same behavior hosting your application on any other web server (short of a Java-based webserver, which is intrinsically prejudiced towards Java), so either all those web servers are prejudiced against Java, or whatever you are imagining does not exist/make sense. Convinced?

No? Ok, then let's think about it for a moment - how exactly does a web server like IIS host an Applet for a browser to run?

You put a web page on IIS which contains instructions to retrieve the Java class file (or JAR file) to run, as well as instructions to download/install a JVM should a JVM not exist.
You make a request for a URL that contains the Java Applet, and the web browser downloads this web page, reads the instructions inside the web page, downloads the Java class file (or JAR file), and then depending on criteria, either runs the class file with a local JVM, or download/install a JVM to then run the class file
Throughout the entire sequence, all IIS does is serve up static files - such as the web page, the Java class file, the JAR file, or the JVM to download/install. IIS has no way to tell the web browser what to do. The web browser decides what to do based on the contents of the WEB PAGE. The user determines the contents of the web page.

Now, the WEB PAGE does contain details on how a browser should behave if it does NOT have a JVM, and that is what I recommend you locate and fix.

Incidentally, this same functionality is used to update Flash when you need a newer viewer, or Acrobat when you need a newer reader, etc... and it is the responsibility of the WEB PAGE author to configure what it requires... and not the web server.

I understand that you think that you are basically "hosting a Java applet on the IIS server" so the "server" should be responsible for helping you administer the server and its application's dependencies, such as JVM version. However, in this case, what you are hosting is actually running on the CLIENT, not SERVER, and since we are interested in SECURE client/server computing, there is no server-side configuration to control the client. In this unique instance of software distribution, you have to modify the application's code to control your CLIENT dependencies since that code actually runs on the CLIENT

Nirmala



Author: Paul Donovan    19 Sep 2008Member Level: BronzeRating:     Points: -20

Oh, boy... Did you actually read the question? Do you do this for real?

Venkataraghavan.T.S, I'm sorry that his answer sucks. I'm also sorry he was such a condescending jerk about it. Even though he was wrong.

That was a lovely, lengthy, time consuming explanation that had absolutely nothing to do with the question that was asked.

Since you were so confident, I took alot of time to laugh at your answer before I came back to point out why you're wrong and should probably reconsider your industry choice. The question wasn't, "How do I make Java Applets available on IIS?" Savvy?

It was "Is it possible to host JAVA web services in Microsoft IIS?"

TA-DA! That's NOT the same thing! :-D!

Java Web Service != Java Applet. OK?

You do not download Java Web Services to run them. OK?

You do not run Server-Side Java Web Services on the client PC. OK?

It is -NOT- the same functionality as Flash, PDF, etc. OK?

Hence, WEB SERVICE. Not APPLET.

If he had been thinking "hosting a Java applet on the IIS server" he probably would have said THAT and NOT "Java Web Service."

You don't need to code for the CLIENT because the code doesn't run on the CLIENT. OKAY?

Wow.

So, here's an answer to THE QUESTION:
You don't. You host them on something like Tomcat, which is built for hosting Java Web Services. Then, you configure IIS to forward requests to Tomcat. I am currently trying to figure this one out myself, and am configuring IIS as we speak, but haven't succeeded yet. If you find something, let me know. Start with serving them up in Tomcat or another Java Servlet Container.

Why do you do all this? You do it because JAVA WEB SERVICES PROCESS REQUESTS ON THE SERVER SIDE.

Let me know if you have further questions.



Author: Paul Donovan    19 Sep 2008Member Level: BronzeRating: Revenue Score: 0     Points: 0

Oops. Duplicate.


Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.


Next : Webservices method to create and write a pdf file
Previous : HOW TO DEPLOY WEB SERVICES ON THE .NET SERVER?Developers please--------------
Return to Discussion Forum
Post New Message
Category: Webservices

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use