A
autogoor
Hi:
I am writing a web app with Servlet and Jsp. The app requires user
login. The user information is saved to a session bean. I then check
all request to server for the login information. Request without right
login information in the session will be denied. All those are pretty
standard.
One part of the project is to develop a upload Applet. User first login
to my site, go to the upload page, and then upload files to the server
with my Applet. One the server end, I have a servelt, say
"ReceiveServlet", to parse the upload which is in MultiPart format.
Before the parsing, the servlet also check the request for user login
information and deny the request if user did not loged in. My applet is
embeded in a jsp page, say "upload.jsp". User has to login to visit
this page.
My question comes with the Applet. When I wrote the applet, I frist
create a conection with HttpURLConnection. Then I post the binary data
in mutlipart format to "ReceiverServlet". There are some examples
online about how to do this. My question is:
1. When I post the data to server, is the login information in the
request?
2. Should I construct a new HttpURLConnection in my applet? What is
the relationship between this connection and my jsp session?
3. Is there a way to get the jsp session information and jsp
connection inside a Applet?
Thanks,
Autogoor
I am writing a web app with Servlet and Jsp. The app requires user
login. The user information is saved to a session bean. I then check
all request to server for the login information. Request without right
login information in the session will be denied. All those are pretty
standard.
One part of the project is to develop a upload Applet. User first login
to my site, go to the upload page, and then upload files to the server
with my Applet. One the server end, I have a servelt, say
"ReceiveServlet", to parse the upload which is in MultiPart format.
Before the parsing, the servlet also check the request for user login
information and deny the request if user did not loged in. My applet is
embeded in a jsp page, say "upload.jsp". User has to login to visit
this page.
My question comes with the Applet. When I wrote the applet, I frist
create a conection with HttpURLConnection. Then I post the binary data
in mutlipart format to "ReceiverServlet". There are some examples
online about how to do this. My question is:
1. When I post the data to server, is the login information in the
request?
2. Should I construct a new HttpURLConnection in my applet? What is
the relationship between this connection and my jsp session?
3. Is there a way to get the jsp session information and jsp
connection inside a Applet?
Thanks,
Autogoor