on 3/3/01 10:11 AM, "Jon Stevens" <[EMAIL PROTECTED]> wrote:

> while (true)
> {
> Hashtable strings = new Hashtable();
> while (true)
> {
> strings.put ("dead", new StringBuffer(9999999));
> }
> }

Damn. I can't let bad code affect me like that. The above should be written
more like this:

    Hashtable strings = new Hashtable();
    while (true)
    {
        int i = 0;
        strings.put ("dead" + i, new StringBuffer(9999999));
        i++;
    }

That will quickly lead to out of memory errors and because JSP pages
themselves can't catch those (read my essay for examples), there is no real
good way to nicely handle that error and your entire server will be taken
down.

On the converse, with Velocity, you can control what is in the Context on a
shared server. This allows you to define a nice simple API that your users
can take advantage of (giving them the functionality they need) without
having to worry about taking down the entire server.

Anyway, you get my point.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to