Link to home
Start Free TrialLog in
Avatar of rpong
rpong

asked on

EASY POINTS, I know you're not working! JSP parameter passing using Post form



--------------test.jsp-----------------------
<html>
  <form action="getValues.jsp" method="post">
                 <input disabled type="text" name="test" value="myTest" >
   </form>
</html>
---------------------------------------------


-------------getValues.jsp------------------
<html>

   <h1> <% request.getParameter("test"); %> </h1>

</html>
--------------------------------------------------

is that suppose to display "myTest" on the getValues.jsp page?
Avatar of Mick Barry
Mick Barry
Flag of Australia image

>       <input disabled type="text" name="test" value="myTest" >

try getting rid of disabled

does myTest show up in the text field in test.jsp
Avatar of rpong
rpong

ASKER

yes it does, it displays it as a disabled text field. Meaning, I will be unable to edit the field which is extremely necessary.
I will try your suggestion
Avatar of rpong

ASKER

oh yea, I forgot the submit button in the Test.jsp
 <input type="Submit" value="Submit">
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rpong

ASKER

No beans,  it didn't work with removing the disabled
Avatar of rpong

ASKER

hey that worked, removing the ";"!

really quick, why do I do remove the ";" in <%= request.getParameter("test") %>  but keep it with

<%
 request.getParameter("test") ;
%>

per radarsh
https://www.experts-exchange.com/questions/21738235/Form-parameter-passing-to-a-JSP-online-tutorials.html

kidding. thanks objects.
<% is for scriptlet, <%= is for evaluating expression and it doesn't require ;
Avatar of rpong

ASKER

thanks objects.
Avatar of rpong

ASKER

oh yea. btw,  your suggestion to remove the disabled did work too.

with the text field disabled it contains a Null value. that's very unfortunate.....