Hi there,
Can anyone tell me if it is possible to get data submitted via a form and
retrieve it on the back end with JSP, without the use of a bean?
Of course.
Make an html page with a form. Have the form's action go to the JSP.
Method is not important for the retrieval of the form value. In the JSP,
just use request.getParameter("paramName").
I have an entire JSP app that doesn't use any beans.
Here's excerpts from my login pages.
from login.jsp
-------------------
<form name="loginFrm" id="loginFrm"
action="checkLogin.jsp" method="get">
<table width="70%">
<tr>
<td>User Name:</td>
<td>
<input type="text"
name="userName" id="userName">
</td>
<td> </td>
</tr>
<tr>
<td>Password:</td>
<td>
<input type="password"
name="psswd" id="psswd">
</td>
<td> <a
href="userMailPsswd.jsp"> <span class="example">(Forgot
your password? Click here.)
</span></a></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<input type="submit"
value="Submit" id="submit" name="submit">
</td>
<td> </td>
</tr>
</table>
</form>
----------
from checkLogin.jsp
<%
// validate user name and password
String uname =
request.getParameter("userName");
String psswd =
request.getParameter("psswd");
if (uname == null) throw new
IllegalArgumentException("User Name can't be null.");
if (psswd == null) throw new
IllegalArgumentException("Password can't be null.");
if (! userPerms.checkLogin(uname, psswd))
throw new IllegalAccessException("The user name or
password you entered was incorrect. Please try again.");
--