bontabontaのプロフィール

@bontabonta bontabonta
ありがとう数44
質問数7
回答数12
ベストアンサー数
4
ベストアンサー率
66%
お礼率
61%

  • 登録日2007/08/31
  • サーブレットからJSPへの変数受け渡し

    はじめまして 下記の件で大変困っております。どなたか対処方法など知っておりましたらご教授お願いいたします。 現在、サーブレットからJSPへ変数を受け渡す際にJSPのテキストフィールド(value値)に変数を受け渡すことができない状況です。 下記のソースでコーディングしておりますが、「<=request.getAttribute("number")%>がvalue上で変数として認識いないようです。 [現在組んでいるソース」 <td><INPUT type="text" size="6" maxlength ="6" name="number" value ="<%=request.getAttribute("number")%>" ></td> 下記の件を試しましたが、うまくいきませんでした。 1."の前に\を記載→value =\"<%=request.getAttribute("number")%>\" 2.テキストフィールド外で表示した場合、正常に値を表示できる。

  • JSPのエラー画面(error.jsp)に遷移(移動)しない

    フォームを設定したlogin.htmlから情報を受け取るlogin.jspで検証をして、間違ったid番号を入力した場合はerror.jspに移動させたいのですが、遷移せず、「HTTP 500 - 内部サーバー エラー」となります。 改善のご教示お願い致します。 [login.html] <html><head><title>login.html</title></head> <body><h1>ログイン</h1><hr><br> <form method="post" action="/webapp/JSPtest/login.jsp"> <table> <tr> <td>ID:</td> <td><input type="text" name="id"></td> </tr> </table> <br><br> <input type="submit" value="送信"> <input type="reset" value="キャンセル"> </form> </body> </html> [login.jsp] <%@ page contentType="text/html;charset=Shift_JIS" pageEncoding="Shift_JIS" %> <%@ page errorPage="error.jsp" %> <html><head><title>login.jsp</title></head> <body> <% String id = "2007"; String data = request.getParameter("id"); StringBuffer temp = new StringBuffer(); if(!id.equals(data)) temp.append("数値間違い<BR>"); if(temp.length() != 0){ throw new Exception(temp.toString()); } %> <h1>こんにちは<%= data %>様</h1> <h1><%= temp.length() %> </h1> </body></html> [error.jsp] <%@page contentType="text/html;charset=Shift_JIS" pageEncoding="Shift_JIS" %> <%@ page isErrorPage="true" %> <html><head><title>error.jsp</title></head> <body> エラーメッセージ<br> <%= exception.getMessage() %> </body></html>

  • JSPのエラー画面(error.jsp)に遷移(移動)しない

    フォームを設定したlogin.htmlから情報を受け取るlogin.jspで検証をして、間違ったid番号を入力した場合はerror.jspに移動させたいのですが、遷移せず、「HTTP 500 - 内部サーバー エラー」となります。 改善のご教示お願い致します。 [login.html] <html><head><title>login.html</title></head> <body><h1>ログイン</h1><hr><br> <form method="post" action="/webapp/JSPtest/login.jsp"> <table> <tr> <td>ID:</td> <td><input type="text" name="id"></td> </tr> </table> <br><br> <input type="submit" value="送信"> <input type="reset" value="キャンセル"> </form> </body> </html> [login.jsp] <%@ page contentType="text/html;charset=Shift_JIS" pageEncoding="Shift_JIS" %> <%@ page errorPage="error.jsp" %> <html><head><title>login.jsp</title></head> <body> <% String id = "2007"; String data = request.getParameter("id"); StringBuffer temp = new StringBuffer(); if(!id.equals(data)) temp.append("数値間違い<BR>"); if(temp.length() != 0){ throw new Exception(temp.toString()); } %> <h1>こんにちは<%= data %>様</h1> <h1><%= temp.length() %> </h1> </body></html> [error.jsp] <%@page contentType="text/html;charset=Shift_JIS" pageEncoding="Shift_JIS" %> <%@ page isErrorPage="true" %> <html><head><title>error.jsp</title></head> <body> エラーメッセージ<br> <%= exception.getMessage() %> </body></html>

  • SWINGでアプレット使えますか?

    GUIの作成において、SWINGはAWTよりも「OSに依存しない」「動作が軽い」など多くのメリットがあることを知り、SWINGにとても興味があります。 そこで質問ですが、アプレットの作成において、私が読んだ解説サイトの全てが「java.awt.*」をインポートしていました。 もしかして、SWINGではアプレット開発ってできないのでしょうか? 最近JAVAをはじめたので、質問に少々おかしな点があるかもしれませんが、どうか目にみてやって下さいm(_ _)m

  • 数値 バイナリ 保存

    お世話になります。先日からUNICODE と バイナリ形式の保存にはまっています。 10進数 30を16進にすると1E ですが、手元に 1E 00 00 00 とバイナリエディタで 読めるファイルがあります。 このようなファイルを VB で作成するにはどうすれば良いでしょうか。 よろしくお願いいたします。      

    • ベストアンサー
    • ShiroNeko
    • Java
    • 回答数1