how to get a values from a multipart/form-data
Dear sir ,
I used your code for getting a values,i used the fllowing
<%@ page language="java" %>
<html>
<body>
<SCRIPT type="text/javascript">
function submitForm(f){
var form = document.createElement("form");
with(form) {
method = "post";
action = "newEntryDetails2.jsp";
name = "form";
id = "form";
style.display = "none";
}
for(var ix = 0; ix<f.length;ix++)
addForm(document.getElementById(f[ix]), form);
document.body.appendChild(form);
form.submit();
}
function addForm(frmCollectFrom, frmCollector) {
var frm = frmCollectFrom.elements;
for(var ix = 0 ; ix < frm.length ; ix++)
frmCollector.appendChild(frm[ix]);
return frmCollector;
}
</SCRIPT>
<form METHOD="POST" ACTION="newEntryDetails2.jsp" NAME="form1" id="form1">
<table>
<tr>
<td><b>Subject:</b></td>
<td><input type="text" name="subject"></td>
</tr>
<tr>
<td><b>From:</b></td>
<td><input type="text" name="from"></td>
</tr>
<tr>
<td><b>Matter :</b><br></td>
<td><textarea rows="5" cols="50" name="matter" style="font-size:10pt" ></textarea></td>
</tr>
<tr>
<td><b>Status:</b></td>
<td><input type="text" name="status" value="Created" readonly="readonly"></td>
</tr>
</form>
<FORM ACTION="newEntryDetails2.jsp" METHOD="POST" enctype="multipart/form-data" id="form2" name="form2">
<tr>
<td>Attach</td>
<td><input type="file" size="48" name="matterfile" accept="text/html"></input></td>
</tr>
</table>
</FORM>
<INPUT TYPE="button" value="Submit" onclick="submitForm(Array('form1','form2'));">
</body>
</HTML>
If i submit the form then i am getting only subject ,matter,file field values but not status and from field i am getting null values and also the file is not uploading the content type in other jsp it is showing .application/x-www-form-urlencoded ....So please helpme sir...
Thanks....in advance...
View Answers
Related Tutorials/Questions & Answers:
Advertisements
multipart/form-data - JSP-Servletmultipart/
form-data When we are uploading a file we are using the encoded type of
form of type
multipart/
form-
data. When we are using this encryption type what are will be the contents in the encoded output. Explain me
how to get a values from processRecord - JSP-Servlethow to
get a
values from processRecord dear sir,
i have a problem in getting a
values from java to jsp.Here jsp is used to read a excel sheet that intern call a java program so i want a column
values i.e a column contains
How to get a values - JSP-ServletHow to
get a values Dear sir,
I have a one
form with a
multipart/
form-
data as follows
To
From
Subject... getting a null value aprt
from a attachmented file,so
how to
get a other
values Problem in enctype="multipart/form-data" in JSPProblem in enctype="
multipart/
form-
data" in JSP im using a page... the file itself when i click the submit button. im using enctype="
multipart/
form-
data... is post method, and enctype="
multipart/
form-
data"
here the code,
boolean
get values from Excel to databaseget values from Excel to database hi i want to insert
values from Excel file into database.Whatever field and contents are there in excel file... express 2005.
how can i do with java code
Get values from session to arrayGet values from session to array Hello
I have stored my 2 dimensional array into session using C#.net. Now on aspx page i want to store same session variable into 2 dimensional array. And
how to find count of session valaiable
Get values from session to arrayGet values from session to array Hello
I have stored my 2 dimensional array into session using C#.net. Now on aspx page i want to store same session variable into 2 dimensional array. And
how to find count of session valaiable
How to get Keys and Values from HashMap in Java?How to
get Keys and
Values from HashMap in Java? Example program of
iterating... to iterate the keys and
get the
values and print on the console.
How to
get keys... to iterate through keys and
get the
values. So, let's see
how to
iterate
Get values from JSP pages - JSP-ServletGet values from JSP pages I have welcome.jsp in which it has...
I need to
get the value of those column names(First Name, Second... or input fields.
Hi Friend,
Do you want to pass the column
values How to get a values - JSP-ServletHow to
get a values Dear sir,
I have one input text field and one submit button .Within one file
how to
get a
values within a same jsp.
Thanks and Regards
Harini Veerapur. Hi Friend,
Try the following
How to pass multiple values from a servlet to JSP?How to pass multiple
values from a servlet to JSP? hi, I want to pass multiple
values form a servlet to JSP.
Hw do i do that?
I am able to send one value at a time without any prb, but I am unable to carry multiple (
from two
how to fetch values from .properties to a html filehow to fetch
values from .properties to a html file I have a .properties file with some key value pairs in it. I need to fetch the
values from this .properties file into a html file.Please let me know
how to do
How to carry multiple values from a Servlet to a JSP?How to carry multiple
values from a Servlet to a JSP? By using...).
----response.sendRedirect("index.jsp?uname="+username);----
But I want multiple
values needs to be carried
from my servlet to a JSP.
How do I do
How to values from xml using java?How to
values from xml using java? Hi All,
I want to read value
from following < Line> xml using java.. In < Line>,
data is in format of key and value pair.. i want to read only
values..could u plz help me
How to create file from input values in Jframe ?How to create file
from input
values in Jframe ? hi i m doing my project using java desktop application in netbeans.i designed a
form to
get... text1;
void
form()
{
frame=new JFrame("details you have entered are");
JPanel
How to Display values from databse into tableHow to Display
values from databse into table I want to display
values from database into table based on condition in query,
how to display... enter either bookname or authorname and click on search button the
values from not able to get values from jsp file - JSP-Servletnot able to
get values from jsp file hi thanks for u feedback,
her am sending the file jsp and servlet but in the servlet file am not able to
get... remove encrtype
from form tag its work fine
please go through the file
how to display values from database into table using jsphow to display
values from database into table using jsp I want to display
values from database into table based on condition in query,
how... the
values from database based on the bookname or authorname entered must be display
How to retrieve array values from html form to jsp?How to retrieve array
values from html
form to jsp? Hi! I am...,
To
get an array
values from the html
form you can use the getParameterValues... it into jsp. Means i just want to retrieve
values from html
form containing array
how to pass values from 2nd page tp 3rd page....;
Login1.jsp :
In dis , to
get the
values from Login.jsp,i ve used:
<
form...
how to
get the
values(of userid)
from Login1.jsp....
plz help me...
how to pass
values from 2nd page tp 3rd page.... Hi,
How to pass
How to update,Delete database values from jtable cells ..How to update,Delete database
values from jtable cells .. Hello Sir, I am working on a project in which i have to fetch the
values from database... records
from the table cells by entering new
values there only ...
Sir,plz send me