Jim Hardin

Ranch Hand
+ Follow
since Aug 02, 2006
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 Jim Hardin

Ronan,
What about something like:

In your Struts Message Resources
page.one={$} is out of the office
page.two={$} is on another planet


In your action(s):




Or what about instead of putting it in your action, using "bean-el:message" in your JSP something like:


Good luck!
-Jim
[ July 24, 2007: Message edited by: Jim Hardin ]
11 years ago
I'm currently using 1.2.9 which I believe is the same -- the code fragments you posted looks correct to me. Do you have the TilesPlugin / TilesRequestProcessor registration in your struts-config.xml? What error(s) are you getting? Good luck...
-Jim
11 years ago
As a tiles user, I would describe it as a templating framework which tries to achieve centralization of layout-code and layout-logic. That is, Tiles provides a mechanism whereby all of the web application's layout-code and layout-logic can be in one spot, and not strewn amongst all the various JSPs. See the Tiles features blurb for details.
-Jim
11 years ago
I don't know if this helps, but it seems to me it would be easier to make the "salary" Form Bean property/instance-variable a numeric type from the outset.
-Jim
11 years ago
Manish,
Not that you need to explain it to me -- this is your question after all, but I don't quite understand why:

won't help you with your goal of:


The purpose is to overwrite a value of one of the attributes of the form bean


-Jim
11 years ago
Is your struts-config.xml really getting packaged in your WAR (try looking inside, via "jar -tvf" or winzip to make sure), and is it really getting packaged in your WEB-INF dir. If that all checks out fine, maybe your editor is putting some extended-ASCII characters in the file, possibly invalidating it? What happens if you do an XML validate of "struts-config.xml" (using any XML validation tool you might available, Eclipse, NetBeans, Spy)? Good luck.
-Jim
11 years ago
How about:

-Jim
11 years ago
I think you're confusing HttpServletRequest "attributes" with HttpServletRequest "parameters". I think you want
. Hope this helps.
-Jim
11 years ago
"onclick" gets rendered as a standard HTML input control attribute. As you probably know "onclick" just refers to a JavaScript function that will be executed when the element is clicked. Try doing a "View Source" from your browser and look for the resulting <input type="radio" >.
-Jim
11 years ago
It sounds like the size/number-of-elements in your collection is different between when the page is navigated to the first time, and when the page is (later) refreshed. This is a function of the actions which are forwarding to this page. You might want to have a look at any and all actions which access the collection "completeList". Sorry that's the best I can do... Good luck.
-Jim
11 years ago
Jar(ring) up your WebApp release components and putting them in WEB-INF/lib works the same as leaving them expanded in WEB-INF/classes. The only difference is that the container does look in WEB-INF/classes before WEB-INF/lib. Putting your resource bundle in a jarfile in WEB-INF/lib is not a problem. What happens when you "jar -tvf common.jar" or try opening common.jar from WinZip. Is your "ApplicationResources.properties" really in folder com/myApp/resources? This should work fine--something else is going on...
-Jim
11 years ago
The formal term for what you are looking-for/describing is, "Bread Crumbs".
Struts Layout has a Bread Crumb implementation. I haven't used this, so I cannot comment (maybe you can get feedback under "Other Open Source Products" forum). If you want to write your own, I might suggest subclassing the Struts RequestProcessor and doing your own stack maintenence (see). Good luck.
-Jim
[ April 23, 2007: Message edited by: Jim Hardin ]
11 years ago
Thank you, Brent -- have a good one.
-Jim
11 years ago
Brent,
Whoa, very good -- I stand corrected, OrderIndexedForm is quite correct (a setter is not required -- and your explanation makes sense). I was *erroneously* thinking BeanUtils was using reflection and invoking the indexed property mutator on submit (I *erroneously* had Indexed Properties on my brain). My apologies, thank you very much for straightening me out! I am appropriately humbled.
Could you do me a favor, regarding JSP(s) in WEB-INF folder, would you mind citing a source for:

and in fact this is generally the recommended practice


if you have one? I didn't know it was standard practice. Thanks, Brent.
-Jim
By the way, I too have had little luck with using the indexed="true" attribute on the HTML tags, and resort to scriptlet **exactly** as you suggested... Thanks again.
11 years ago
I think this question belongs in "Java >> Java in General (beginner)"
instead of "Products >> Struts". That said, if I understand your question, I think you're looking for:

See also Sun Exceptions Tutorial.
-Jim
11 years ago