Win a copy of Spark in Action this week in the Open Source Projects forum!

Torsten Schippel

Ranch Hand
+ Follow
since May 09, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Torsten Schippel

Hi John,
really a strange problem. I just tested it.
The map function of the FileChannel aquires a lock on behalf of the entire JVM.
To work around you can set
bb=null;
or
bb = fc.map(FileChannel.MapMode.READ_ONLY, 0, 0);
Both seams to remove this lock. Additionally you (may) need to force a System.gc();
The doc say something about different OSs. I used JDK 1.4.2. on Win2K.
HTH
Torsten
16 years ago
Hi Rina,
as Malhar stated its just a normal file upload. You do not need any JavaScript. In fact it is a normal post like any other form submission. The only difference is the encoding. The normal form POST is "application/x-www-form-urlencoded". The file upload is "multipart/form-data".
Using normal POST (login for example) your server component get just String like:
name=John&pasword=xxxxx
Using multipart/form-data POST your server component get something like:
Content-type: multipart/form-data, boundary=---AaB03x
-----AaB03x
content-disposition: form-data; name="anyField"
fieldData
-----AaB03x
content-disposition: form-data; name="upfile"; filename="image.jpg"
Content-Type: image/jpeg (depending on file type)
... image data...
-----AaB03x--
The server component which will decode it will be a servlet in Java. The servlet may use existing classes like
http://www.servlets.com/cos/javadoc/com/oreilly/servlet/MultipartRequest.html.
HTTP file upload is defined by
RFC1867
HTH
Torsten
[ December 23, 2003: Message edited by: Torsten Schippel ]
16 years ago
Hi Venkat,
keep in mind use session beans for the verbs or actions (booking, searching, receiving and also "service") and entity beans for the nouns (date, ticket,...).
a) You may use a session bean DatingService, a DAO for serching process and an entity bean for the date.
b) BookingService-session bean, Ticket-entity
c) SearchService-session bean, DAO for the database search. If you only need a read only functionality you don't need the entity bean services.
d) I don't understand how it should work. It may be a fuzzy search. So it's like c)
Regards
Torsten
Hi Shiva,
try http://www.certmanager.net/sun_assignment/.
There you can see your test history. But no personal information. You can change your personal information on the sun page. I think there will be only one site soon (SUN).
HTH
Torsten
Hi Benny,
I think there is no standard compliant solution for it. Encryption always depends on credentials and algorithms. It should never depend on a client only.
Regards,
Torsten
16 years ago
Hi Pawan,
I think it would not be amiss to have the other certifications but there is no need for it. I took SCEA with a quite similar background (without SCJP etc. and successfully). I think you need a completely other point of view than the developer. So it even may be an advantage.
Just do it!
Regards,
Torsten
Hi ravi,
I think your questions are a little to much related to the assignment. Just make your own decisions and explain why you do it that way. Consider that you should do the architecture only.
Regards
Torsten
Hi,
you have to differ between client side and server side code. Your writeTheFileToStream method is only accessible on the server side (inside of your JSP). So you can't call it from the javascript onclick event.
I would recommend a servlet. Place your code in servlet and call it by URL inside of the javascript function.
Regards
Torsten
16 years ago
JSP
Congratulation!
Regards
Torsten
16 years ago
Hi Ryan,
try a BufferedReader to read the lines posted by your form.

You should find the difference between a normal form POST and an "multipart/form-data" POST.
Then you may be able to write your own multipart parser.
Regards
Torsten
16 years ago
Raj, I didn't show any components in deployment diagram just physical nodes. I made one sequence diagram showing the web tier MVC. Than I used a generic client for the other diagrams. So I had no JSPs there. I disregarded the JSPs completely.
Rethna, the class diagram was tech independent so didn't use any stereotypes.
Regards
Torsten