Transfering Data from java to server using jsp

Reply

Join Date: Sep 2008
Posts: 1
Reputation: Gaffer is an unknown quantity at this point 
Solved Threads: 0
Gaffer Gaffer is offline Offline
Newbie Poster

Transfering Data from java to server using jsp

 
0
  #1
Sep 18th, 2008
Hi all,

I'm very new in this area and I'm looking for some help. What I eventually want to do is upload a file from my java application to a server, for the moment I've installed Apache on my local machine for development/testing. The way I see this working (please correct me if I'm wrong) is that the java side tries to POST to the JSP file in the server. So the URL would be something like http://localhost:8080/test/test_upload.jsp

In the test_upload.jsp file there is code that readily reads in the data that has been sent, this could for example be a String or a File.

I'm trying to get a really simple example working first. So just passing a String that gets sent to the server and printed out in the log.

What I'm looking for is the code for both sides of this (java file and JSP file). A simple example of this on a page on the web would be prefect. I've looked everywhere but keep encountering applets and servlets or form data being sent from HTML. Might be that I've been looking for the wrong thing.

Thanks for your help,

Gaff
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 1,175
Reputation: stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light stephen84s is a glorious beacon of light 
Solved Threads: 125
Featured Poster
stephen84s's Avatar
stephen84s stephen84s is offline Offline
Veteran Poster

Re: Transfering Data from java to server using jsp

 
0
  #2
Sep 18th, 2008
I've looked everywhere but keep encountering applets and servlets
If you have encountered this scenario then you have actually already found your answer.

The code in the applets is the client side code, all you have to do is study the networking code in the Applet and implement it in your client application.

And as far as your server side code in JSPs goes ..... I think you should know that JSPs are basically extensions of servlets.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."

"How to ask questions the smart way ?"
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the JSP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC