Forums

Home » Liferay Portal » English » 3. Development

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

Dariusz Sawicki

Rank: Regular Member

Posts: 165

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
Dariusz Sawicki
RE: create file from portlet
August 10, 2009 5:53 AM
Answer

Dariusz Sawicki

Rank: Regular Member

Posts: 165

Join Date: March 27, 2009

Recent Posts

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

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!