Using OGNL to access Static Methods in Struts 2

One of my favorite things that OGNL can do in WebWorks and Struts 2 is call any static method using the OGNL scripting language. You can do this by using the notation

@classname@methodname(arg)
This in the past has worked great for me, but when you are using Struts 2.1.x there is a new properties value that needs to be added to your struts.properties file. Add the following line:
struts.ognl.allowStaticMethodAccess=true

This value is set to false by default, so you are not able to access static methods. Since I was not aware of this, I wasted about a hour trying to hunt down why the method was never being called.

The good thing is that you can still access static constants using OGNL by calling

@classname@CONSTANT

For more info on this change check out JIRA WW-2160

Posted on Aug 24, 2009 by Mike Jennings in Java | 0 Comments | Permalink

Hello Moto! I got a smart phone.

I have been wanting a smart phone for a while now but have been holding off because I am currently under contract with Verizon for another year. Since I was under contract I figured the only way for me to get a new phone, that could do more thing that I wanted to do was buy one flat out. Well I did not want to pay the $400 it would take to buy a brand new phone without having a contract, so that got me started looking on the internet for used phones.

During my search I decided that I really did not have a clue as to what brand of phone I wanted. Since I had no brand in mind I started to think about what functions that I would like to have. I found out that all I really wanted to be able to do was SMS Text Messaging, Surf the Web, Check Email, and tether my phone to my laptop. Since all I was worried about was the pretty standard features on any smart phone, I really did not care which one I got.

So one day I just went onto Craigslist and did a search for the cellphones that were being sold today. I then just emailed everyone and took the first one that I came across. I ended up with a nice, and hardly even used, Motorola Q9C. I was really happy to get this one because my brother has the same model and loves it. I only had to pay $60 for the phone so that was a deal in my opinion, especially when Verizon was selling refurbished ones for $50 when you sign up for a two year contract.

Now that I have my phone, I would not trade it for anything in the world. I also decided to go ahead and unlock the phone. This allowed me to modify the registry setting in Windows Mobile 6.1 to adjust some power settings, and also increase my internet speed. I also can easily tether my phone to my Windows Laptop and get all of my information in sync. The internet speed when using the cellphone as a modem is pretty nice too.

I am still pretty amazed that I could go and buy a phone on Craigslist and take it into the store and activate it. The price was great, the quality is really great too. I don’t think that I will ever buy a phone under contract again. There are so many used phones floating around out there, that I will just pick up someone’s leftovers.

Posted on Aug 19, 2009 by Mike Jennings in Mike | 0 Comments | Permalink

Work has been Crazy!!!

I was looking though my blog archives to see how much I have been posting recently, and noticed that it has not been much at all. I have been so busy at work, that I have not had time to do anything else but work on that. That is not a bad thing, since it is good to be busy and I know that I have a job, but I would like to try and make some more time to update the content of my blog.

At work we have been right at the end of the 1st phase of implementing a PeopleSoft ERP system. This has been a crazy thing and has required many long hours of work to get things done. I work in the Identity Management Systems, and we have had to change some process to get data from the new system, along with adding some new and interesting pieces to support Guest Accounts, Test Environments, Integration Environments, User Impersonation Environments, and Single Sign-On.

I have mainly been in charge of working with different groups to Implement Shibboleth Single Sign-On for these applications. This has been a challenging thing for me in general. I am required to not only work with many different teams, but educate them about Single Sign-On, provide guidence on how to implement it into there applications, and make sure that things get done with resources that I have no control over.

Now that we have completed the 1st Phase it seems like they want to jump right into the next phase of the project. I hope that things go easier with this and I can start posting some new things to my site. The one good thing about being this busy is that I have learned a lot of new and interesting things along the way.

Posted on Aug 07, 2009 by Mike Jennings in Mike | 0 Comments | Permalink