This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of Darcy DeClute's Scrum Master Certification Guide: The Definitive Resource for Passing the CSM and PSM Exams and have Darcy DeClute on-line!
See this thread for details.

Rusty Smythe

Ranch Hand
+ Follow
since Aug 09, 2006
Rusty likes ...
Mac Objective C Ruby
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 Rusty Smythe

More importantly, why are you using cookies to store application data?

Cookies are
1) Not reliable - may or may not exist
2) Not secure - may or may not be changed by the user

Google something like "clear cookies javascript" for the answer to your question.
16 years ago
Why do you not want to hard code the file name/location?
16 years ago
So you tried:

stepDO.setInputExampleLocation(Hibernate.createBlob (ff.getInputStream()));

but you got:

setInputExampleLocation - argument type mismatch

16 years ago
You might want to read the FAQ...
16 years ago
Every time you open and close your datasource, you are taking extra time.

You might run a profiler on your data store to see
1) How many connections are being created (is there a maximum limit that you're hitting?), and
2) How fast it takes to open a new connection.

Ideally, you would open your datasource once and leave it open for the life of the user's session; this is the general concept of data pooling.

Check out Hibernate; in my opinion, it is the easiest way to interact with a database once you learn it*.
16 years ago
Ahh, I misunderstood you before.

To set up the select boxes in your view, check out
"How to use HTML OPTIONS."

You can use two methods or have one method return two arraylists (via a DTO).
[ December 15, 2006: Message edited by: Rusty Smythe ]
16 years ago

a) Call model, method #1 from controller - store result in variable #1
b) Call model, method #2 from controller - store result in variable #2
c) Call form setter for field #1, set this to value of variable #1
d) Call form setter for field #2, set this to value of variable #2
e) Forward to JSP
f) Done.

Bonus points: instead of a) and b), call ONE method to get both results; put these results into a DTO, then pass the DTO back to the controller where you extract the values.
16 years ago
Where's the code to


??? Your question is full of red herring, no details and you haven't shown the problem.

We can't help you if you don't give the required info...
17 years ago
More info would be helpful to diagnose and offer suggestions.

What tag?

What exception?

What's the output from System.err?

(Read the FAQ)
17 years ago
This is very easy to do using Ajax, using--for example--the Prototype framework of

In a nutshell, I would set up a servlet to return whatever data is required for the table, based upon the user's combo-box selection, then use Ajax.Updater (from to get the data from the servlet and populate the table when the combo-box's onchange event fired.

This would provide the user with a dynamic application.

(Obviously, Ajax has nothing to do with JSP, per se)

Note: it is not good to store data in the Session that you could retrieve from a data store easily, because it limits the scalability of your application. Too many users = server runs out of memory
17 years ago
... or just Google it.
[ November 14, 2006: Message edited by: Rusty Smythe ]
17 years ago
I'm curious as to why you abandoned Maven.

In my experience, Maven (1.0) makes life very easy, once you have your project directory structure set up according to the convention.

I like it most because with just a single maven command, I can do all of the following:
  • Run unit tests
  • Run database tests
  • package my app (as a WAR or EAR), and
  • Deploy it to my development container.
  • This means there are no more excuses for not doing test-driven development (btw, in my latest project, I have about 250 unit tests so far, and the whole thing runs in just a fraction of a second).

    Sure, you can do the same with ANT, but maven works well without the extensive scripting required by ant. Best of all, I don't have to store all of those gagillion JARs in the source repository. You ever felt the pain of updating your local tree remotely and waiting while 100s of megabytes of common JARs are downloaded?
    [ November 01, 2006: Message edited by: Rusty Smythe ]
    17 years ago
    Javascript is probably the easiest way, and it will be the most responsive to the user.
    17 years ago
    You don't want to use client-side validation anyway, except for user convenience (such as immediate feedback).

    Any user can bypass your client-side validation any time. The only validation that is guaranteed to run is server-side. It is generally good practice to assume that all data you are receiving from the client will be poor data: improperly formatted (e.g., 2.000,40 instead of 2,000.40 or vice versa), incorrectly typed (e.g., alpha instead of numeric), and out of bounds (e.g., a date of 2006-20-20). Make the effort to handle such general problems, and your validation will be able to handle most problems.
    17 years ago
    sivakiran, demaning that someone solve your problem is not going to get anyone to help you at all. I suggest you read the FAQ thoroughly.

    Let me point you in the general direction: sessions are stored on the server, not on the client.
    17 years ago