I was quite annoyed by the fact that you can’t just call a method with certain parameters using JSTL. Lucky me, google gave me a result where I could see how this is done (using JSP 2.0).
The thing is, you need to create a static method with the required parameters and then you need to define a TLD to be able to call the function. This process can probably be simplified by using a tool like XDoclet so your TLD is generated automatically, but I didn’t look into that, yet.
Another way to do it is described by Lucas Jellema on the AMIS blog. But I don’t call this a real solution, just a very dirty hack. I respect him for his posts on Oracle, but I don’t like this solution at all.
What’s wrong with creating a custom tag with attributes which you can use for the parameters? It’s powerful, it’ll result in more readable JSP and you should end up with a nice tag library JAR file which you can easily reuse.