upload file from java application on mobile to web server - java

i would like to know if it is possible for me to upload say a text file on the web server of my webhost (000webhost.com) directly from my mobile phone java application. Actually i want this java application me and my college friends are developing to send a text file to the web server that would be plotted by this applet on the website. I somehow need to get the text file from java (mobile phone) to the webserver . Now the url the java application should access is net2ftp.com which asks for a few details like username, password, FTP server etc that should be auto entered by the java code (like these details are provided in the java script and it logins me in automatically) the next page after login is net2ftp.com/index.php which has an upload tab ...this tab should also be auto clicked by the java script and then it asks me to choose the file to upload and then click the upload button.....does any one has any idea if
a) this approach is practical?
b) any scripts you have ever come across that could help in achieving this ?

this could help..
the sample is from Nokia, you can use this to upload a file to a http server,
this might help regarding the authentication bit.

Related

reading logs and displaying them on a web browser using Java

I have logs in folder /home/a/b (located in a remote server)
I want to display logs in my web browser using Java. To get data in the folder /home/a/b and to display them on my web page, what are some methods(API) I can use?
The simplest approach I can imagine is using a SSH API like JSch,
but I don't know how performatic this is.
Anyway, here goes a good example:
https://stackoverflow.com/a/9019095/7528396
Note that you can read the remote file and render line by line.

Can you get Windows (AD) userid in JSP (Firefox & IE)?

We are in the process of developing a JSP based Web application. This application needs the logged in user ID from the local PC (Windows / Ubuntu?)
This can be achieved with the help of VBScript on the but unfortunately this solution will work only on Internet Explorer
Are there any ways to get the Windows (AD) user ID in Firefox as well as IE using JSP?
My requirement is very simple. I will store a list of User ID's on my Web application (XML file preferably) and will verify against the request and if the logged in user on Windows matches my list, the user can use my application.
This is a very simple application and the user base is very minimum.
Setup: Apache Tomcat v7.x, JSP
This question may have been asked many times but I still don't see a proper way to do this
I guess what you are looking for is Windows Authentication. Tomcat has built-in support for what you want.

Java Listener for data sent from my mobile to a java application

So here' my basic idea:
I have an android application which will read a barcode and generate an equivalent string. That string will be sent to my PC.
I have a java GUI application which has a TextField which will be automatically filled with that string whenever it is sent from my mobile to my PC.
So how do I do this and what will I require.
Try the following:
Create a web application to receive input from the phone. The location of this application at run time is not important; you will only need to know the URL to access it.
Post the information from your phone to the web application using an HTTP Post Request.
there is no next step.

How to upload a file by using javaGUI(java application) to google app engine

I need a help with upload a file to google storage(blobstore or google cloud storage), and i already did that send a message to server and then the server will response the message back.
There are the code i alredy did a little bit below, could anyone help me how to upload a file to clound storage by using java application.
I dont use jsp or html as a upload interface, i design a simple javaGUI to upload a file when click a upload button.
I can not find any reference online, most of cases used jsp, html or php as a interface to upload a file.
i had some problem with code posted, so i put my code in the dropbox.
Server side:
enter link description here
Client side:
enter link description here
First of all you will have to complete the fully functional example that actually works for uploading files on Blobstore or Google Cloud Storage. No matter what are you going to use for uploading stuff, this is a must thing to do to verify that the backend part works and the part that is done in JSP will be your testing environment for making sure that the backend works before implementing anything else.
Once this is done then all you have to do from your JavaGUI app is to make sure that you know how to upload files using the the multipart file upload POST request.

Java ftp upload and matching the file to website member

So I have a java webapp that lets the user upload a file to a server. I am using apache commons library FtpClient to do that.
I want to be able to match the uploaded file with the user of my website (the web app is only accessible from within the user area on the website). The website and whole user-interaction and management is in PHP / MySQL. So basically, I want to match the file uploaded in the Java webapp with the user in MySQL table who uploaded it.
How should I use PHP on the server to grab that file and match it with the user? Or maybe it's more convenient to do that from Java application somehow? Which approach do you suggest?
You could call a JSP by post with the file name that has been uploaded and the user name or the user id, This can be used to update or insert into a database where you can save the relation between the file and the user.
Hope this solves the issue.

Categories

Resources