Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

jsp request.getParameter is returning null in javascript

843836Mar 14 2005 — edited Dec 27 2007
I have a javascript which calls a java method in jsp page. The problem is when i try to pass the input parameters to the java method, i am getting null values.
Here is the code.
<form>
First Name: <input type=text name="first" value="MYTEST"><br>
<input type="button" name="Find" value="Find" onClick="javascript:findValues();">
</form>

function findValues(){
document.form.submit();
<% String search = request.getParameter("first");%>
alert(<%=search%>);
<%!String result[]=retrieveData(search);%>
}

my problem is search string value is giving null. Can anyone please help?

Thanks in advance!!!

-JF
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2008
Added on Mar 14 2005
14 comments
971 views