Hung Sam

+ Follow
since Aug 23, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Hung Sam


can anyone suggest a way to handle exception in ServletContextListener?

I have a ServeltContextListener class that creates a database connection, then sets that connection as an attribute in ServletContext. The code for creating the database connection may throw exception (FileNotFoundException, IOException, etc). The question is should we catch these exceptions? and if yes what is the best way to do that?

thanks a lot!
Hi Sawan,
Thanks for the reply.
But in Chapter 9 (HFS&J) page 472, it says that a <body-content> element can be:
+ empty
+ scriptless
+ tagdependent
is it an error? or did i miss-interpret it?

In HFS&J page 512:
"The body of a tag that invokes a simple tag handler is encapsulated in the JspFragment object"
and the next line:
"The crucial thing you must remember about JspFragment is that it must NOT contain any scripting elements"
Just wondering what will happen if i set the body-content to JSP
<body-content>JSP</body-content> (that will allow scripting in the body of a tag)
Help me, please!!
Hi everybody,

Any suggestion on how to prepare for the essay exam?

thank you all
Hi all,

I am at the final state of completing the assignment.

+ Currently I donot use any property file (as they are not required), and I also dont implement and GUI configuration for the server. The datafile location is hardcoded.Will I get automatic failure in doing it that way?

+ My GUI client behaves exactly the same in both "alone" mode and "no flag" mode. In both modes, it allows user to select the database location, either local or remote. When a local database is selected, no network code is used.At anytime, user can disconnect the current database and select a different database. Will i get automatic failure in doing it that way?

Thanks all
Hi everybody,
This forum has been very useful. I have been able to solve many problems by reading other people's posts.
And I am having another question regarding to RMI and Thread. Any help would be very much appreciated.

The RMI Specifications say:
"A method dispatched by the RMI runtime to a remote object implementation may or may not execute in a separate thread. The RMI runtime makes no guarantees with respect to mapping remote object invocations to threads."

my question is
Should i assume that concurrent requests from clients are handled by RMI (which, accoring to some articles, is not scalable)?


Should i implement a RMI server that places all requests from clients to a queue, then have a group of Threads that process these requests and send the results back to the clients.

Any suggestions from Java Experts out there