Win a copy of Kotlin for Android App Development this week in the Kotlin forum!

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

Have you checked the server logs?  Tail the logs when you deploy the application.  Some issues will occur during deployment leaving the application unavailable.
What application server are you using?  I've been having an issue deploying a Struts 2.5 app on Weblogic, but I haven't had time to determine if the issue is something I've done or related to the Struts upgrade.
2 weeks ago
And what happens to that variable in the loop?
2 months ago
Where do you read in the guess?
2 months ago
Awesome in-depth look at the design and restoration of an original Apollo Guidance Computer.  

Puts my tinkering with a Raspberry Pi to shame!
2 months 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.  
2 months 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 months 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 months ago
I took a stab at fixing your URL, but it's still broke.  
3 months 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.
4 months 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.
4 months 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.
4 months 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).
4 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.
4 months ago