Does jnlp opening depend on context somehow?

Dear Experts,
I have a script to open launch an application via web start.
It works fine, when it is in its own html file. The jnlp file is interpreted.
If I copy and paste the code to where I really need it,
the jnlp file does't get interpreted any more. It is simply displayed as XML.
I don't see how this code should be dependent on the environment.
So I simply gave a link to the working html file and was ready to accept the detour.
However, the same problem occured.

I am completely lost on this issue.
Any ideas?
<SCRIPT LANGUAGE="JavaScript"> var javawsInstalled = 0;  
	var javaws142Installed=0;
	var javaws150Installed=0;	
	isIE = "false"; 
	if (navigator.mimeTypes && navigator.mimeTypes.length) {    
	 	x = navigator.mimeTypes['application/x-java-jnlp-file'];    
		if (x) { 
      		javawsInstalled = 1;       
			javaws142Installed=1;
      		javaws150Installed=1;   
		} 
	} else {    
	 	isIE = "true"; 
	} 
</SCRIPT> 
<!-- check IE, using vbscript NOT javascript -->
<SCRIPT LANGUAGE="VBScript">
	on error resume next
	If isIE = "true" Then
	  If Not(IsObject(CreateObject("JavaWebStart.isInstalled"))) Then
	     javawsInstalled = 0
	  Else
	     javawsInstalled = 1
	  End If
	  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.4.2.0"))) Then
	     javaws142Installed = 0
	  Else
	     javaws142Installed = 1
	  End If 
	  If Not(IsObject(CreateObject("JavaWebStart.isInstalled.1.5.0.0"))) Then
	     javaws150Installed = 0
	  Else
	     javaws150Installed = 1
	  End If  
	End If
</SCRIPT>
 
<script language="javascript" type="text/javascript">
<!--
 	if (javawsInstalled ) { 
 	 	document.writeln("<form action=\"uploader/launch.jnlp\"><input type=\"submit\" value=\"Launch Uploader\" align=\"right\"></form><br>");
 	 	document.writeln("<a href='uploader/launch.jnlp'>Launch app</a>");
	} else { 
	 	document.writeln("Please install web start support in order to use the file uploader.<br>");
	 	document.writeln("<a href='http://java.sun.com/products/javawebstart/needdownload.html' target='_new'>Install Java Web Start support</a>.<br>");
	} 
// -->
</SCRIPT>

Open in new window

LVL 5
allmerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ajay-SinghCommented:
> If I copy and paste the code to where I really need it,
the jnlp file does't get interpreted any more. It is simply displayed as
XML.

 
How are you doing it? It sounds to me that you are copying .jnlp file
locally where .jnlp file extension is not registered to use java web start.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
allmerAuthor Commented:
I am just copying the above code.
The jnlp file is always written on the fly (codebase needs full path).

The problem seems to be that my local apache installation does not support web start.
I could of course easily add that support.
This is however not possible for anyone using my package.
Therefore please let me rephrase my question.

How can I test whether the server is able to handle java web start or not programmaticaly.
Using either PHP, Java, or Javascript?

Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.