tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric J Kaplan" <eric.kap...@armanta.com>
Subject RE: frustrated trying to pass parameters into jsp to create jnlp
Date Wed, 12 Sep 2007 21:05:37 GMT
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:nsushkin@openfinance.com] 
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message