Can not get the parameter?

I use a form to upload files,
like this:
<form name="gdform10" action="upload.jsp" ENCTYPE="multipart/form-data" method="post">
<input type="hidden" name="picName" value="wxds.jpg">
<input type="file" name="file">
<input type="submit" name="savePic" value="modify">
</form>
but I can not get the parameter picName in the upload.jsp,
like :
String pname = request.getParameter("picName");
but pname is null.

Hello,
In Jsp, if you want to upload file, you can't directly use "request.getParameter()".
There're two company provide components for you and it's free.
First is jspsmart company, it offer jspsmartUpload component and link is
http://www.jspsmart.com
Second is o'reilly, it offer MultipartRequest component and links is http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html
for example, you use oreilly component.
<%@ page import="com.oreilly.servlet.MultipartRequest" %>
String saveDirectory = "c:\\Upload\\";
int maxPostSize = 5 * 1024*1024;
MultipartRequest multi= new MultipartRequest(request,saveDirectory,maxPostSize );
Enumeration filesname = multi.getFileNames();
while(filesname.hasMoreElements()){
String name = (String)filesname.nextElement();
FileName = multi.getFilesystemName(name);
File f = multi.getFile(name);
String ContentType = multi.getContentType(name);
ps. above codes is from book named "java server pages tech reference"

Similar Messages

  • Can not get the Cisco TSP to show UP - 2003 64bit

    Can not get the Cisco TSP to show up on the list of Providers in Phone and Modem Options- Advance tab. Installed ver. 4.1, it seems to install correctly, with no errors but when I restart the server, there is no Cisco TSP001.tsp in the providers list. It works perfectly on my Windows 2003 servers, but will not work on this new Windows 2003 64 bit server. Any tricks to getting this to load?
    Thanks
    Keith

    Hi
    There is no 64-bit TSP yet. Whilst 32-bit apps will work OK for the most part on 64-bit via the WoW function, drivers tend to not be so flexible, and that's what TSP is...
    You'll have to bother your Cisco accounts folks to get this prioritised, it is upsetting a lot of people...
    Aaron
    Please rate helpful posts...

  • I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from the we sites, which did not work and now I can not get the computer to reboot the gray screen comes on and if a shift c I get a load bar and it goes half way and help

    I have IMac 10.7.5 Lion I use I forgot the password and I did a few fixes from web sites, which did not work and now I can not get the computer to reboot the gray screen comes on with the apple and if a shift+c, I get a load bar and it goes half way and stops, I can get into the black screen area with the hard drive info
    I did the following:   mount -uw /    rm/var/db/.AppleSetupDone    shutdown/uses/us  reboot Ok I know I should not have, but now I need help to reboot and hopefully not lose everything on the desk top, Linda Markle

    You did the wrong things. In the future it's a good idea to remember not to do something when you don't know what you are doing and what happens when you do it.
    Forgot Your Account Password
    For Lion, Mountain Lion, or Mavericks
        Boot to the Recovery HD:
    Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
         When the menubar appears select Terminal from the Utilities menu.
         Enter resetpassword at the prompt and press RETURN. Follow
         instructions in the dialog window that will appear.
         Or see:
           Reset a Mac OS X 10.7 Lion Password
           OS X Mountain Lion- Reset a login password,
           OS X Mavericks- Solve password problems,
           OS X Lion- Apple ID can be used to reset your user account password.

  • TS3988 I just bought a Iphone 5 -- my Iphone 4 and my ipad used to automatically sinc calendars via the Icloud whenever I entered anything on either device -- I can not get the new phone to do this.I have  check the settings on both devices and they seem

    I just bought a Iphone 5 -- my Iphone 4 and my ipad used to automatically sinc calendars via the Icloud whenever I entered anything on either device -- I can not get the new phone to do this.I have  check the settings on both devices and they seem to be t

    There are only two things that you must do to connect a device to calendars:
    1)  In settings>icloud, you must log in, WITH THE CORRECT ID/PASSWORD, and
    2)  Turn on calendars on the same page.
    You said that the iphone 4 and ipad **used** to automatically sync.  Do they no long sync?

  • I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync

    I just upgraded my iMac to OS 10.8.5 from 10.6.8 and now I can not get the calendars on my Mac and my iPhone 4s (running iOS 8.3) to sync.  I already tried replacing the calendars on the phone with those on my computer but nothing happened.

    Set up iCloud
    Set up iCloud (2)

  • I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp

    I have Adobe Photoshop Elements 10. It came installed on my HP Desktop. I am can not get the warp text tool to work. It has worked in the past. Once I click warp text, the little window does not pop up, and if I try to do anything else after I click warp text, it wont let me. Just sounds the ding, alert, can still slightly navigate the program but can not use any other tools after clicking warp text. I just have to open task manager and close the program. not sure if I'm doing something wrong or maybe I just need to uninstall and re install. Having trouble finding out how to uninstall and reinstall because the program came pre installed on my desktop.

    It actually sounds like the warp text window is opening off screen.
    Resetting the photoshop elements 10 preferences should fix it.
    *Press and hold the Shift+Ctrl+Alt keys just after you start the launch of the photoshop elements 10 editor
    *Keep holding the keys down until you get a dialog asking if you want to delete the adobe photoshop elements setting file
    *Press Yes

  • I can not get the flash player plug in to work with Internet Explorer

    I can not get the flash player plug in to work with Internet Explorer

    Zoltan71 wrote:
    I just bought this computer. My Internet Explorer is version 11.0.1
    I have the box checked to Install new version automatically, but it has not done any upgrading.
    I can't get the computer to update anything as far as I can see.
    The flash plug in does work with the Crome browser but it will not work with Internet explorer.
    I looked in the manage add-ons and it says enabled.
    I also went into the safety tab and deselected
    Active X filtering.
    Restarted and still does not work.
    I need help.....
    Chrome uses a different and separate plug-in.
    There are things about IE you need to know, especially 11. Specifically:
    "User-Agent Strings"
    That doesn't mean a lot, I'm sure, but it's the root of your problems, and Flash Player has nothing to do with it.
    Microsoft "rewrote" the User-Agent Strings for the abomination they call their latest and greatest browser. User-Agent Strings are what websites use to identify the browser you're using and provide the proper content for it's browser engine, like ActiveX stuff, and Flash or HTML5 video. Thanks to the geniuses in Redmond, WA, the User-Agent Strings for IE11 (which has a Trident engine), ID it as either "Gecko" (Firefox) or "Webkit" (Chrome). Problem is: when the site the directs to the content for one of these two engines, the Trident engine in IE can't intepret it and the site then sees IE as an "unidentified" browser.
    The problem with an unidentified browser is that the plug-ins in that browser aren't recognized either, so even though you're up to date, it says you need the latest Flash Player when you use IE11. YouTube... has converted to HTML5 video so if it doesn't detect Flash Player, it can display HTML5 (MP4) video which requires no plug-in to play. Facebook can't do that, because HTML5 doesn't apply to games... only video.
    Microsoft has no plans to "fix" the mess they've created because they think it's a great idea to block you out of the websites you visit.
    They recommend using "Compatibility View" and pretending that you're using an older verison of IE... Problem with that is that it's seen limited success, and you have to enable it for EVERY page that has problems... individually.
    I'm not big on "pretending" so I recommend actually using another browser.
    Firefox (from Mozilla)
    Opera (from Opera)
    Safari (from Apple)
    Chrome (from Google)
    ANY of those will work where IE11 won't, with the Flash Player Plug-in (For all other browsers), and Chrome doesn't even need that because it has its own Flash Player plugin built in.

  • Can not get the agent from rule determination

    Dear expert,
      We have a PR workflow,for one step, the agent is determined by one rule,In our Q system,everythink is ok to get the agent correctly,and the workflow also can works.but in our P system,can not get the agent from the rule,when we simulate the rule,the agent can be get smoothly,but in workflow,realy can't get the agent(after trace the workflow), so would you like to give me sone suggestion, whant had happen in our workflow?
    Many thanks!
    Best Regards,
    Kerry

    Tks!
    I have one question,how to check the agent assignment is active?
    and also want to say,the rule that determin the responsible agent is used at one step of the workflow,not for possible agent of task ,and the rule's type is RESPONSIBILITIES.
    Best Regards
    Edited by: Kerry Wang on Jun 25, 2010 3:14 AM

  • Hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the

    hi help unlock the phone happened after we installed a new programa we can not get the activation password and ID, I know and still does not stop the phone bought in Israel and what documents should be sent to confirm that my phone Please read through the help

    What I am saying is ..........
    The iPhone HAS to be active making calls on the UK carrier network for the carrier to identify as "theirs" and therefore eligible for the Carrier to unlock
    The way to achieve this is to use a PAYG sim making and receiving calls to establish a customer relationship  with the Carrier and then follow the Carrier's process to unlock
    With a PAYG it usually means adding a specified (by the carrier ) amount  usually £15 /£20 depending on the carrier
    This is how O2 function and according to Gemma  this is how Vodafone work

  • I have recently upgraded to mountain lion and I can not get the calendar application to work. I con appears on the side put on calendars. Any suggestions

    I have recently upgrades to Mountain Lion and I can not get the calendar utility to come alive. Icon appears in the tast bar but the application does not launch or appear to be any where else. Any suggestion?

    Did you look in the Applications folder for Calendar? If it is there, remove the item that is in the Dock and replace it by dragging the Calendar application to the Dock.
    If it is not there, did you have iCal located somewhere other than the Applications folder when you upgraded?

  • I can not get the latest version of itunes to update on my computer.  How can I do this?

    I can not get the newest version of itunes to update on my account.   How do I do this?

    What have you tried?
    What happened?
    Error message?
    What did it say?
    Any info?

  • HT5701 Downloaded Safari 6.0.4 and my software is not up to date to run it. I can not get the old version of Safari to work again.

    Downloaded Safari 6.0.4 and my software is not up to date to run it. I can not get the old version of Safari to work again.

    Open  > About this Mac, and tell us what OS X version you have. If it's 10.8, reinstall OS X 10.8.3 > http://support.apple.com/kb/DL1640
    If, after reinstalling the update, you still can't use Safari, hold Command and R keys while your computer is starting and reinstall Lion or Mountain Lion

  • HT1386 I have an app called ipieta which was originally downloaded onto an ipod. I gave the ipod to someone else, but now that I've had the iphone I can not get the audio even though it is downloaded into itunes music like it said to do.  It won't work.

    I have an app called ipieta which was originally downloaded onto an ipod. I gave the ipod to someone else, but now that I've had the iphone I can not get the audio even though it is downloaded into itunes music like it said to do.  It won't work.  I've tried more than several times to get help but nothing helps. Do I need to deauthorize the ipod or perhaps erase all the downloaded ipieta stuff and start over?
    Thanks for any suggestions

    Sorry. There's nothing anyone can do. The current version of the facebook app will not run on 4.2.1. The iPhone 3G won't run anything higher than 4.2.1. You're stuck.
    Maybe it's time to buy yourself a new iPod Touch.

  • My Macbook are from 2012, and i can not get the Airplay to work. Apple-tv3

    Hello,
    I can not get the Airplay  work betwine my Macbook  and Airplay.
    Have read a lot about it online, and can not understand way its-not work. My mac is from 2012. have dobbel Chek. Also with Serial number on our site.
    Do you have any answer for way its not work?

    Update to Mountain Lion, or higher, which is required.
    Troubleshooting AirPlay

  • After update to OS4.2.1 I can not get the ringer to work for incoming calls

    after update to OS4.2.1 I can not get the ringer to work for incoming calls. If I set Vibrate on, that's the only notification I get. Tried everything including blowing away ALL my apps and restoring phone to new. Lost all my apps but the ringer still won't ring

    God Bless u! LOL I have an otterbox case on my phone and had no clue that the mute button was there....Thank you so much!! The volume on my movies & everything else worked...even when I would go into "settings" and adjust the volume of the ringtone. I knew it was something simple...Thanks again..

Maybe you are looking for