将表单值从一个jsp传递到另一个 [英] passing form values from one jsp to another

查看:187
本文介绍了将表单值从一个jsp传递到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要访问在另一个jsp中输入的给定表单数据. 这就是我的代码的样子 fisrt jsp:

i need to access form data given entered in one jsp in another.. this is how my code looks fisrt jsp:

<form name="register" action="enterRegDetails.jsp" method="POST">
 <input type="text" name="firstname" id="firstname" value="" size=25/>
<input type="submit" value="SUBMIT" />

第二个jsp:

 <%=request.getParameter("firstame")%>

现在这将打印一个空值.

now this prints a null value..

这是什么错误? 如何获取第二个jsp中的值?

what is the mistake here? how do i get to access the values in my second jsp?

推荐答案

 name="firstname"

 <%=request.getParameter("firstame")%>

不仅仅是拼写错误,对吗? (缺少n)

It is not just the spelling mistake, is it? (Missing n)

这篇关于将表单值从一个jsp传递到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆