Topic: 我的例子为什么没有将参数传送并显示?请教谢谢

  Print this page

1.我的例子为什么没有将参数传送并显示?请教谢谢 Copy to clipboard
Posted by: zilin
Posted on: 2003-03-20 16:51

example1.html 文件如下:
<title>表单应用例子</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF">
<form method="post" action="example1.jsp">
<p>姓名:
<input type="text" name="name">
</p>
<p> Email:
<input type="text" name="email">
</p>
<p>意见:
<textarea name="yj"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="发送">
</p>
</form>
</body>
</html>
example1.jsp
<html>
<head>
<title>表单应用例子</title>
</head>
<body>姓名:
<%out.println(request.getParameter("name"));%>
Email:
<%out.println(request.getParameter("email"));%>
意见:
<%out.println(request.getParameter("yj"));%>
</body>
</html>
把example1.html和example1.jsp放到resin的doc目录下,在浏览器的地址样输入:http://localhost:8080/example1.html 。在表单中输入内容,然后按发送按纽,即可见表单中的内容输出到了浏览器上。

2.Re:我的例子为什么没有将参数传送并显示?请教谢谢 [Re: zilin] Copy to clipboard
Posted by: why
Posted on: 2003-03-21 00:57

your code looks okay to me.
I haven't used Resin, but I guess there must be something wrong with your setup, e.g. is /doc the default directory for webapps?

> 为什么没有将参数传送并显示
what does the screen show?
are there any error messages (on the browser or on the Resin "console")?


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923