no can't do ..........:)
modify your checkId() to pass in the session object like below:
karen wrote:
> hello,just as you say,to use out.println() method,we need to add like this
> func(JspWriter out)
> {
> }
> if I want to use a Session method,just as session.putValue() or
>session.getValue(),how can I realize?and more if I can call a bean in a jsp
>function?just like below:
>
> <jsp:useBean id="chk" scope="page" class="Alpine.chkBean" />
> <%!
> int chkID(String strBar, HttpSession session)
> {
> // Session session;
> String strID=""+session.getValue("ID");
> String strPassword=""+session.getValue("Password");
> int flag;
> flag=chk.chkID(strID,strPassword,strBar);
> if(flag==1)
> return 1;
> else
> return 0;
>
> }%>
>
And call it inside your scriplet like this:
<%
int ret checkID( strBar, session ) ;
%>
>
> Thanks a lot!
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets