3 Replies Latest reply on Nov 20, 2006 9:29 AM by bdaw

    Jboss portal 2.6 and jnlp

    cristidb

      Hello,
      I want to launch an application using Java Web Start from a portlet. I?ve created a dynamic jnlp file (.jsp with contentType="application/x-java-jnlp-file"), and mapped the mime type in portlet.xml.
      When I access the jsp file, and from the jnlp are displayed in the portlet window instead of launching the application.

      My question is: How can I launch Java Web Start from a portlet?

        • 1. Re: Jboss portal 2.6 and jnlp
          bdaw

          You need create a direct link to a file not a portlet URL .
          For static file use request.getContextPath()
          For dynamic file create an URL to a servlet in the same web application and pass data to it using PortletSession.APPLICATION_SCOPE.

          • 2. Re: Jboss portal 2.6 and jnlp
            cristidb

            I tried setting:
            rResponse.setContentType("application/x-java-jnlp-file");
            in the doView method, and I get Content type not accepted.

            • 3. Re: Jboss portal 2.6 and jnlp
              bdaw

              No. You simply can't do this like that. This is the same problem as "I want to download a file that I store in database from inside a portlet and .setContentType() doesn't work...".
              Portal agregates content from all portlets on the portal page, so you always generate only page fragment in a portlet. If you have the static file in your web archive then use DIRECT URL to it. If it's dynamic content you MUST use an URL to servlet that will do the job for you.