Brent Sterling

Ranch Hand
+ Follow
since Feb 08, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Brent Sterling

Where do you live Vishal? There are some beers that are very sour (especially some Belgian and French beers) but sour is not how I would describe most beers...at least not in the US. Bitter is a term that applies more often, but it is not necessarily a bad thing. Beer is an incredibly complex drink with a wide range of styles and flavors (sweet, malty, roasty, sour, bitter, fruity, etc.)

Not meaning to start a war, but the US is the best place in the world these days for a beer geek...errr...beer conisure, and this might be the best time as well! American craft breweries make incredible and unique American style beers and styles from around the world plus you can get beers from all over the world imported here. Tomorrow I am heading to a weekend event focused around home brewed beer (with lots of commercial beer and good food mixed in).

It is good to be a beer geek!

- Brent
13 years ago
Since Dave's book is about Struts 2 I will take this one...

Do you understand the validation framework and ValidatorForm? The difference between the two form classes is that ValidatorForm is based of the name of the form and ValidatorActionForm is based off the name of the action. I do not recall ever using ValidatorActionForm, but the two give you a little more flexibility in your validation...say if you have multiple actions that use the same form and you want the validation to be different.

The second hit on a Google search looks pretty good:
http://www.laliluna.de/struts-validatoraction-form-tutorial.html

- Brent
16 years ago
Use the paramId and paramName attributes of the link tag:

http://struts.apache.org/1.1/userGuide/struts-html.html#link

- Brent
16 years ago
Thanks...I have not personally been able to see the "several minutes" load time. I did try another computer with a 1.5 GHz Mobile processor using IE 6 and a 2 GHz computer with IE 7 and they were both in the 15 - 30 second range. For most of the time the CPU is pegged out and nothing is transferring over the network.

Oh well...we have been getting more request for suggest type lists so it looks like this is a good place to start.

- Brent
I am not sure anybody would have a quick solution to this but I figured that it would not hurt to ask. I have a page that has two select lists that contain about 4000 items each. Okay...having these huge select lists may not be the best user interface but that it another topic. On my computer the page loads in 2-3 seconds in Firefox but takes around 15 seconds with IE 6. Testing with IE on some tablets that are several years old (not sure what CPU) shows that the page takes several minutes to display with IE (don't have Firefox on the tablet...IE is what the client uses).

Longer term I would like to migrate to an Ajax based "suggest" list but that is not going to happen today. Have others noticed this type of performance difference between IE and Firefox? Anybody know if IE 7 is better? Is there anyway to speed this up in IE 6?

- Brent
I generally figure that if I have to think for more than a few seconds about how to code something using tags in the jsp then it is better to just move the logic into the action form class. I am not sure what you are testing here...if you are comparing two form properties you could add a method that returned a boolean and use logic:equal or maybe you could create a method that returned the needed property as all upper (or lower) case.

- Brent
16 years ago
Yes, a form bean can extend another form bean. I do this on occasion. The validator framework does not know about inheritance, so you have to duplicate validation for each base class.

- Brent
16 years ago
Could you describe what you mean by "sometimes not"? Are you getting a specific error?

- Brent
16 years ago
Note that IE has a "feature" where if you open a new window via the File>New Window menu or Ctrl+N that the new window will interact with the same session. If you launch a new IE browser (say from the Windows Start menu) then it will use a different session.

- Brent
16 years ago
Got my book yesterday. Thanks a bunch to Frank Zammetti and Apress. I have just started with the book but it looks good and I think I will like Frank's writing style.

- Brent
Did you figure this one out? I don't see any problems with the "code" attribute. I see an error about "barCode" but I do not see that in your JSP or Java code.

- Brent
16 years ago
Posting the same question twice is not recommended....plus I do not see anything in your question that is related to Struts.

- Brent
16 years ago
I will add this...I only really started to understand Struts when I took the time to understand the underlying technology...mostly HTML/HTTP and the basics of servlets. Struts 1 is really a pretty thin wrapper that saves you from some of the plumbing of a pure JSP/Servlet solution but if you don't understand how a form is submitted, the difference between a forward and a redirect, or how the request is used you will never really understand how Struts works.

- Brent
16 years ago
You can do this with jstl tags, but if you want to use the Struts tags then it seems that you would want to use logic:empty and logic:notEmpty.

- Brent
16 years ago
I started to type up a response but the following article (almost 10 years old) does a better job:

http://www.javaworld.com/javaworld/jw-12-1999/jw-12-ssj-jspmvc.html

Nothing is "mandatory" but if you have ever worked on a project with 2000 line JSP files you will know how hard they are to develop, debug and maintain.

- Brent
16 years ago