Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I am attempting to build a database that will allow a user to upload their music to be accessed by someone else/third party. How would I create it so that the music can be uploaded to a database but providing a path for it to be accessed from where it is stored?
As in A Band upload “Song” and it is then streamed by A Fan.
If it can't upload to a database I need to upload it to a server.
We are building the back end in Java and the front end in HTML.
We are also using Glassfish and Netbeans for writing the code.
You can store files in a BLOB field in a database for example. Another possibility would be to store them directly on the file system, but it has its problems (such as the lack of metadata).
Then you'll need to figure how you want to map each file, for example http://myserver.com/Artist/Album/Songname or http://myserver.com/listen?uniqueid=743.
File upload servlets are available all over the web, so that shouldn't be a problem. The rest is up to your programming skills (this might be too big of a project for you).
Then you'll just need to connect those things together, and that's the part where you start to program (or hit the Google hard).
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 1 year ago.
Improve this question
I am creating a game app where you need the ability to be able to create profiles for other players and store them on your phone. I have been looking around for help, but I can't seem to find any tutorial or help for this. Does anyone know which aspect of java I need to research and learn about? I have seen that it might be to do with App-specific files but I'm not sure if that is the right thing.
You can store user information in files (XML / JSON format). You can use the database too - Android supports SQLite (SQLlite database is stored as single file). Android creates files in private folder, other applications cannot access them.
More informations about files:
https://developer.android.com/training/data-storage
Example of usage of SQLite:
https://developer.android.com/training/data-storage/sqlite
Remember not to store user sensitive data in plaintext.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have created my website using Java Enterprise Edition (JSP/Servlets) and MySql 8 for my database. It is a typical CRUD application with a feature that let the user track the car's location.
I thought of using Flutter since it will save me time with its cross-platform capabilities but I have'nt found any documentations that will make the user login from the app to my website and fetch some data.
I'm pretty sure it is possible somehow. Otherwise is there a way to simulate my website as fast as possible without using Chrome obviously.
Read the concept of Rest APis.Simply use the api to fetch data and you can also save data through api.You need to Connect your app to your web APi.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently trying to code a fairly simple program in Java to keep a database on a small library at my university. I'd like for multiple computers to be able to use this program using a shared database stored in a text file that would be downloaded when the program is run, and uploaded once the user is finished using the program and making any edits to the database. I don't know how to go about this at all and would be very grateful for any pointers on a direction to take.
In order to connect to other computers in Java, you should use Sockets, and define your own Protocol (Basically, your protocol would consist on a handshake, and some way on asking the other part of the connection to send the text's data). Anyways, I'd recommend you using a simple SQLite database
To read and save files (txt is a raw text file without any special format), check this
If you'd like the program to display the text, you should learn a bit about Java Swing
Also, try looking a bit in google before asking here
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
In our organization, We have one server in which one folder Log/Response is there. In this folder so many files will be there (XML file). Now I want to write a program to find all XML files which has a 'keyword' in Java, if possible. And after finding all such file it should return all files name. Here 'keyword' will be given from client (means user will open one URL/keyword from his browser).
So how can I achieve this thing? Which technology, language and tool I need to use? If I write a program then where exactly I should put it?
You can start from JSP/Servlet as starting point. JSP/Servlet will be communication point between user and server infrastructure where a list of files is located.
To search necessary file: as simple solution you can scan all files in necessary directory. But it will be slow. As more advanced solution, you should use some full text search engine(search will be fast).
Of course, JSP/Servlet will be deployed in servlet container such as Jetty or Tomcat.
That is all :)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I have this array
String[][] someArrayOfData={{"there","is"},{"alot","of data here"}};
I want to be able to save this array so I can load and access it the next time I run the program.
I dont mind having to use just a String[] as well. I have tried to write it to a notepad file but that is just a major irritation, is it possible to store variables externally to avoid the hassle of writing to multiple notepad files or using delineators?
There are multiple possibilities. In all cases this is called persistence.
Store to file
Store to file
Store to database
Java DB tutorial
Send it somewhere
Simple REST web service and client
In principle 3 is not persistence, but it is a way to get the data out of the volatile memory.