I'm using the following things for my project: Spring 3.0.1 + Apache Tiles 2.2.1 + Glassfish 2.1. What I'm trying to do is to call some method in a jsp-page and pass some parameters to it. For example, I have a bean:
@Component
@Scope(value = "singleton")
public class TestBean {
public void test(String param){
System.out.println("param = " + param);
}
}
and I have a jsp-page:
<%@page contentType="text/html; charset=utf-8"%>
${testBean.test("hello")}
This code gives me an exception like:
org.apache.jasper.JasperException: The function test must be used with a prefix when a default namespace is not specified
If I call some method without passing parameters to it - everything is OK.
I have tried to put jboss-el.jar in my WEB-INF/lib and put required parameters in web.xml (as explained here), but with no effect.
I'm restricted to the set of technologies that I have listed above, so I can't add anything or, for example, can't change the version of my app-server.
With all these conditions, is there a solution for my problem?