Hi all,
I just tried following code:
----------------------------- index.jsp -----------------------------
<%@ page language="java"%>
<%!
private
String getFormatedName(String name){
return name.toUpperCase();
}
%>
Author: <%= getFormatedName( <%= "test" %> )%> </br>
----------------------------- index.jsp -----------------------------
Note: I am trying to use expression to pass an argument to a method getFormatedName(String), which in turn is used in an expression.
On
Tomcat I am getting following error:
A
Servlet Exception Has Occurred
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.
..\work\localhost\_\_0002findex_0002ejspindex_jsp_17.java:63: Missing term.
out.print( getFormatedName( <%= "test" );
^
..\work\localhost\_\_0002findex_0002ejspindex_jsp_17.java:63: Missing term.
out.print( getFormatedName( <%= "test" );
^
..\work\localhost\_\_0002findex_0002ejspindex_jsp_17.java:63: ')' expected.
out.print( getFormatedName( <%= "test" );
^
3 errors, 1 warning
Does that mean we can not use nested Expression in expression in
JSP page?
Please reply ASAP.
Sandesh