views:

71

answers:

2

When we write in a Javascript expression :

expression < <%=variableJsp%>

the double "<" seems to be a problem and the JSP is not interpreted ?

Is it a fault of the other servers that should not accept this type of expression ? Or WebSphere that bugs ?

A: 

I find it generally a bad idea to inline javascript on jsp pages.Your problem is only one of the reasons to make javascript functions external.

Although I do not know websphere, this has happened to me on other containers.

If you insist on keeping it inline, you can probably use

expression &lt; <%=variableJsp%>
krosenvold
+1  A: 

Your small code-sample looks like something we do without problems.

Try creating a JSP that illustrates the problem, and nothing else. Either create a new from scratch, or remove everything not relevant to the problem.

Chances are, you will find that the error is not in your code-sample. But if you can make a small JSP-file (a few lines) that illustrates the problem, please show it to us.

myplacedk