如何使用jsp关键字从html页面检索数据?

时间:2017-08-04 15:54:49

标签: html jsp getparameter

for (int i = 1; i <= 3; i++)
{
    ques1 = (String)request.getParameter("ques%><%=i%><%");
    out.println(ques1);
}

我只想从HTML页面获取ques1,ques2,ques3等参数。但是它给出了未终止的字符串文字。

我的HTML输入:

Enter Question  No. <%=i%> :: <input name="ques<%=i%>"  required> 

1 个答案:

答案 0 :(得分:0)

尝试更改为:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 515564
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 5120
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited