how to......

T

tiewknvc9

What would you use to have a java application (not an applet), upload a
file to an internet site, and then have that internet site modify the
file and return it to the user.

Steps... I think

1. send the file to the web site from the application. (need advice
with this)
2. the website analyzes the file, and prices out its cost. (got this
part down with a practice application)
3. the user buys the rights to use the file. (via paypal, I think (not
done yet))
4. the website decypts the file (got this part with a practice
application)
5. sends to the file back to the user. (need advice with this)

I am a good application programmer, and am open to learning a new piece
of java technology for this. I have tomcat running on the web server
so I know that java will run on the server.

I just dont know where to start...
 
C

Chris Smith

tiewknvc9 said:
What would you use to have a java application (not an applet), upload a
file to an internet site, and then have that internet site modify the
file and return it to the user.

Since you say you're using Tomcat, I'd use HTTP for the task. Just
create a servlet on the server to handle it, and that connect and send
the file data via HTTP from the client. There's a nice HTTP client
library called Jakarta Commons HttpClient that makes this fairly easy.

You'll be using Tomcat? You do know how to use servlets, right?

I'm not entirely clear on what you mean here:
1. send the file to the web site from the application. (need advice
with this)
2. the website analyzes the file, and prices out its cost. (got this
part down with a practice application)
3. the user buys the rights to use the file. (via paypal, I think (not
done yet))
4. the website decypts the file (got this part with a practice
application)
5. sends to the file back to the user. (need advice with this)

So, since #1 and #5 are separated by a whole interaction with PayPal, I
will assume that the sending of the file and the receiving are
significantly separated in time, and thus will happen in two HTTP
requests. You have a few questions to handle:

1. How do you know what file to send back in step #5? Can the user just
tell you by using some identifying information, or do you need to give
the user some kind of token? Or perhaps store some session information
to keep track of it?

2. How do you interact with PayPal and discover that the user has bought
the product?

There are a number of solutions to #1, depending on the exact situation.
If you need help with it, go ahead and ask... but give more details on
what you're doing.

#2 is potentially quite difficult, but I don't know anything about it.
I am participating in a boycott of PayPal now and I never used them
seriously for anything, so I know less about it than most. Perhaps they
have some kind of SOAP API or the like. In the worst case, you can
probably set up a special mailbox and have your code poll for email
announcing new purchases.
 
T

tiewknvc9

hmmm.... is there something that you would suggest using besides
paypal? I just went with paypal because I know them, their a
relatively trusted name, but if you know something better, Im all ears!

Meanwhile... Im going to look into servlets

thx
 
C

Chris Smith

tiewknvc9 said:
hmmm.... is there something that you would suggest using besides
paypal? I just went with paypal because I know them, their a
relatively trusted name, but if you know something better, Im all ears!

I didn't really mean to tell you not to use Paypal. You can make your
own decision. I avoid them because they operate as a bank while working
hard and hiring plenty of lobbyists to avoid being legally classified as
a bank (at least in the U.S.) so as to avoid certain legal protections
for those who have accounts with PayPal. I don't have exact details,
but there are any number of places on the Internet where you can, if
you're interested, read about ways that PayPal regularly freezes
accounts without cause and acts in other rather heavy-handed ways that
would be outright illegal and possibly punishable as fraud with prison
time if PayPal were operating under U.S. banking regulations. Google
for "paypal fraud" turns up a few things.

I don't know of an alternative that operates in exactly the same ways.
You could go the way of traditional merchant accounts with a bank and
payment gateways, but it may (or may not; I don't know) be more
expensive unless you have a relatively high volume of sales. The
ecommerce work I've done is with an existing merchant account owned by
my employer and clients, so I don't know much about costs.
Meanwhile... Im going to look into servlets

Yes, you'll definitely need to do that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top