Hello Yoav,
Thanks for your reply.I already gone throuth the link.But i am getting some problems 
as there is no clear example how to proceed.
 
A  clear example to upload a file from HTML form would be helpful.
 
Thanks for your time,
Maruthi.

"Shapira, Yoav" <[EMAIL PROTECTED]> wrote:
Hi,
Check out the Jakarta Commons Fileupload examples at
http://jakarta.apache.org/commons/fileupload/.

Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Maruthi [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, August 10, 2004 5:05 AM
>To: [EMAIL PROTECTED]
>Subject: How to Upload a File Using JSP?.(Snippest of code needed)
>
>Hello Everybody,
>I got some problem regarding file uploading using JSP.
>
>In my JSP I have a form which contains 2 textboxes and other text box
for
>uploading a file.I need to store the information of 2 text
boxes,uploaded
>file in the mysql databse.I am looking for the code for uploading a
file
>using JSP.
>
>Please see below for my code.In this code i need to include the code
for
>uploading a file.
>
>Any help in this regard would be greatly appreciated..Pl reply in this
>regard.
>Thank you,
>Maruthi.
>
>=============================
>
>
>
>
>
>
>
>
>
>prefix='jetspeed'
>%>
>>
>
>  >  try
>  {
>
>   if(request.getMethod().equals("POST"))
>   {
>        String cpu1=    request.getParameter("cpu");
>      String architecture1=  request.getParameter("architecture");
>
>
>          Class.forName("org.gjt.mm.mysql.Driver");
>       Connection
>con=DriverManager.getConnection("Jdbc:mysql://localhost:3306/Thesiswork
","r
>oot","");
>       Statement st=con.createStatement();
>
>          String str="INSERT into submitjobs
>VALUES('"+cpu1+"','"+architecture1+"','"+file1+"')";
>            int i=st.executeUpdate(str);
>               System.out.println("Number of Rows inserted into
>AddGridNodes Table  is: " +i+"
");
>
>
>               out.println( "Confirmation-Added Grid
>Nodes" );
>             out.println( "
");
>             out.println( "face=Verdana,Geneva,Arial
>color=white size=4>ADD JOBS");
>             out.println("");
>
>             out.println( "
");
>             out.println("The Details Belongs to
>Job: "+cpu1+"  is added to the
>Database..!.
");
>
>             out.println("");
>             out.println("");
>             out.println("");
>             out.println("");
>
>       st.close();
>       con.close();
>
>
>      }else
>      {
>  %>
> 
> >method="POST">


> 
> 

> >size=4>SUBMIT JOBS
> 

> 
>
> 
> 
> >size=2>CPU:*
>   
>  [input] 
> 
>
> 
> >size=2>Architecture:*
>   
>  [input] >size="20">
> 
>
> 
> >size=2>Execute PBS File:*
>   
>  [input] 
> 
>
>
>
>
>
> 
> 


>
>  [input] 
>
>
> 
> 
> 
> 
>
>
>>   } //else
>   }catch (Exception e)
>   {
>      Log.error(e);
>     return;
>  }
>%>
>
>
>
>
>---------------------------------
>Do you Yahoo!?
>New and Improved Yahoo! Mail - Send 10MB messages!

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


                
---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

Reply via email to