hi pal,
you cannot give a semicolon after function Myfunc2(),it is an error.
instead of using <% ...%>
write the function code inside <script>...</script> it will work fine
regards
saravana kumar
> ----------
> From: Susan Holden[SMTP:[EMAIL PROTECTED]]
> Reply To: Susan Holden
> Sent: Friday, October 08, 1999 8:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Use ServerSide Functions In JSP
>
> ZhangDong,
>
> You need a semi colon after
> <%function MyFunc2( )
> It's in your first line after <HEAD>
>
> sue
>
> ZhangDong wrote:
>
> > Hi all:
> > I'm trying to use server side functions in JSP files.
> > I have written a JSP page as following:
> > <html>
> > <HEAD>
> > <%
> > function MyFunc2()
> > {
> > return ("The value is returned from server side Function!");
> > }
> > String myStr;
> > myStr = MyFunc2();
> > %>
> >
> > </HEAD>
> > <CENTER><B><H1>This Is the Second Page</H1></B></CENTER>
> > <INPUT TYPE="text" SIZE=12 MAXLENGTH=10 NAME="MyText"
> VALUE="<%=myStr%>">
> > </SCRIPT>
> > </Html>
> >
> > But When I publishing this JSP file to my web server,I get the following
> error message:
> > Error getting compiled page.
> > C:\WEBSPH~1\APPSER~1\servlets\pagecompile\_MyPage2_xjsp.java:62: ';'
> expected.
> > Function MyFunc2()
> > ^
> > 1 error
> >
> > Who can tell me the error?
> > Thank advance!
> > I'm using IIS4.0 + webSphere2.0
> >
> >
> ==========================================================================
> =
> > To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> > FAQs on JSP can be found at:
> > http://java.sun.com/products/jsp/faq.html
> > http://www.esperanto.org.nz/jsp/jspfaq.html
>
> ==========================================================================
> =
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> FAQs on JSP can be found at:
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html