File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes void return type in JSP expression Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "void return type in JSP expression" Watch "void return type in JSP expression" New topic

void return type in JSP expression

Anks Gupta

Joined: Mar 27, 2007
Posts: 21
If i m using a method with boid return type in a JSP expression will i get a compile time error or runtime error??
raja ram
Ranch Hand

Joined: Mar 02, 2008
Posts: 169
Surajsingh Thakur
Ranch Hand

Joined: Sep 09, 2008
Posts: 124

Hi Anks..
I think you will get an ERROR...

To conform just see the question/answers in head first <new> from that expression page itself...

BE (Computer Science) SCJP 4 (80%) SCWCD 5 (97%) IBM CAD(98%) IBM CAppD(100%) IBM SD(100%)
Charles Lyons
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
Compile time error -- think about what the translation of a JSP expression does and where the compiler comes into play...

Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
sahil kumar garg sangrur

Joined: Jun 05, 2012
Posts: 19
there is an exception java.lang.NoSuchMethodError because our container does not any method with some return type
I agree. Here's the link:
subject: void return type in JSP expression
It's not a secret anymore!