Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa JSP-Servlet 10006-how-to-get-a-values-from-a-multipart how to get a values from a multipart/form-data
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


harini
how to get a values from a multipart/form-data
0 Answer(s)      4 years and 3 months ago
Posted in : JSP-Servlet


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...

Advertisement
View Answers

Related Tutorials/Questions & Answers:
how to get a values from a multipart/form-data - JSP-Servlet
how to get a values from a multipart/form-data  Dear sir , I used your code for getting a values,i used the fllowing function... ,matter,file field values but not status and from field i am getting null
How to use enctype="multipart/form-data" in DOJO - JSP-Servlet
How to use enctype="multipart/form-data" in DOJO  Hi All, I am... form method = "post" & enctype="multipart/form-data". In same page I am using... for enctype="multipart/form-data". Then I delete that tag & then try to upload
Advertisements
How to upload image to server in j2me by multipart/form-data?
How to upload image to server in j2me by multipart/form-data?  Hi, I...: Processing of ``multipart/form- data request failed. Stream ended unexpectedly...(imgData); conn.setRequestProperty("Content-Type", "multipart/form-data
multipart/form-data - JSP-Servlet
multipart/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
Problem in enctype="multipart/form-data" in JSP
Problem 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
how to get a values from processRecord - JSP-Servlet
how 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 the values to dropdownlist from oracle database
how to get the values to dropdownlist from oracle database   </script> </head> <body> <select name... * from countryname"); while(rs.next()){ %> <option value="<
How to get a values - JSP-Servlet
How 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
how to get the values from dynamically generated textbox in java?
how to get the values from dynamically generated textbox in java?  I have retrieved data from two table both table contains two column and I display textbox corresponding to the data. I want to get data from textboxes(generated
How to get the values from the Combo Box - JSP-Servlet
How to get the values from the Combo Box   Sir, Actually i am getting the values in the combo box from table.I want what ever... in their respective text box. e.g suppose i select ram values from the combo box and its
get values from Excel to database
get 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 array
Get 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 array
Get 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 values for same column name from two different tables in SQL
how to get values for same column name from two different tables in SQL  how to get values for same column name from two different tables in SQL???? column name is emp_id loacated in these two tables company,employee
How to get a values - JSP-Servlet
How 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 get a column values from a excel file after attaching it - JSP-Servlet
how to get a column values from a excel file after attaching it  hi sir, How to get a column values from a excel file after attaching it while... and get a values from that store that value in To input box.Please help me sir
How to get the request scope values? - Struts
How to get the request scope values?  Get value in Struts
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-Servlet
Get 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 multiple hyperlink values from a table column to another jsp file?
how to get multiple hyperlink values from a table column to another jsp file... file named "dbtable" will get the parameter from "index" and search... show the specific details from that hyperlink which was clicked. there are 3
How to get the correct value by calculating double values....
How to get the correct value by calculating double values....  Hello... datavalues calculated from the function ...here is my code for this task.... try... and values like 59,142 etc here i am getting wrong output for the same
How to get the correct value by calculating double values....
How to get the correct value by calculating double values....  Hello... datavalues calculated from the function ...here is my code for this task.... try... is integer type and values like 59,142 etc here i am getting wrong output for the same
solution to get values for xml namespace tags from sqldatabase in java
solution to get values for xml namespace tags from sqldatabase in java ...=" "/> now i need to get values from sql database for values in the blank field(" "). how do i get these values.. already connected database and created xml
Want solution to get values for xml namespace tags from database in java
Want solution to get values for xml namespace tags from database in java ...:loc=" "/> now i need to get values from sql database for values in the blank field(" "). how do i get these values.. already connected database and created
how to read values from java in xml?
how to read values from java in xml?  how to read values from java in xml
how to insert values from jsp into ms access
how to insert values from jsp into ms access   how to insert values using jsp into ms access database
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 file
how 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
not able to get values from jsp file - JSP-Servlet
not 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 can I get query string values in JavaScript?
How can I get query string values in JavaScript?  How can I get query string values in JavaScript?   To get a query string value, you can use JQuery and JavaScript.. here is the code: function getParameterByName(name
 

 

 

DMCA.com