• Post Reply Bookmark Topic Watch Topic
  • New Topic

Declare file type with mandatory in jsp  RSS feed

 
Ravi Kumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have declared a file type as below

<input class="BrowseFile" name="filename" type="file">

I want to make this file as mandatory while declaring the file itself. It has to come with * filedname in the UI. I dont want to use java script.
Please suggest me how to proceed?
 
Sebastian Janisch
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only other way to achieve this without using JavaScript is checking it on the server side once the form has been submitted, then return to the form page if an error has occured.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!