Archive for the ‘JCatapult’ Category.
January 16, 2008, 6:12 pm
I’ve been working on getting the JCatapult security framework to leverage Struts actions rather than a bunch of configuration and additional custom code. In order to pull all of this off, I had to modify the HttpServletRequest in order to make it seem like the requested URI was different than the original request URI. I used a HttpServletRequestWrapper in order to pull this off like this:
final HttpServletRequest httpRequest = (HttpServletRequest) request;
HttpServletRequestWrapper wrapper = new HttpServletRequestWrapper(httpRequest) {
@Override
public String getRequestURI() {
return successfulLoginURI;
}
@Override
public String getServletPath() {
return successfulLoginURI;
}
@Override
public RequestDispatcher getRequestDispatcher(String uri) {
final RequestDispatcher rd = httpRequest.getRequestDispatcher(uri);
return new RequestDispatcher() {
public void forward(ServletRequest servletRequest, ServletResponse servletResponse)
throws ServletException, IOException {
rd.forward(httpRequest, servletResponse);
}
public void include(ServletRequest servletRequest, ServletResponse servletResponse)
throws ServletException, IOException {
rd.include(httpRequest, servletResponse);
}
};
}
};
As it turns out, I had to do that little tricky part at the end with the RequestDispatcher because Tomcat fails during a forward if the incoming HttpServletRequest is a wrapper.
January 3, 2008, 12:49 pm
It’s 2008 and I’m hoping to start blogging more regularly again. To start, I figured I’d tell my readers my plans for 2008. Here’s the quick run down:
1. Continue building Inversoft’s Profanity products and increase sales
I did a lot of work last year getting the profanity database and filter working well. These products are slowly selling and Inversoft is getting more customers each week. I’m hoping to add some more advanced logic this year to reduce false positives even further.
2. Rebrand Inversoft and finish the website redesign
We have been working with the excellent designers from We Are Super Ordinary to rebrand Inversoft with a new logo and a new website presence. This should help us leverage our website as a good marketing tool for the business
3. Launch JCatapult and promote the heck out of it
JCatapult is starting to get to a 1.0 stage. I’m hoping to finish up the last few things in the next couple of weeks, including migrating SmartURLs into the Struts source repositories and make it one of the default plugins shipped with Struts. JCatapult will be based primarily on Struts2 and the SmartURLs port (called the Struts2 Convention Plugin). Once that migration is complete, JCatapult should be ready for a solid beta release.
4. Build a web application as a JCatapult example
I’ve had a few ideas and domains registered for nearly 7 years now and I’m going to try and build out one of these ideas using JCatapult. Hopefully I can find 3-4 developers that are interested in helping build this application in their spare time. Anyone who is interested, send me an email.
That’s the run down for 2008. I’ll try and post a few times each month on my progress, in addition to the standard technical ramblings I put up, which usually get more traffic than the rest of my posts. Time to get coding! Happy New Year!