I have a JSP and a User class. All the variables are being populated. I checked but when I instanciate the User class and do a user.get I get nulls for everything but email, last name and first name. Even these are not in the order I excepted.
im also experienced getting null when i use enctype="multipart/form-data" in the form that i submitted with file element.. what i did is i separate the form with the file element from the form with text and hidden fields.. and submit the two forms. now i get all the values of the hidden and text fields and the file object
Ah, I see. Yes, with a multi-part request, getParameter will not work at all since the request object will not parse request data that does not have an enctype of 'application/x-www-form-urlencoded' (which is the default for the HTML form tag).
This is why 3rd-party libraries are usually used for file uploading that know how to parse the multi-part request format. [ February 23, 2006: Message edited by: Bear Bibeault ]
With regards to the original question, from the code that is posted (I'm currently biting my tongue with regards to the presence of so much Java code in a JSP page), I'd have to say that the problem is with the posting code. Have you verified that the URL being submitted contains all the request parameters as expected (if a GET), or that the form contains all the expected elements (if a POST)? [ February 23, 2006: Message edited by: Bear Bibeault ]
Joined: Feb 09, 2006
Yes I have verified getParam works.
So to rephrase my question. How can I send this to the file writer with out using the User Class? In essence put the variable out to the filewritter.