[Carbon-dev] strange issue using JSP's on carbon

Sumedha Rubasinghe sumedha at wso2.com
Thu Oct 23 08:37:19 PDT 2008


Hi keith,
Check following example on carbon revision 22506. I do not see the 
problem happening.

JSP contents
============
<%@ page import="java.util.*" %>
<h3>Demo</h3>
<%
String name = "sumedha";
%>
<form action="">
<input type="button" value="Hello world!" 
onclick="javascript:alert('<%=name%>');">
</form>

Generated HTML
==============
<h3>Demo</h3>

<form action="">
<input type="button" value="Hello world!" onclick="javascript:alert('sumedha');">
</form>


/sumedha


Keith Chapman wrote:
> Hi all,
>
> I'm having a strange issue using JSP's on carbon. I need to call a 
> JavaScript function passing in a String argument so I have something as 
> follows,
> onclick="codeGenFileUploadeHelper('<%=name%>')"
>
> But the generated html always is (when name=uri). Notice that its 
> missing the quotes around the argument.
>
> onclick="codeGenFileUploadeHelper(uri)"
>
> I tried a simple thing as follows
>
> onclick="codeGenFileUploadeHelper('x')"
>
> Even that produces the same result (no quotes). This works perfectly in 
> tomcat. Does anybody have a clue as to whats going on?
>
> Thanks,
> Keith.
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev at wso2.org
> http://mailman.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>   




More information about the Carbon-dev mailing list