0

このコードはjspファイルにあります

<%  
//Instantiate MetaMap and bring the output words
coding_sugest csug=new coding_sugest();
//Get the value from the textarea
if (request.getParameter("phy_exam")==null){
    response.sendRedirect("index.html");
}

String x_value=request.getParameter("phy_exam");
csug.setPhy_exam(x_value);
out.println("<h3>"+x_value+"</h3>");
//Call to bring the list of positive words
List<String> word_suggestions=(csug.positive_words());
Iterator<String> it = word_suggestions.iterator();
//Print the list values to a textarea
out.println("<textarea name='suggest_list' rows='10' id='word_suggest'>");
        while(it.hasNext()){
            out.println(it.next());
        }
out.println("</textarea>");
%>

このようにして、クラスを呼び出し、次にそのクラスのメソッドを呼び出して、いくつかのテキスト値を取得し、それらをに入力します<textarea>。ユーザーが<textarea>それを変更してから、それらの新しいテキスト値を使用して新しいリストを作成し、データベースの新しい値でクエリを実行できるようにします。誰か助けてくれませんか?

4

1 に答える 1

0

jspを使用してファイルにフォームを配置する必要があります<form>。また、フォームに送信ボタンを追加する必要があります。このフォームはに転送する必要がjava servletあり、その「サーブレット」でユーザー入力をデータベースに追加する必要があります。

ご不明な点がございましたら、お気軽にお問い合わせください。

于 2013-03-27T13:50:53.860 に答える