This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Move a file in a WAR

 
Abhijit Sontakey
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have piece of code that copies file in directory A to dirctory B of a WAR file on WebApplication startup. The code is in a listner class.
When i test it on local WSAD it works, but i am not sure whether it will run when deployed as WAR in WAS. The code creates an InputStream and OutputStream from the source and target files and copies the contents of file from source file to the target file. Can anyabody confirm this will work.

Regards
Abhijit
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not sure if websphere can run war files without unpackaging them (like tomcat can).
there is an unpacking work folder in websphere that some of our past projects the installation process was to honestly to deploy the war, stop websphere, edit property files that were in the newly created WEB-INF folder, within the deployed app, then restart websphere...
So things do get unpacked, and manipulating them in an unpacked state is possible.
Now there is still the issue if the target environment is configured differently, with directory permissions or a security policy that prevents the application from writing its folders.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic