getParameter() does not work between jsps ?

C

Charlie

Hi
I have two jsp files and I want have the value inputted in the first
one to be passed to the second one, but somehow I always received
"null" value. Can someone tell me why ?

Here are the hightlights of my jsp files.

===========
Upload.jsp
===========
....
<FORM name="fileform" ACTION="/Test/jsp/UploadText.jsp"
ENCTYPE="multipart/form-data" METHOD=POST>
<b>Maximum Uploaded File:</b><INPUT type="text" name="MaxFile"
value="100" size=2><b>M</b><br><br>
<b>File Name:&nbsp</b><INPUT TYPE=FILE NAME="uploadfile"
SIZE=20><b
r><br>

<INPUT NAME="Upload" TYPE=SUBMIT VALUE="Upload" size=30>
</FORM>
....

==============
UploadText.jsp
==============
....
<%
String Max = request.getParameter("MaxFile");
out.println("The Maximum file size is " + Max);
%>
....
=================
 
C

Charlie

Jim said:
Removing the ENCTYPE="multipart/form-data" makes your code work for me
Hi Jim,
If I remove the "ENCTYPE="multipart/form-data", it also works for me.

But I have to leave it here. What happen is in my second jsp file, I
am using oreilly's MultipartRequest library to do the uploading. If
that item is not set, that uploading would not work.
That "MaxFile" is to decide the maximum size of file that can be
uploaded.

There must be a way to do it ?


thanks anyway for the help


cj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top