I've created a Spring Roo project. Everything looks fine. Now I want to add a form with a text input and a button to my index.jspx
. This form will change a static field currentUser
in my ToDo
class. So I'm adding:
<form>
<%@ page import="static com.mypack.domain.ToDo.*" %>
<label for="_username_id">My name is:</label>
<% currentUser = request.getParameter("username"); %>
<input type="text" id="username" name="username" maxlength="30" path="username" size="0" value="<%= currentUser %>"/>
<input type="submit"/>
</form>
somewhere in the middle of it. And now it won't work:
This page contains the following errors:
error on line 6 at column 20: StartTag: invalid element name
Below is a rendering of the page up to the first error.
function readCookie(name) { var nameEQ = name + '='; var ca = document.cookie.split(';'); for(var i=0;i
If I comment the lines above, it works just fine. What is wrong? Is there a way to write a value to a static field of a class from a jsp page? How do I work around this?