Joe Ess

+ Follow
since Oct 29, 2001
Joe likes ...
Linux Mac OS X Windows
Forum Moderator
Joe Ess currently moderates these forums:
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 Rancher Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Joe Ess

Awesome in-depth look at the design and restoration of an original Apollo Guidance Computer.  

Puts my tinkering with a Raspberry Pi to shame!
4 days ago
A class on Logic.  I was never good at math and had little interest in computers (There was no JavaRanch in 1990 to help us noobs!).  I was taking a lot of electives in anthropology and philosophy, so I signed up for a course in Logic thinking it would be about Rhetoric.  That's where it started, but it quickly moved on to Mathematical logic like Boolean logic and formal proofs.  For some reason, probably because it wasn't presented as boring old numerical "math", everything clicked into place and it opened up a whole new path for me.  I finished my Bachelor's degree in Literature and wound up getting a second Bachelor's degree in Computer Science thanks to that class.  
1 week ago
The Struts team has announced the End of Life for Struts 2.3.  For the next six months, they will remediate security issues as practical.  After six months, approximately May 2019, Struts 2.3 will no longer be updated.
See the announcement here
Update your applications to Struts 2.5 as soon as possible.  There is an upgrade guide in the Struts documentation (note that this article is part of the deprecated Struts documentation Wiki.  Please post if you find a more up-to-date source).
3 weeks ago
Are your application and web service deployed in the same container?  Perhaps it is time to reconsider your deployment strategy.  A web service should "always" be available (at least in the eyes of its dependencies).
I don't think Struts has any features that one could use to implement the desired function. However, Struts is built on top of the Java Servlet Specification, so one could use the functionality found in that API.  It provides classes to listen for servlet lifecycle events, but unfortunately, the ServletContextListener will only get called when a servlet context initialization begins.  There is no way that I can see to be informed when the initialization process is complete.
One could use a ServletContextListener to create an executor to schedule a task to read from the web service.  This is not an ideal solution because you would need to figure out a reasonable delay for the web service to come up, but your delay cannot be so long that a user would be able to access the application before it is initialized.
Another way one could use servlet lifecycle events is to create a HttpSessionListener which would be activated when someone logs in.  Of course, you'd only want to know about the first login to initialize the application.
Another option would be to use lazy initialization.  The first time someone accesses a feature in your application that requires the data from the web service, it would be fetched from the web service and cached.
3 weeks ago
I took a stab at fixing your URL, but it's still broke.  
1 month ago
What are you trying to do with this bean?  If you just need to display a drop-down list on a form, you should be able to do that with the select tag.
1 month ago
Struts 1.x is past end of life and is unsupported.  If it is at all possible, upgrade to the latest version of Struts 2 or another framework.
If you want to persist a collection to a JSP and recover it later, you have to use indexed properties.  If you aren't displaying the properties on the page, it may be easier to put the value in the session.
1 month ago
By CSP, do you mean Content Security Policy?  I have used Tomcat's httpHeaderSecurity to add protection against malicious requests.  
You should be aware that Struts 1.2.7 has known vulnerabilities to cross site scripting (among other known attacks) and I don't know that a filter at the server layer would protect against that.
If you are concerned about security (including XSS), the solution is to upgrade Struts or move to another framework.
1 month ago
I agree with Tim.
That said, I'm not aware of any BaseDispatchAction class in Struts 1.  There is a DispatchAction, which is an abstract class intended to be extended by the developer and used to create a class with several related execute methods (For example, all the CRUD methods for a particular piece of data).
2 months ago
Does the popup window have an address bar?  If not, turn it on and see what the URL is.
Look at the source code of the page in the browser.  The generated "a" tag is probably different from the html:link tag.
2 months ago
I'm thinking the action attribute was added in a later version. I'm looking at the Struts 1.3 documentation and it does have the action attribute.
You could try upgrading Struts to a later version but that may have other side effects.
Another option is to use Java code in a scriptlet to construct your link, but that is considered "bad practice"
2 months ago
Struts 1 is past end of life and is not supported.  
That said, the error JSPG0218E is usually caused when a custom JSP tag references a property that the corresponding tag class does not have a setter for.  Looking at the documentation for LinkTag, it does, in fact, have an "action" property.  
What version of Struts 1 are you using?
2 months ago
I think I've gotten to the bottom of this.  It turns out that secure cookies are not sent to the server with an HTTP request see here and here.  
I tried the demo with HTTPS and it works fine with secure cookies.