Nicholas

That did the trick, thank you very much. I owe you a beer (or your drink of
choice) :)

Regards

Erci

-----Original Message-----
From: Nicholas Sushkin [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 12, 2007 4:42 PM
To: Eric J Kaplan
Cc: users@tomcat.apache.org
Subject: Re: frustrated trying to pass parameters into jsp to create jnlp

On Wednesday 12 September 2007 16:03, Eric J Kaplan wrote: 

> Hi
>
> I am using Java Web Start with Tomcat 6 and have been banging my head
> against a wall all day. I don't think the issue is necessarily a Web
> Start issue but rather an issue with jsp and processing of parameters.

The following style worked for me for quite a while.

<jsp:root 
 xmlns:jsp="http://java.sun.com/JSP/Page";
 xmlns:req="http://jakarta.apache.org/taglibs/request-1.0";
 xmlns:c="http://java.sun.com/jstl/core"; version="1.2">
  <jsp:directive.page
     contentType="application/x-java-jnlp-file"/>
  <jsp:scriptlet>
        String requestPath = request.getRequestURL().toString();
        requestPath = 
           (requestPath == null) 
           ? "" 
           : requestPath.substring(0, requestPath.lastIndexOf('/'));
        response.setHeader("Cache-Control", "public");
  </jsp:scriptlet>
  <jsp:element name="jnlp">
    <jsp:attribute name="spec">1.0+</jsp:attribute>
    <jsp:attribute name="codebase">
      <jsp:expression>requestPath</jsp:expression>
    </jsp:attribute>
    ...
    <application-desc
        main-class="com.armanta.comm.LocalSocketWriter">
      <argument><c:out value="${param.arg1}"/></argument>
    </application-desc>
</jsp:element>

-- 
Nicholas Sushkin, Senior Software Engineer
http://www.openfinance.com http://www.wealthinformationexchange.com


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to