Thank you Richard,

Enclosed please find the java code.
package pagecompile.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.Vector;
import com.sun.server.http.pagecompile.jsp.runtime.*;
import java.beans.*;
import com.sun.server.http.pagecompile.jsp.JspException;
import hello.NameHandler;


public class _hellouser extends HttpJspBase {

    static char[][] _jspx_html_data = null;
    // begin
[file="C:\\JavaWebServer2.0\\public_html\\hellouser.jsp";from=(2,0);to=(3,38)]
    // end

    public _hellouser( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws JspException {
        ObjectInputStream oin = null;
        int numStrings = 0;
        try {
            FileInputStream fin = new
FileInputStream("C:\\JavaWebServer2.0\\tmpdir\\default\\pagecompile\\jsp\\pagecompile.jsphellouser.dat");

            oin = new ObjectInputStream(fin);
            _jspx_html_data = (char[][]) oin.readObject();
        } catch (Exception ex) {
            throw new JspException("Unable to open data file");
        } finally {
            if (oin != null)
                try { oin.close(); } catch (IOException ignore) { }
        }
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse
response)
        throws IOException, ServletException {

        boolean _jspx_cleared_due_to_forward = false;
        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                _jspx_init();
                _jspx_inited = true;
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html");
            pageContext = _jspxFactory.getPageContext(this, request, response,
   "", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            out.print(_jspx_html_data[0]);
            out.print(_jspx_html_data[1]);
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\hellouser.jsp";from=(2,0);to=(3,38)]
                hello.NameHandler mybean = null;
                boolean _jspx_specialmybean  = false;
                 synchronized (pageContext) {
                    mybean= (hello.NameHandler)
                    pageContext.getAttribute("mybean",PageContext.PAGE_SCOPE);
                    if ( mybean == null ) {
                        _jspx_specialmybean = true;
                        try {
                            mybean = (hello.NameHandler)
Beans.instantiate(getClassLoader(), "hello.NameHandler");
                        } catch (Exception exc) {
                             throw new ServletException (" Cannot create bean of
class "+"hello.NameHandler");
                        }
                        pageContext.setAttribute("mybean", mybean,
PageContext.PAGE_SCOPE);
                    }
                 }
                if(_jspx_specialmybean == true) {
            // end
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\hellouser.jsp";from=(2,0);to=(3,38)]
                }
            // end
            out.print(_jspx_html_data[2]);
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\hellouser.jsp";from=(4,0);to=(4,46)]
                JspRuntimeLibrary.introspect(mybean, request);
            // end
            out.print(_jspx_html_data[3]);
            out.print(_jspx_html_data[4]);
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\hellouser.jsp";from=(36,2);to=(38,0)]

                    if ( request.getParameter("username") != null )
            // end
            out.print(_jspx_html_data[5]);
            out.print(_jspx_html_data[6]);
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\response.jsp";from=(6,11);to=(7,30)]
                out.println(JspRuntimeLibrary.toString(mybean.getUsername()));
            // end
            out.print(_jspx_html_data[7]);
            // begin
[file="C:\\JavaWebServer2.0\\public_html\\response.jsp";from=(13,0);to=(13,48)]



Richard Yee wrote:

> Ying,
> Can you send us the file
> C:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_hellouser.java?
> That would help in looking at the problem.
>
> -Richard
>
> -----Original Message-----
> From: Ying Sun [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 24, 2000 7:16 AM
> To: [EMAIL PROTECTED]
> Subject: Re: help
>
> Hi there,
>
> I work on this error for several hours,it give me the error message
>
> C:\JavaWebServer2.0\tmpdir\default\pagecompile\jsp\_hellouser.java:109:
> '}' expected.
>             out.print(_jspx_html_data[7]);
>
> but I think I include the } in my file,enclosed please find the jsp file
>
> Thank you in advance.

>
>
> chris
>
> <%@ page import="hello.NameHandler" %>
>
> <jsp:useBean id="mybean" scope="page"
>           class="hello.NameHandler" />
> <jsp:setProperty name="mybean" property="*" />
>
> <html>
> <head><title>Hello, User</title></head>
> <body bgcolor="#ffffff" background="background.gif">
>
> <%@ include file="dukebanner.html" %>
>
> <table border="0" width="700">
> <tr>
> <td width="150"> &nbsp; </td>
> <td width="550">
> <h1>My name is Duke. What's yours?</h1>
> </td>
> </tr>
> <tr>
> <td width="150" &nbsp; </td>
> <td width="550">
> <form method="get">
> <input type="text" name="username" size="25">
> <br>
> <input type="password" name="pswd" size="25">
>
> <br>
> <input type="submit" value="Submit">
> <input type="reset" value="Reset">
> </td>
> </tr>
> </form>
> </table>
>
> <%
>     if ( request.getParameter("username") != null ) {
> %>
>
> <%@ include file="response.jsp" %>
>
> <%
>  }
> %>
>
> </body>
> </html>
>
> response.jsp
>
> <table border="0" width="700">
> <tr>
> <td width="150"> &nbsp; </td>
>
> <td width="550">
>
> <h1>Hello, <jsp:getProperty name="mybean"
>         property="username" />!
>
> </h1>
> </td>
> <td width="150">
> <h1>
> <jsp:getProperty name="mybean" property="pswd"/>!
> </h1>
>
> </td>
> </tr>
> </table>
>
> package hello;
>
> public class NameHandler {
>
>     private String username;
>     private String pswd;
>
>     public NameHandler() {
>         username = null;
>         pswd=null;
>     }
>
>     public void setUsername( String name ) {
>         username = name;
>     }
>
>     public String getUsername() {
>         return username;
>     }
>
>     public void setPswd( String word ) {
>         pswd = word;
>     }
>
>     public String getPswd() {
>         return pswd;
>     }
>
> }
>
> ===========================================================================
> 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

===========================================================================
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

Reply via email to