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



Home Answers Viewqa JSP-Servlet Mutliple files upload

Have Programming Question? Ask it here!
 
 
 


Santhosh Rajendran
Mutliple files upload
0 Answer(s)      2 years ago
Posted in : JSP-Servlet


<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page language="java"%>
<%@page import="java.sql.*"%>
<html>
    <head>
        <title>Post Available Bench</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="css/masterStyle.css" />
       <script type="text/javascript">
       function getOptions1(Countrytype) {
           var list;
           var list1;
           var listValue;
           var listValue1;
           if (Countrytype == "India") {
           list = new Array("Andrapradesh","Bihar","Gujarat","Karnataka","Kerala","Madhya Pradesh","Maharastra","Orissa","Tamilnadu");
           listValue = new Array("Andrapradesh","Bihar","Gujarat","Karnataka","Kerala","Madhya Pradesh","Maharastra","Orissa","Tamilnadu");
           list1 = new Array("Hyderabad","Patna","Ahmedabad","Benguluru","Kochi","Bhopal","Mumbai","Cuttack","Chennai");

           listValue1=new Array("Hyderabad","Patna","Ahmedabad","Benguluru","Kochi","Bhopal","Mumbai","Cuttack","Chennai");
           }

           for (var i = 0; i < document.benchForm.country.length; i++) { //Clear the 2nd menu
           document.benchForm.state.options[i] = null;
           document.benchForm.city.options[i] = null;
           }
           for (var i = 0; i < list.length; i++) { //Repopulate 2nd menu
           document.benchForm.state.options[i] = new Option(list[i],listValue[i],0,0);
           document.benchForm.city.options[i] = new Option(list1[i],listValue1[i],0,0);
           }
           }


      function addRow(){

               var tbody = document.getElementById("tbodyId"); 


              var current_row=document.createElement("TR");                
              var current_cell1=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="checkbox";
              input.id="active";
              input.name="active";            
              current_cell1.appendChild(input);
              current_row.appendChild(current_cell1);        

              var current_cell2=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="text";
              input.id="resourceName";
              input.name="resourceName";            
              current_cell2.appendChild(input);
              current_row.appendChild(current_cell2);        

              var current_cell3=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="text";
              input.id="expYears";
              input.name="expYears";            
              current_cell3.appendChild(input);
              current_row.appendChild(current_cell3);        


              var current_cell4=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="text";
              input.id="primaryskill";
              input.name="primaryskill";            
              current_cell4.appendChild(input);
              current_row.appendChild(current_cell4);

              var current_cell5=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="text";
              input.id="available";
              input.name="available";            
              current_cell5.appendChild(input);
              current_row.appendChild(current_cell5);

              var current_cell6=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="text";
              input.id="expires";
              input.name="expires";            
              current_cell6.appendChild(input);
              current_row.appendChild(current_cell6);

              var current_cell7=document.createElement("TD");
              var input=document.createElement("INPUT");
              input.type="hidden";
              input.id="companyName";
              input.name="companyName"; 
              input.value="<%= session.getAttribute( "theName" ) %>";
              current_cell7.appendChild(input);
              current_row.appendChild(current_cell7);


              tbody.appendChild(current_row);


      }

      function generatenew()
      {
      var d=document.getElementById("div");
      d.innerHTML+="<p><input type='text'  name='otherprimaryskill'>";
      }

      function generatenew1()
      {
      var d=document.getElementById("div1");
      d.innerHTML+="<p><input type='text' name='othersecondaryskill'>";
      }

      function getOptions(skilltype) {
            var list;
            var listValue;
            if (skilltype == "Java") {
                list = new Array("CoreJava","J2EE","J2SE","Struts","Hibernet","Springs","JSP","Servlet","JavaScript");
                listValue = new Array("CoreJava","J2EE","J2SE","Struts","Hibernet","Springs","JSP","Servlet","JavaScript");
            }
            if (skilltype == ".NET") {
                list = new Array("ASP.NET","C#","VB.NET");
                listValue = new Array("ASP.NET","C#","VB.NET");
            }
            if (skilltype == "Database") {
                list = new Array("MySql","SQL","oracle");
                listValue = new Array("MySql","SQL","oracle");
            }
            for (var i = 0; i < document.benchForm.primaryskill.length; i++) { //Clear the 2nd menu
                document.benchForm.Skills.options[i] = null;
            }
            for (var i = 0; i < list.length; i++) { //Repopulate 2nd menu
                document.benchForm.Skills.options[i] = new Option(list[i],listValue[i],0,0);
            }
        }


      function f2Submit() {
          document.benchForm1.action="PostController"

          document.benchForm1.submit();
          alert('Form Submitted');
          }




      function f1Submit() {
              document.benchForm.action="PostavailableController"
              document.benchForm.submit();
        }



              function submitAll() {


              f2Submit();
              f1Submit();



              }




  </script>
  </head>
  <% String message = (String) request.getAttribute("message");
  String error = (String) request.getAttribute("error");
    String theName = (String) session.getAttribute("theName");
  %>
   <% if (theName== null || theName.equals("")) {
                    request.setAttribute("error", "User Session Expired");
    %>
    <jsp:forward page="Register.jsp"/>
    <%
                }
    %>
   <body>


        <div id="headerWrapper">
            <div id="header">

                <p><center><font size="5"/> Post Available Bench</center></p>
            </div>
        </div>
        <form name="benchForm" id="benchForm" action="PostavailableController" method="POST"  >







                <table width="100%" align="center">
                <tr>
                        <td align="right"></td>
                        <td align="left"> <input type="hidden" name="companyName" value="<%= session.getAttribute( "theName" ) %>" size="20" value=""></td>
                    </tr>

                   <tr>
<td align="right">Country </td>

<td align="left">:
<select name="country" onchange="getOptions1(this.value)">
<option value="">Select Country</option>
<option value="India">India</option>
<option value="USA">USA</option>
<option value="UK">UK</option>
<option value="Singapore">Singapore</option>
<option value="Australia">Australia</option>

</select>
</td>
</tr>
                    <tr>
<td align="right">State</td>
<td align="left">:<select name="state" >
<option value="">Select State</option>
</select>
</tr>
<tr>
<td align="right">City</td>
<td align="left">:<select name="city" >
<option value="">Select City</option>
</select>
</tr>
                    <tr>
                        <td align="right">Industry</td>
                        <td align="left">:
                            <select name="industry">
                            <option value="IT Services">IT Services</option>
                                  <option value="IT Product">IT Product</option>
                                       <option value="ITES">ITES</option>
                                            <option value="Other">Other</option>

                            </select>
                        </td>
                    </tr>


<tr>
<td align="right">Primary Skill:</td>
 <td align="left"> <select name="primaryskill" onchange="getOptions(this.value)">
  <option value="">Select Skills</option>
    <option value="Java">Java</option>
    <option value=".NET">.NET</option>
    <option value="Database">Database</option>

  </select> </td>
  <tr>
   <td>

               <div id="div"  align="right" >
                        <input type="button" value="Other Skills"  onclick="generatenew()" class="BtnStyle"></div>
                            </td>

  </tr>


  <tr>
  <td align="right">
  Secondary Skill:</td>
  <td align="left"><select  name="Skills" >
  <option value="">Select Skills</option>
  </select>
</td>
 </tr>                   
 </center>
 <tr>
                        <td>

               <div id="div1" align="right" >
                        <input type="button" value="Other Skills"  onclick="generatenew1()" class="BtnStyle"></div>
                            </td>
                        </tr>
 <tr>
                        <td align="right">Name</td>
                        <td align="left">: <input type="text" name="name" size="20" value=""></td>
                    </tr>
                    <tr>
                        <td align="right">Title</td>
                        <td align="left">:
                            <select name="title">

                                <option value="Mr.">Mr.</option>
                                <option value="Mrs.">Mrs.</option>
                                <option value="Ms.">Ms.</option>

                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Role</td>
                        <td align="left">:
                            <select name="role">
                            <option value="Head of the Company">Head of the Company</option>
                        <option value="india">Head of the Company</option>
                        <option value="Head of HR">Head of HR</option>
                        <option value="Head of Talent Acquisition">Head of Talent Acquisition</option>
                        <option value="Head of Delivery">Head of Delivery</option>
                        <option value="Head of Technology Practice">Head of Technology Practice</option>
                        <option value="Head of Commercial">Head of Commercial</option>
                        <option value="Head of Operations">Head of Operations</option>


                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Email</td>
                        <td align="left">: <input type="text" name="mail" size="20" value=""></td>
                    </tr>
                    <tr>
                        <td align="right">Phone</td>
                        <td align="left">: <input type="text" name="phone" size="20" value=""></td>
                    </tr>
                    <!--  <tr>
                         <td align="right">Availability date</td>
                         <td align="left">: <input type="text" id="demo1" name="availabilityDate" size="20">
                         <a href="javascript:NewCal('demo1','DDMMYYYY',false,24)"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>

                         </td>
                     </tr>
                      <tr>
                         <td align="right">Availability expires on</td>
                         <td align="left">: <input type="text" id="demo2" name="availabilityExpires" size="20">
                         <a href="javascript:NewCal('demo2','DDMMYYYY',false,24)"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
                         </td>
                     </tr>-->
                    <tr>
                        <td align="right">Experience Years :</td>
                        <td align="left">

                            <select name="expYears">
                                 <%
                                        for (int i = 0; i < 10; i++) {

                            %>
                            <option value="<%=i%>"><%=i%></option>
                            <%
                                        }
                            %>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">No of Resource Available :</td>
                        <td align="left">
                             <select name="noOfResources">
                                 <%
                                        for (int i = 0; i < 10; i++) {

                            %>
                            <option value="<%=i%>"><%=i%></option>
                            <%
                                        }
                            %>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td align="right">Comments :</td>
                        <td align="left">  <textarea name="comments" rows="5" cols="20"></textarea></td>
                    </tr>

                </table>
                <br/>

   </form>

            <form name="benchForm1" id="benchForm1" action="PostController" method="POST"  >


          <body onload="addRow();"> 

        <center> <table border="2" style="border-color: black;border-style: solid name=Resource" >
                <tr bgcolor="yellow">
                    <th>Active</th>
                    <th>Resource Name</th>
                    <th>Experience</th>
                    <th>Skills</th>
                    <th>Available On</th>
                    <th>Expires On</th>
                </tr></center>


                <tbody id="tbodyId"></tbody>
<tr >
  <center> <td > 
   <input type="button" value="Add" onclick="addRow();" /> 
        </td>    </center>  
 </tr>




    </table>  

           </center> 


           </form>


<form name="frm" action="javascript:submitAll()" method="GET">

        <center> <input type="submit"  value="Submit" class="BtnStyle" > </center>


      </form>



       <center>
       <div id="footer">
            <hr />
            <div id="copyright">
                <p>&copy;&nbsp;2011, ShareMyResources. All Rights Reserved</p>
            </div>

            <div id="footerNav">
                <ul>
                    <li><a href="#">About</a></li>
                    <li><a href="#">Advertise</a></li>
                    <li><a href="#">Sitemap</a></li>
                    <li><a href="#">Terms</a></li>
                    <li><a href="#">Career</a></li>
                    <li><a href="#">Contact Us</a></li>
                </ul>
            </div>
        </div>
       </center>



    </body>
</html>

Hi sir,

   This my coding in this i have two forms and in second form i have to upload resume inside the grid view of the table and finally if i submit the page,two form with resume also want to submit i was struggling this issue for so many days so please send the solution for this problem as soon as possible...

Regards, R.Santhosh.


Advertisement
View Answers

Related Tutorials/Questions & Answers:
Mutliple files upload
Mutliple files upload  Hi Sir, Am doing a project in Jsp and Servlets, i want to upload multiple files inside the grid of the table, and submit... the following link: http://www.roseindia.net/jsp/file_upload
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Advertisements
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Mutliple files upload
Mutliple files upload  <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import="java.sql...., This my coding in this i have two forms and in second form i have to upload resume
Mutliple files upload
Mutliple files upload   <%@page contentType="text/html" pageEncoding="UTF-8"%> <%@page language="java"%> <%@page import... to upload resume inside the grid view of the table and finally if i submit the page,two
Upload and Download multiple files
Upload and Download multiple files  Hello Sir/Madam, I need a simple code for upload and download multiple files(it may be image,doc... link: http://www.roseindia.net/jsp/file_upload/uploadingMultipleFiles.shtml
File Upload and Retrive files
File Upload and Retrive files  Can any body help me am getting an error in uploading file. into mysql database.... thank's in advance
Upload and Download Large files in jsp
Upload and Download Large files in jsp  I am not able to download large files (>200mb) from any server. I need a code to download and upload large files (atleast 4 gb) to a server using jsp page
upload and download files - JSP-Servlet
and download files in JSP visit to : http://www.roseindia.net/jsp/file_upload...upload and download files  HI!! how can I upload (more than 1 file) and download the files using jsp. Is any lib folders to be pasted? kindly
How to upload files to server using JSP/Servlet?
How to upload files to server using JSP/Servlet?  How to upload files to server using JSP/Servlet
phpmyadmin - upload csv files - SQL
phpmyadmin - upload csv files  i have database in phpmyadmin. i have upload one time in csv file. i need to another csv file in upload same table. i will try to do this but result is failed. (table rows and csv rows are same
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
files upload to apache ftp server - Ajax
files upload to apache ftp server  Please, how to upload multiple files to apache ftp server using ajax . I want to upload files using drag drop... line. but I am trying to upload files using ajax. I want you to answer to me
Source file upload by attaching multiple files
Source file upload by attaching multiple files  Hi, I am trying to develop a file upload with multiple files attached functionality in java(like in gmail or in picasa). The source I found so far will select a single file. When I
Source file upload by attaching multiple files
Source file upload by attaching multiple files  Thanks for the answer. The answer posted in this link I want to have a single text box and when i... a provision to attach multiple images/files like in gmail. Is there any solution
upload files to apache ftp server - Ajax
upload files to apache ftp server  hi,sir I want to upload multiple files to apache ftp server. I am using ajax framework for j2ee.Now I am okay for my customize code for my ftp testing.But I want to upload and download to ftp
JSP Upload and Downloading files - JSP-Servlet
JSP Upload and Downloading files  Respected Sir/Madam, Very... and downloading files in JSP, I am facing a problem.. 1) The file name is getting inserted... are fixed one for all types of files what I have uploaded.. I Dont know the exact
how to upload multiple files in jsp and saving the path in database and the file in folder
how to upload multiple files in jsp and saving the path in database and the file in folder  how to upload multiple files in jsp and saving the path in database and the file in folder I have created a form for the upload of files
upload and download all kinds of files in jsp - Java Beginners
upload and download all kinds of files in jsp  how to upload and download all kinds of files ex: image file,pdf,.xls in jsp. your help is highly appreciated.  we can upload the all type s of files into oracle 10g
how to use javascript drag and drop files upload - Ajax
how to use javascript drag and drop files upload  Hi,Sir Please, I would like to upload multiple files using javascript with drag and drop style.I... for upload files in drag and drop style instead of using javascript.But I need
Creat a folder, inside it upload and download files in jsp and mysql
Creat a folder, inside it upload and download files in jsp and mysql  Create one or more folder .inside it we can upload and download multiple files   Here is an application that will upload the file and save
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  Hi, I have tried dis example, I have made d DB luk lik wht u have posted, still der is some problem,My program creates class file
upload and download files from ftp server using servlet - Ajax
upload and download files from ftp server using servlet  Hi,Sir Sorry for my complex questions. My problem is that I don't know client side script for upload and download files from ftp server using servlet and how to use
How to create d db for upload files using bolb i m followin dat upload file in db tutorial
How to create d db for upload files using bolb i m followin dat upload file in db tutorial  How to create d db for upload files using bolb i m followin dat upload file in db tutorial   Create a table named 'file
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations
Multiple files upload code using spring mvc 2.0 with xml configuration without using annotations  how to write code to attach multiple files and upload using spring mvc 2.o with xml configuration with out annotations? please
UPLOAD
UPLOAD  how to upload image using html
files
/core/files/storeobjectsinFile.html
files
files  write a java program to calculate the time taken to read a given number of files. file names should be given at command line.   Hello Friend, Try the following code: import java.io.*; import java.util.*; class
Struts File Upload Example
program to upload files. The interface org.apache.struts.upload.FormFile is the heart of the struts file upload application. This interface represents a file... Struts File Upload Example      
upload image data
upload image data  Hii Upload image dat in csv files
upload image data
upload image data  Hii Upload image dat in csv files
File Upload Tutorial With Examples In JSP
in the developing the project in which you have to upload any type of files... This tutorial will help you to understand how you can upload multiple files... File Upload Tutorial With Examples In JSP  
files uploding and downloading codes
files uploding and downloading codes  any one know JSP codes for upload files,download files and delete files from a created virtual memory
image upload in webapp/upload folder
image upload in webapp/upload folder  sir i want to store upload image in my project directory WebApp/Upload_image/ pls send the jsp servlet code when i upload the image one error found "system cannot found the specified path
file upload download - Java Beginners
file upload download  how to upload and download files from one system to another using java.io.* and java.net.* only please send me code
AJAX file upload
AJAX file upload If you want to upload file asynchronously means without... as ?webtoolkit.aim.js?. The same AJAX functionality is used by Gmail to upload attachment files. URL for Code http://www.webtoolkit.info/ajax-file-upload.html
upload an image
upload an image  Hello, i would like to upload an image to the database. how can i do it? what field type should i set in the database? thanx
upload video
upload video  hi sir i want to code of upload and download video in mysql database using jsp... and plz give advice which data type is used to store video in table
File Upload
File Upload  when i execute the image upload to mysql database it shows an exception that file path cannot be found
images upload
images upload  I use netbeans IDE 6.8 How i upload any image from any folder to web page
upload pdf
upload pdf   i want to dispal content of pdf fil and stored into database in human readable form using php . how can i do
HTML Upload
HTML Upload  Hi, I want to upload a word / excel document using the html code (web interface)need to get displayed on another webpage. Please let me the coding to display on another webpage using
image upload
image upload  Hello sir I want to upload image or any other type... be upload in the server and their path should be stored in database either in oracle or my sql. kindly help me.   JSP Upload file and save file path
Java upload file to ftp
Java upload file to ftp  Hi, How to uploaded file to a ftp server... that uploads files on FTP server. You have to use the Apache FTP client library.... View complete example at FTP File Upload in Java Thanks
Imge upload
Imge upload  how to upload image in jsp.I am using Glassfish server..   Here is a code that upload an image on tomcat server and save...;HEAD><TITLE>Display file upload form to the user</TITLE></HEAD>
Upload image
Upload image  Hai team, I beginner of Java me now i crated code for to capture image and upload to server. Here i taken a snap but when am going to upload to server it shows decoding failed...How can i clear that bug.please
Upload file without brouse button
Upload file without brouse button  Hi i want to upload 7 files without using browse button . I am using jscript to get the files and to view the files (.jpeg) .But I am not able to enter that address into file field can any body
Retrieving list of uploaded files.
Retrieving list of uploaded files.  I need to retrieve list of files... files on a website. its uploaded. now the file resides in a directory in the server. now the list of uploaded files should be showing in page where other users can
upload a image
upload a image  sir,how can i upload a image into a specified folder...;&lt;HEAD>&lt;TITLE>Display file upload form to the user&lt...;center">&lt;B>UPLOAD THE FILE&lt;/B>&lt;center>&lt
Advertisements
 

 

 

DMCA.com