if the top of your JSP reads
<%@ page contentType="application/x-java-jnlp-file"%>
<?xml version="1.0" encoding="UTF-8"?>
How do you add html to this page?
Equally, How would you get the web browser to create a popup for instructions?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why not write a regular servlet for it? JNLP files are not html and i dont even know how that would work with JSP.
And if you send a JNLP most web browsers will know what to do with it, you can also distribute this file through email(or other means) and start it directly on the users computer.
I used to have several WebStart apps a few years ago and i wrote a servlet that would just serve the JNLP file from the local file system. I later changed it to generate the JNLP file on the fly and include default libraries i used in all my projects. I also used that to serve the jars from the file system so they didnt need to be bundled with the servlet WAR.
I put some of my code here http://ideone.com/36sjB as a start. Most of it was used in an experimental in house app, so this should not be used in production code ;).
Sending the JNLP is just like sending the jar with a different content type. I also have code about generating the JNLP from scratch through the servlet if you are interested.