Use GAE servlet to serve dynamic JNLP and jar for JavaWS

我与影子孤独终老i 提交于 2019-12-06 14:49:54

On GAE, consider putting the files in the blobstore and using the blobstore service to serve them up.

The Blobstore can serve any binary file

https://developers.google.com/appengine/docs/java/blobstore/overview

I got a temporary solution but yet another problem. This jar is stored in datastore, so I need http://www.myserver.com/?file=start.jar to access it. Once I use http://www.myserver.com/start.jar it then works. I just need my servlet to parse the Path instead of getParameter which is still easy.

Problem is with pack.gz and version-id. If you link is http://www.myserver.com/start.jar?folder=root&user=guest then javaws would generate http://www.myserver.com/start.jar.pack.gz?version-id=1.0?folder=root&user=guest for which your getParameter("version-id") is 1.0?folder=root so you possibly think you could use &folder=root&user=guest

But your link could also become http://www.myserver.com/start__V1.0.jar.pack.gz?folder=root&user=guest (which is good). I don't think you can guarantee which one javaws uses so you can't prepare to use ?folder=root or use &folder=root.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!