f



JSP problem: <script language="JavaScript"> '<%=expression%>' </script>

Is it possible to use the JSP expression tags <%= %> within <script> 
</script> tags?

I'm trying to embed a JavaScript wysiwyg text editor into a JSP, I need it 
to be populated with form data - hence the expresion within the script tags.

Your assistance is appreciated!

Edward 


0
egoduk2 (7)
4/3/2006 6:12:19 PM
comp.lang.java.programmer 52714 articles. 1 followers. Post Follow

1 Replies
1056 Views

Similar Articles

[PageSpeed] 18

Edward wrote:
> Is it possible to use the JSP expression tags <%= %> within <script> 
> </script> tags?

I believe you can. Think of the sequence -
On the server side, the JSP engine kicks in and processes all the JSP 
tags and ignores all the html tags including the <script> tag. It will 
however process the JSP tags wherever they are.
What then gets sent to the client is the data stream contaning the html 
tags and javascript.
The client browser picks up the data stream and executes the javascript 
and renders the web page.

-- 
Alimony is a system by which, when two people make a mistake, one of
them keeps paying for it.
		-- Peggy Joyce
0
ge0rge1 (120)
4/3/2006 6:15:12 PM
Reply: