IntelliJ Java IDE
The moose likes JNLP and Web Start and the fly likes Only get plain text file with Tomcat 3.3 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Reply Bookmark "Only get plain text file with Tomcat 3.3" Watch "Only get plain text file with Tomcat 3.3" New topic
Author

Only get plain text file with Tomcat 3.3

Huang Iris
Greenhorn

Joined: Jan 21, 2003
Posts: 2
I am try to deploy an application at Tomcat 3.3 with webstart.
I first installed tomcat. Then put the following files at
~/jakarta-tomcat/webapps/cduview
cduView.jar WEB-INF/
index.html NMSClient.jnlp
The contents in NMSClient.jnlp is
<?xml version="1.0" encoding="UTF-8"?>
<!-- file Hello.jnlp -->
<jnlp codebase="http://172.17.72.251:30000/cduview"
href="http://172.17.72.251:30000/cduview/NMSClient.jnlp">
<information>
</information>
<resources>
<j2se version="1.2+"/>
<jar href="cduView.jar"/>
</resources>
<application-desc main-class="com.comsat.nms
.cduview.NMSClient"/>
</jnlp>
Under WEB-INF directory, I have only one file web.xml there, The contents is
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE mime-mapping
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<mime-mapping>
<extension>
jnlp
</extension>
<mime-type>
application/x-java-jnlp-file
</mime-type>
</mime-mapping>
The contents of index.htm is
<HTML>
<BODY>
<a href="http://172.17.72.251:30000/cduview/NMSClient.jnlp">Launch </a>
<!-- Alternate HTML for browsers which cannot instantiate the object -->
<br>
<A HREF="http://java.sun.com/cgi-bin/javawebstart-platform.sh?">
Download Java Web Start</A>
</BODY>
</HTML>
When I load the index page and click the link, the browser just gives me the contents of that jnlp file.
Could you please tell me what I am doing wrong here?
Thanks a lot,
Iris
Chantal Ackermann
Ranch Hand

Joined: Sep 28, 2000
Posts: 508
hi,
I am using tomcat 4.1.17 - so my first question in reply is: if you have downloaded tomcat for testing jws, why aren't you using the latest stable version instead of using an old release.
In tomcat 4 there is the main web.xml in the directory conf. the jnlp mime type is defined there (default). So this part of jws worked for me without problems. I don't know if it can work to specify a mime type for only one webapp.
cheers
Chantal
 
 
subject: Only get plain text file with Tomcat 3.3
 
Threads others viewed
Configuring Tomcat 5 on Win2K and Linux
Apache2 / Tomcat 6 / GWT 2.0 - Could use some help
Mistakenly changed web.xml
Java to Display Data from Database
web.xml causes 404 error
developer file tools

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture