Can we create a war file for a play2.1.1 application offline? - playframework-2.1

I have tried creating war file for a play2.1.1 application following the instructions given in the github link - https://github.com/dlecan/play2-war-plugin/
However it fetches the plugins files from online repository and its been referenced in the play program. This method works only if the internet is connected.
Can i download the actual plugin file from this site and save it in my local system and generate a play war file offline?

Partially Yes. You need to go online only once to get all the dependencies downloaded. Once you are done, then you can work completely offline. Also I would like to mention this link: http://brainstep.blogspot.in/2013/10/how-to-install-play-2-war-bare-minimum.html

There is no official way for doing this, but if that aren't to much files, you can use Fiddler Web Debugger to look what files get downloaded, save them to your hard disk and then activate Fiddler's Auto responder. Everytime the Application requests the Files from the Server, Fiddler replies with the Files on your Hard disk.

Related

How do I test customized stream playback paths in Red5

I have a Red5 application that I inherited from a previouse developer and I am trying to get it running correctly. I am able to start the Red5 server and stream video files from my /webapps/myapp/streams/ directory. I am able to test this by going to http://localhost:8080/myApps/streams/testVid.mp4 and the video plays normally.
However, I need to be able to stream my videos from any directory in my file explorer. The application already has a Application.java, a CustomFilenameGenerator.java, the needed bean for CustomFilenameGenerator in red5-web.xml and a playbackPath and recordPath in my red5-web.properties file.
From my research it seems like the previous developer that worked on this project was probably able to get the streaming working from a custom path, but I am not sure how to get it running.
Assuming that everything with the application/configurations is correct how do I actually test it, if the files I want to stream are in C:\Users\myUser\Desktop\StreamRecordings?
I have tried going to http://localhost:8080/myApp/StreamRecordings/testVid.mp4 but I get 404 error (probably since StreamRecordings is not in a myApp subdirectory.
Thanks!

Does Google Drive Android API help my application to work in background?

I have read Google Drive API documentation but I'm not able to understand the following:
Can files and folder be created and modified on drive in background of app?
My application needs working of drive in background.
For Files:
If you will check "Working with File Contents":
Lifecycle of a Drive file
The Drive Android API lets your app access files even if the device is offline. To support offline cases, the API implements a sync engine, which runs in the background to upstream and downstream changes as network access is available and to resolve conflicts.
Check this image from the document.
The lifecycle of a DriveFile object:
Perform an initial download request if the file is not yet synced to the local context but the user wants to open the file. The API handles this automatically when a file is requested.
Open the contents of a file. This creates a temporary duplicate of the file's binary stream which is only available to your application.
Read or modify the file contents, making changes to the temporary duplicate.
Commit or discard any file content changes that have been made.
If there are changes, the file contents are queued for upload to sync them back to the server.
Google API does support running in background. For folders there is no documentation regarding creating of folder can be done in background, but I think same implementation can be done.
I hope this helps.

How to bypass red5 demo page on start up?

At present, I start up red5 in linux command line ./red5.sh and it runs the script. Then I go to http://localhost:5080 demos page to set up my camera and audio input and all works fine in testing the stream both on demo page and in swf of my webpage.
Question is, do I need to include some java and/or action script for the swf player to
bypass the red5 demo page so I can directly connect my input and stream in the code of the page? Also so only logged in webpage viewers can connect?
Overall wondering if there is a way of hiding the server stream from anyone not logged in to view it on my site? I understand in webapps folder somewhere there is the hosts list of IP but it would be impossible to know the IP of the viewers as opposed to unwanted viewers or bandwidth stealers.
I am trying to set up a site for poetry readings and make it so readers can record live to my server and then logged in viewers can view from my website. I am trying to figure out whether I must have that red5 page open and if that doesn't pose some kind of risk.
Found my own way of doing this just by removing and renaming files and folders.
If you go to usr/local/red5/webapps here lies all the directories for viewing when you go to default port 5080 so I simply installed the applications I needed and then took everything out of there except those applications I wanted and needed to run. I took out all and placed it in a folder in /var directory named it red5_movedstuff in case I want access to further applications later on.Then I renamed the applications I am using in webapps folder and kept admin folder to access them but I renamed my applications and had to importantly rename also in WEB-INF for each application name change.
Now if someone goes to myip:5080 they get a blank page and by changing names of applications I've hidden my directories beyond that including list of streams.

Storing files locally in Node Webkit App

Folks:
I'm creating an app using Node Webkit. The purpose of this app is to display images and pdfs. The app needs to download those files from a central repository, and cache them locally. When the app runs offline, the files should still be available, and displayed.
On the face of it, this sounds like appcache is the answer - and that indeed is where I was heading when this was a pure webapp in a browser. However, now I've discovered node-webkit, and here we are.
node-webkit's GitHub wiki states:
"However, application cache is designed for browser use, for apps using node-webkit, it's less useful than the other two method, read HTML5 Application Cache if you want to use it."
But doesn't say why.
I've also researched node.js filesystem - but that seems like a whole magnitude of complexity above what I need.
Can anyone point me in a sensible direction?
Thanks.
It has to do with the nature of App Cache itself.
You specify a manifest file that lists all the static assets required for your app to run offline. You don't have any programmatic access to the cache to add and remove files via JS.
So for a node-webkit app, it'd make more sense to fetch these files and store them in the Application Support folder (Or AppData, depending on the platform). That's where the node.js part is really useful, the file IO stuff.

Where to save the uploaded files?

I am developing a web application to upload .mp3 files and need to play them. I successfully uploaded the files and saving them in C:/uploads folder. I understand that as it's a web application we need to save them in the Apache web server it self. But I am not sure, where to save them.
Thanks,
Serenity.
You can use content repositories to store uploaded data, I think this is common approach. For instance, take a look at the Apache JackRabbit CR, applying it you won't easy look for uploaded files on hard drive, but you will have web interface, and also some other tools available to connect to repository and show you files there etc.
As alternative to JackRabbit, you can try Alfresco CMS, they both implement JCR, other implementations are listed here (you will them at the bottom of that page).