You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Anson Zeall <ze...@bigpond.net.au> on 2003/09/12 16:17:08 UTC
Embedding JSP code in a JS file
HI,
I want to know if anyone knows how to embed JSP code in JS files? 'cause
I want to use encodeURL inside the JS file....somehow.
Regards,
Anson
RE: Embedding JSP code in a JS file
Posted by Anson Zeall <ze...@bigpond.net.au>.
'cause problem right now is......I tried dumping the js file code...into
my jsp file......and put in the encodeURL.....and when I click on the
click via the browser....it says my redirect for the URL has exceeded.
Dunno what that means..
Anson
-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org]
Sent: Saturday, September 13, 2003 12:37 AM
To: Tomcat Users List
Subject: Re: Embedding JSP code in a JS file
Rename the js file to jsp then update your link to pull in the jsp file
accordingly. (You may have to do a mime-type set too)
-Tim
Anson Zeall wrote:
> HI,
>
> I want to know if anyone knows how to embed JSP code in JS files?
> 'cause I want to use encodeURL inside the JS file....somehow.
>
> Regards,
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Embedding JSP code in a JS file
Posted by Tim Funk <fu...@joedog.org>.
For example:
In the html:
=============
<head>
<link href="javascript/cowbell.jsp" rel="stylesheet" type="text/css" />
</head>
=============
In javascript/cowbell.jsp (possibly)
=============
<%@ page contentType="application/x-javascript"%>
=============
-Tim
Anson Zeall wrote:
> Thanks, but....what....and how to set the mime-type?....
>
> -----Original Message-----
> From: Tim Funk [mailto:funkman@joedog.org]
> Sent: Saturday, September 13, 2003 12:37 AM
> To: Tomcat Users List
> Subject: Re: Embedding JSP code in a JS file
>
>
> Rename the js file to jsp then update your link to pull in the jsp file
> accordingly. (You may have to do a mime-type set too)
>
> -Tim
>
> Anson Zeall wrote:
>
>
>>HI,
>>
>> I want to know if anyone knows how to embed JSP code in JS files?
>>'cause I want to use encodeURL inside the JS file....somehow.
>>
>>Regards,
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
RE: Embedding JSP code in a JS file
Posted by Anson Zeall <ze...@bigpond.net.au>.
Thanks, but....what....and how to set the mime-type?....
-----Original Message-----
From: Tim Funk [mailto:funkman@joedog.org]
Sent: Saturday, September 13, 2003 12:37 AM
To: Tomcat Users List
Subject: Re: Embedding JSP code in a JS file
Rename the js file to jsp then update your link to pull in the jsp file
accordingly. (You may have to do a mime-type set too)
-Tim
Anson Zeall wrote:
> HI,
>
> I want to know if anyone knows how to embed JSP code in JS files?
> 'cause I want to use encodeURL inside the JS file....somehow.
>
> Regards,
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Embedding JSP code in a JS file
Posted by Tim Funk <fu...@joedog.org>.
Rename the js file to jsp then update your link to pull in the jsp file
accordingly. (You may have to do a mime-type set too)
-Tim
Anson Zeall wrote:
> HI,
>
> I want to know if anyone knows how to embed JSP code in JS files? 'cause
> I want to use encodeURL inside the JS file....somehow.
>
> Regards,