Hi, I am developing an application using JSF in Eclipse IDE with Derby as database. I have a feature to upload files to the database. But the file name is getting stored as "C:\Documents and Settings\Angeline\Desktop\test.txt" instead of "test.txt". How do I get to store only "test.txt" as file name in the database?
This is my code in JSF:
File to Upload:
<t:inputFileUpload id="fileupload" value="#{employeeBean.upFile}" storage="file"/>
Java Bean Code:
String fileName=upFile.getName();
The value of this fileName=C:\Documents and Settings\Angeline\Desktop\test.txt.