Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create UNIX folder from JSP code  RSS feed

 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,




1)This is the code in my Jsp page. It is working fine in Windows system.

2) But when i deployed in UNIX machine, the directory is not being created. (May be due to permission problem)

3) I want to create folder anyhow from JSP code only.

How can I achieve it?

Thanks,
Ramesh
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all, you're creating a file using a relative path: this *may* be what you want, but strikes me as a really bad idea. Deployment will also matter; this may fail if it's deployed as a war. And war or not, it may be completely deleted on a new deploy. Use an absolute path.

Second of all, this kind of code doesn't belong in a JSP. It belongs in a normal Java class.

Third of all, if it's a permissions issue, you'll need to have the permissions changed--nothing to be done about that from the Java side.
 
Ramesh Sunkara
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THQ NEWTON
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"THQ"? Please UseRealWords. Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!