Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
sawi _
create file from portlet
August 7, 2009 3:58 AM
Answer

sawi _

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

Hi
anybody know how to create file from portlet ?
It's my steps:
1. Click save form from view.jsp
2. Get data from class.
3. and i try to create file in examl : /my_project/html/file.txt
i try :
1new File("file.txt")


and this ;
1new File(actionRequest.getContextPath() + "my_project\\html\\file.txt")


but if i put this code :
1new File("C\\file.txt")

this code will be create file in C:file.txt

thanks for help

Best Regards
Dariusz Sawicki
sawi _
RE: create file from portlet
August 10, 2009 5:53 AM
Answer

sawi _

Rank: Regular Member

Posts: 164

Join Date: March 27, 2009

Recent Posts

anybody don't know how to create file programaticly from portlet?