SpringRooプロジェクトを作成しました。すべてがうまく見えます。次に、テキスト入力とボタンを備えたフォームをに追加しますindex.jspx
。currentUser
このフォームは、ToDo
クラスの静的フィールドを変更します。だから私は追加しています:
<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>
その真ん中のどこか。そして今、それは機能しません:
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
上記の行にコメントすると、問題なく機能します。なにが問題ですか?jspページからクラスの静的フィールドに値を書き込む方法はありますか?これを回避するにはどうすればよいですか?