Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"out.println" in function causes "cannot resolve symbol"?

jimcplAug 10 2004 — edited Aug 11 2004
Hi,

I'm somewhat new to JSPs, and have a small JSP that calls an embedded function:

<%@ page language="java" %>
<%!
static void doit(String s)
{
out.println(s);
return;
}
%>

<%
doit("Hi there from testfunc.jsp");
%>

And the above is causing an error "Cannot resolve symbol" on the "out.println()" line.

Is the "out" object not available inside the function?

If so, is there any way to pass "out" to the function, say as "xx", so that I can do an "xx.println()" inside the function?

Thanks,
Jim
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2004
Added on Aug 10 2004
8 comments
1,740 views