that was the complete page.
The problem was found. When calling the method,  I needed to pass <% 
AuthenticateUser(request, response, out); %>

Here's the complete working page:


<%@page contentType="text/html; charset=iso-8859-1" language="java" %> 
<%@page import="java.sql.*,javax.sql.*,oracle.jdbc.pool.*,javax.naming.*,java.io.*"%>
<%@page errorPage="/app/tate_error.jsp" %>
<html>
<body>
<% AuthenticateUser(request, response, out); %>
</body>
</html>

<%!
public String AuthenticateUser(HttpServletRequest request, HttpServletResponse 
response, JspWriter out) throws Exception {

        out.println("This is working with JSPWRITER out.");
        return "hello";

}
%>


thanks!


-----Original Message-----
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]] 
Sent: Monday, August 19, 2002 9:05 AM
To: [EMAIL PROTECTED]
Subject: Re: Declaration blocks and JSP


can u pls post the complete page?

-----Original Message-----
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:50 PM
To: [EMAIL PROTECTED]
Subject: Re: Declaration blocks and JSP


With this:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" 
import="java.sql.*,javax.sql.*,oracle.jdbc.pool.*,javax.naming.*,java.io.*"
errorPage="/app/tate_error.jsp" %>
<html>
<body>
<%

%>
</body>
</html>
<%!
public String AuthenticateUser(HttpServletRequest request, HttpServletResponse 
response, JspWriter out) throws SQLException { {

 out.println("This is working with JSPWRITER out.");

}
%>


I get this error message:
Generated servlet error:
    [javac] Compiling 1 source file
/usr/local/tomcat8081/work/Standalone/localhost/tate/app/login2_jsp.java:23:
illegal start of expression
  private static java.util.Vector _jspx_includes;
  ^
/usr/local/tomcat8081/work/Standalone/localhost/tate/app/login2_jsp.java:25:
illegal start of expression
  public java.util.List getIncludes() {
  ^
/usr/local/tomcat8081/work/Standalone/localhost/tate/app/login2_jsp.java:70:
';' expected
  }
   ^
/usr/local/tomcat8081/work/Standalone/localhost/tate/app/login2_jsp.java:71:
'}' expected
}



Any ideas?

-----Original Message-----
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 8:47 AM
To: [EMAIL PROTECTED]
Subject: Re: Declaration blocks and JSP


use:

public String AuthenticateUser(Connection conn, String username,HttpServletRequest 
request, HttpServletResponse response, JspWriter
out) throws SQLException {


It must definitely work!


-----Original Message-----
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:26 PM
To: [EMAIL PROTECTED]
Subject: Re: Declaration blocks and JSP


how would I do that?

I tried public String AuthenticateUser(Connection conn, String 
username,HttpServletRequest request, HttpServletResponse response) throws SQLException 
{


but that didn't work.



Does someone have an example?


thank you!


Troy Campano

-----Original Message-----
From: Emmanuel Eze [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 8:28 AM
To: [EMAIL PROTECTED]
Subject: Re: Declaration blocks and JSP


you'll need to pass them explicitly to ur method

-----Original Message-----
From: Campano, Troy [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 19, 2002 3:19 PM
To: [EMAIL PROTECTED]
Subject: Declaration blocks and JSP


When I use a declaration block to write a method like this:


<%!
public String AuthenticateUser(Connection conn, String username) throws SQLException {



}
%>



I am not able to use some Servlet/JSP functions like request, response, or 
out.println. The JSP compiler (Tomcat) can not find them.

Is there something special I need to do to use these?



thank you!

Troy Campano

==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For 
digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some 
relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

==========================================================================To 
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to