Problem !! How to upload an file and get parameters on the same form ?

Hello!
Is there anyway of getting parameters from an
text field input in a form like :
<form name="signinForm" method="post" action="uploadFile.jsp" enctype="multipart/form-data" >Actually I would like to insert the parameters and make the upload of an file
on the same form. It is something likethis :
Form.jsp
<form name="signinForm" method="post" action="uploadFile.jsp" enctype="multipart/form-data" >   
<input type="text" id="name" name="signinName" />
<input name="signinFile" id="fileUp" type="file" />   
<input type="submit" id="submit_btn" name="signinSubmit"/>uploadingFile.jsp
<%@ page import="java.io.*,javax.servlet.http.HttpServletRequest,javax.servlet.ServletInputStream" %>
<%@ page import="java.io.FileWriter,java.io.IOException" %>
<%
.//upload the file
String email = request.getParameter("signinName").trim(); //this line is bringing me an NullPointerException
%>Thanks in advance for any suggestion!!
All the best!

You can get the parameter value directly. You can do the following to get the parameter name.
Directly take the request's input stream and parse the header and findout the value for text field.
Or you can use apache's file upload utilities and do the following
DiskFileItemFactory factory = new DiskFileItemFactory();
               ServletFileUpload upload = new ServletFileUpload(factory);
               List fileItems = upload.parseRequest(request);
               Iterator iter = fileItems.iterator();
               while (iter.hasNext()) {
                    FileItem item = (FileItem) iter.next();
                    if (item.isFormField()) {
     //Form data fields will be displayed here          out.println(item.getFieldName());
     out.println(item.getString());
All the best..

Similar Messages

  • How do i have landscape and portrait slides in the same keynote file?

    how do i create landscape and portrait slides in the same keynote file?

    You cant, its one or the other not both, the slide size setting is for the whole presentation, not for individual slides.
    The slide format is chosen to match the display the presentation is shown on. I have presentations showing on vertical, horizontal, square, circular and iregular shaped screens with rear projection, but a single format must still be set.

  • How to export an album and keep images in the same order in elements 11 mac

    I made an album of my trip to Australia (lots of pictures) and changed the order of the images (not the same as shooting order) and when I export the images in the album to a folder or memorystick, the images are copied to that place but I lost the album order of the images.
    How can I prevent that, without having to renumber al 500 images separatly?
    Gr Jos

    Thanks for the tip, Michel
    It worked like a charm…
    cheers Jos
    Op 28 okt. 2013, om 18:49 heeft MichelBParis <[email protected]> het volgende geschreven:
    Re: How to export an album and keep images in the same order in elements 11 mac
    created by MichelBParis in Photoshop Elements - View the full discussion
    JosU a écrit:
    I made an album of my trip to Australia (lots of pictures) and changed the order of the images (not the same as shooting order) and when I export the images in the album to a folder or memorystick, the images are copied to that place but I lost the album order of the images.
    How can I prevent that, without having to renumber al 500 images separatly?
    Gr Jos
    The order in album is only kept in the organizer database, so the only way not to lose that order is to rename files.
    If you are using the 'export' function, select your album in custom order, select all photos and in the dialog, choose to rename with a common base name.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5794538#5794538
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5794538#5794538
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5794538#5794538. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Photoshop Elements at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Upload file and update text at the same time

    I wanted upload a file and i have text box also, i know how
    to upload a file but the problem i cannot update the text box at
    the same time can anyone share how, I'm using the
    ASPSimpleUpload.Upload.
    please helpe thanks

    Do you mean something like this?
    SQL> create table table_name
      2  (column_a number
      3  ,column_b number
      4  ,column_c number
      5  ,date_column_d date
      6  );
    Table created.
    SQL>
    SQL> insert into table_name values (0,0,0,sysdate);
    1 row created.
    SQL> insert into table_name values (1,1,1,sysdate);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> create view view_name
      2  as
      3  select
      4  column_a,
      5  column_b,
      6  column_c,
      7  case when column_c = 1 then to_date('01-JAN-1900','DD-MON-YYYY')
      8       else date_column_d
      9  end  date_column_d
    10  from
    11  table_name;
    View created.
    SQL> select * from view_name;
                COLUMN_A             COLUMN_B             COLUMN_C DATE_COLUMN_D
                       0                    0                    0 12-DEC-2008 07:42:15
                       1                    1                    1 01-JAN-1900 00:00:00Edited by: SomeoneElse on Dec 12, 2008 7:42 AM

  • How can I save images and text data to the same file?

    I have been looking at ways to do this for a while. My main VI saves the raw data to a text file which the users then import to Excel and plot. I am trying to simplify this process and have been looking at ways to accomplish this task. I want to be able to save the raw data to a file and then save the Labview graph as well. This will eliminate the tedious task of importing the raw data into Excel and plotting it. I can save the raw data to its own file and I can use the Get Image method for the graph and save it to its own file. I am currently using the .png format. Is there a way of saving both to the same file ie, importing the image into Excel or Word etc. Before I go off doing a science project I wanted to see if anyone else had experience completing this task and had any recommendations. Thanks in advance for any help.

    well ther are a couple of ways. You could use the standard report generation VI's and make a complete report with the image of the graph embedded into the report with the raw data or you could use activeX and control excel thru LV and put the raw data into excel directly and have excel graph the data without any user interaction. I have posted a slew of VI's on the excel board if you do not have the report generation toolkit. If you could tell me which way you want to go I could possibly send you an example.
    For more information and some sample VI's and tool kits, you can go to the excel board
    Joe.
    "NOTHING IS EVER EASY"

  • How do I make Organizer and Editor open at the same time?

    I'm new to PSE 10 and want to know how to make Organizer and Editor open at the same time. I can get the Organizer up, but have to pick out a photo and click on Fix: Full Photo Edit to get Editor to open. Is that the only way to do it?
    Thanks,
    K

    Create Desktop shortcuts for the Organizer and the Editor:
    The Editor's executable is:
    "C:\Program Files (x86)\Adobe\Photoshop Elements 10\PhotoshopElementsEditor.exe"
    The Organizer's executable is:
    "C:\Program Files (x86)\Adobe\Elements 10 Organizer\PhotoshopElementsOrganizer.exe"
    Ken

  • Can I publish both an .ibooks file and a PDF of the same title to iBookstore?

    I created a multitouch book in iBooks Author that I want to publish to the iBookstore. If I publish it as an .ibooks file, it has all the awesome multi-touch functionality for iPad, which I deifnitley want. However, .ibooks books cannot be read on the iPhone. I also want the book to be available through the iBookstore in a format that can be read on iPhone.
    Can I publish my title as a PDF of the book IN ADDITION to the .ibooks version, and have them both available on the iBookstore?

    While there are PDFs available, they tend to be Apple's own content, I think.
    If one will do, you don't need two.
    This question has come up before, so I'll just repeat my original response. If the two versions are the same, and you're sincere about a desire to support iPhone & iPad, just do one epub.
    If the iBA version for iPad is different, then they are not the same and you have two books so knock yourself out.
    Users may be confused if you manage to get two of the same in the store, and they don't know which to buy or buy one and then find out they wanted the other....this is why I'd expect pushback from Apple during review if you even tried.

  • How to align output formatted and output text in the same line?

    Hi All,
    I want an output formatted label and a text on the same line,. I've surrounded these components wth a panel form layout and they automatically align one below the other. how do I kepe them in the same line?
    Thanks.

    Try as per the code snippet below:
    <af:document title="TestPage.jspx" id="d1">
    <af:messages id="m1" inline="true"/>
    <af:form id="f1">
    *<af:panelGroupLayout id="pgl1" layout="horizontal">*
    *<af:outputFormatted value="outputFormatted1" id="of1"/>*
    *<h:outputText value="outputText1" id="ot1"/>*
    *</af:panelGroupLayout>*
    </af:form>
    </af:document>
    Thanks,
    Navaneeth

  • How to insert a UUID into multiple tables in the same form

    I am trying to insert a UUID into 2 different tables at the
    same time ie to let this be created in the form and then insert
    this ID into 2 linked tables in a database using Access.
    Does anybody have any suggestions on how to accomplish this?
    Thanks very much

    So you have one form that processes information for two
    tables, or do you
    have two forms (one for each table - except the UUID)?
    If it is one form just run two SQL insert statements. One for
    the primary
    table, then one for the related table.
    If it is two forms run the above two SQL statements then an
    update statement
    to finish filling the second table.
    Or am I completely misunderstanding the issue?
    Bryan Ashcraft (remove brain to reply)
    Web Application Developer
    Wright Medical Technology, Inc.
    Macromedia Certified Dreamweaver Developer
    Adobe Community Expert (DW) ::
    http://www.adobe.com/communities/experts/
    "weelco" <[email protected]> wrote in
    message
    news:esjtjj$qtc$[email protected]..
    > Thanks for your quick reply, and yes I do know how to do
    that however I
    > would
    > like to do this all in one form field so I would like to
    create the UUID
    > whith
    > the same form that also submits it to another table, is
    this possible or
    > do I
    > have to do that using multiple 'pages'?
    >

  • How to read spool file and get the spool file number

    Hey everyone.
    I created a program ztemp that is calling another program ztemp2 within, ztemp2 creates a spool file. Now the requirement is I need to write a code within ztemp to download that spool request and then convert it to the pdf file. I know I can use program rstxpdft4 to convert the spool file to the PDF but for this I need to give the spool number, so can you please tell me how can I get the spool number and then fetch it to the program rstxpdft4 .
    Thank you.
    Rhul goel

    Hi,
       Please check the [link|Convert ABAP List to PDF and display without downloading first; (Rich's reply) and get the spool similarly.
    Or read from table TSP01 to get the latest spool using sy-uname.
    Regards,
    Srini.

  • Upload media file and submit data in a same time

    Hi,
    I'm trying to submit data and upload file in a same time to a web page(which is jsp). But i found that the method used to upload file and submit data are different.
    Method used to submit data :-
    PostMethod post = new PostMethod(wbIndex);        
    post.addRequestHeader("Content-Type","text/html; charset=big5");
    for(int i=0;i<field.length;i++){
         post.addParameter(field,value[i]);
    System.out.print("field[" + field[i] + "], value[" + value[i] + "] ");
    responseCode = client.executeMethod(post);
    System.out.println("response code : " + responseCode);
    and method used to upload file
    URL url = new URL(wbIndex);
    // create a boundary string
    String boundary = MultiPartFormOutputStream.createBoundary();
    URLConnection urlConn = MultiPartFormOutputStream.createConnection(url);
    urlConn.setRequestProperty("Accept", "*/*");
    urlConn.setRequestProperty("Content-Type",
         MultiPartFormOutputStream.getContentType(boundary));
    // set some other request headers...
    urlConn.setRequestProperty("Connection", "Keep-Alive");
    urlConn.setRequestProperty("Cache-Control", "no-cache");
    // no need to connect cuz getOutputStream() does it
    MultiPartFormOutputStream out =
         new MultiPartFormOutputStream(urlConn.getOutputStream(), boundary);
    // write a text field element
    out.writeField("myText", "text field text");
    // upload a file
    out.writeFile("myFile", "text/plain", new File("C:\\test.wav"));
    out.close();Does anyone know how to submit data and upload file to the page at a same time?
    null

    Hi,
    Thanks for your reply. You meant that both method also can used to upload file and submit data? How about if i want to use the first method to upload file and submit data? How can i upload the file by using first method?

  • How can I create a link to a pdf file and show it in the same webpage or in a new tab

    It is no problem to create a link. But the formats are limited and  - unbelievable -  the pdf format is not supported??!
    Where are the parameter (_blank or _self) to show it for example in the same webpage or in a new tab??!

    PDF is media.  It is not a web document.  Your end users must have plug-ins and helper apps installed on their device to see PDFs in browsers.  Depending on their settings, the PDF file may or may not launch in the browser window.  On my system, PDF files download and launch inside Acrobat Professional; not my browser.
    The safest approach is to provide a screenshot on your page with a direct link to the PDF file so people can handle it as they wish.  See example:  http://www.adobe.com/manufacturing/3dpdfsamples/3dsolutions/
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/

  • Is it possible to get the style, font and related info of a paragraph of a in design file and write it on the same in design file  on the  left side

    Is it possible to get the style, font and related info of a paragraph text  of a in design file and write  all the stuff on the same in design file  on the  left side with small fonts 
    as
    Lets  this is a text in in design file    :
    style : abc                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 12                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu
    style : xyz                      we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultur we are going to check the  condition  Agence Wallonne pour la    font 10                                  d'une Agricultu we are going to check the  condition  Agence Wallonne pour la Promotion d'une Agricultu

    Hi Poojith
    Not sure if this would solve your requirment but just in case might be helpful:
    1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
    [http://www.sapdesignguild.org/resources/htmlb_guidance/]
    2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
    Thanks
    Deepak

  • When I got FF4, it said that extensions weren't compatible. The worst is Delicious. They are all gone. Either compatibilize them, or show me how to ditch this POS and get back to the old one...I don't like this beta AT ALL!

    What details? FF made a new crummy beta, screwed up my tranquil and wonderful browsing environment, and now, like the big oil companies and the banks, are laughing at me. Browsers of the world, UNITE! We have nothing to lose but our bookmarks!
    Bill

    I have taken it back to the Apple store genius bar, but they say they don't see anything wrong. Well unless you use it all day and experience the problems when they happen, you wont see anything wrong. But there are lots wrong with it. But this would be the same store as I purchased the phone. And they backed up my old Iphone 4, but were not able to get anything to load back onto my new phone. So, I lost pretty much everything. But over time, some of my contacts have started showing up, although i am still missing over 800 of them.

  • How do i share files beween 2 computers on the same local net

    I have a iMac and a MacBook. I usually use the iMac but when I go on vacation I take the MacBook. How do I get the files and bookmarks from the iMac to the MacBook?

    easiest way to do this is using the airdrop feature in finder, the following article tells how to do this:
    http://support.apple.com/kb/PH11376

Maybe you are looking for

  • Unable to delete/create integration models.

    Hi All, I need to correct some int.models wrt the logical system. 1)     CFM1 u2013 choose variant pops up a msg- logical system not maintained in NDV2. This is not  supposed to be maintained. I need to change the variant models for a different logic

  • CherryMusic - a python music server with an HTML5 frontend

    Hey fellow archers! CherryMusic a music streaming server written in python with an HTML5 frontend nothing to setup, uses SQLite file database light on resources support for all major browsers on almost all OSes (also your fancy phone!) AUR: cherrymus

  • Mac OS X 10.6 Snow Leopard - Quicktime X YouTube Uploader BUG!

    Found this bug while trying to upload a video. 3 times I tried it, and it hangs at "Publishing - About 5 seconds". It hangs there for hours until I quit the application. http://www.youtube.com/watch?v=lgyDTxYw7Qw I uploaded this video via YouTube web

  • Cant install sql server on windows 7 home premium 64bit

    during installation assitant tell me registrarion key is invalid and cancel the installation, i have try like 4 diferent versions os sql server and all the same! any sugetion!!

  • Hp Folio 13-2000

    So my hp died and i went to plug it in to charge it and after hours i realized it didnt charge and it would not turn on. There was blinking light that it on wifi button that just flashes while its plugged in but if i unplugg it it stops flashing. I a