Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot get filenames

 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day!

I just want to get the filenames from the form in my jsp:

index.jsp


To get the filenames I used :



But the result is always NULL.

I changed it to:


Now the output is blank.

What is it that I am missing?

Thanks.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting files is not that simple. Please refer to this FAQ
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay. Just wondering why it didn't work for me. One of my team mates happen to use the same code and it worked for him.

Thanks.

God bless.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe your teammate was not using enctype="multipart/form-data" for his form, only sending filenames, not file content.
If you use "multipart/form-data", your request will be looking something like this :

Unless you parse the content, you won't get the filenames easily.
 
Darren Alexandria
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot.

I got this working!

God bless.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic