Tuesday, July 12, 2005

Cross platform Jsp issues

I find this hard to believe, yet it seems to be true

Take a simple html tag with a jsp tag

<input name="text" value="<%=new String("Hello")%>"/%>

That works fine on tomcat. No problems...

On weblogic however, no go...

The problem is the nested quotes """

To get it to work, obviously a few solutions

<input name="text" value="<%=new String(\"Hello\")%>"/%>


<input name="text" value='<%=new String("Hello")%>'/%>

Both easy solutions once you know the problem. Of course it took me a while to find out that this problem. In my defence, I wasn't doing something so simple as the above example. I was having problems with a tiles definition.

No comments: