Link to home
Start Free TrialLog in
Avatar of iasrd
iasrdFlag for Türkiye

asked on

Dynamic JNLP creation through servlet

We can create dynamic image files using servlets. (The file does not exists and we create it through strams). There are many examples of that for charts, diagrams.

I want to have dynamically created JNLP file, which is not generated physically on the server side.
When the user visits the link, the JNLP will be dynamically generated and will be run automatically without prompting the user with SaveAs. Is that possible?
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Why JNLP? That's for specifying Java Web Start applications
Avatar of iasrd

ASKER

I know.
My JNLP's will have dynamic content each time and they should be volatile. (They wont be stored statically on the server.) The user will open some web page, will do some actions and each time a new jnlp will be generated for this user with some dynamic parameters. Each generated jnlp will be different.
For example it will store browser session ids, random generated key values etc. They will only be able for short periods. They paramerets will be used only once and they will be thrown away after the usage. The user will use this jnlp and this jnlp will not be used any more.
I do not want to generate a file each time and i want that the generated jnlps will not be used anymore.
The user will be unaware of the content of that. (security reasons).
The jnlp will always end up on the client, so the content will be available
Actually, i'm not sure about that. Better check it
Assuming you can give yourself the all clear on that last point, you can build an xml dom and serialize it to the server output stream
The most efficient and reusable way would be to xslt transform an xml template with your customised parameters
you do it the same way you generate images, create your jnlp in memory and stream it with appropriate content type.
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial