Serious need of help

Discussions

EJB design: Serious need of help

  1. Serious need of help (3 messages)

    Hi all,i'm totally new to Java and JSP programming. So,all i know is how to do simple programs and classes and hav only used Tomcat before. Right now, i have to figure out wat a program is about and it has got lots of code which seems to look like it's generated by Caucho's Resin. Can anybody briefly explain what is the use of Resin? Since it's for an assignment, does the use of these code mean plagiarism or fraud? I'm a total newbie, please help.... Here r the some of the codes:

    /*
     * JSP generated by Resin 2.1.9 (built Tue Apr 15 14:28:40 PDT 2003)
     */

    package _jsp;
    import javax.servlet.*;
    import javax.servlet.jsp.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;

    public class _about__jsp extends com.caucho.jsp.JavaPage{
      private boolean _caucho_isDead;

      public String getServletInfo() { return "database handler"; }
      
      public void
      _jspService(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException
      {
        com.caucho.jsp.QPageContext pageContext = (com.caucho.jsp.QPageContext) com.caucho.jsp.QJspFactory.create().getPageContext(this, request, response, null, true, 8192, true);
        javax.servlet.jsp.JspWriter out = (javax.servlet.jsp.JspWriter) pageContext.getOut();
        javax.servlet.ServletConfig config = getServletConfig();
        javax.servlet.Servlet page = this;
        javax.servlet.http.HttpSession session = pageContext.getSession();
        javax.servlet.ServletContext application = pageContext.getServletContext();
        response.setContentType("text/html;charset=gb2312");
        request.setCharacterEncoding("GB2312");
        try {
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string1, 0, _jsp_string1.length);
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          pageContext.write(_jsp_string2, 0, _jsp_string2.length);
          bbs.bbsUser user;
          user = (bbs.bbsUser) pageContext.getAttribute("user");
          if (user == null) {
            user = new bbs.bbsUser();
            pageContext.setAttribute("user", user);
          }
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          bbs.bbsBoard board;
          board = (bbs.bbsBoard) pageContext.getAttribute("board");
          if (board == null) {
            board = new bbs.bbsBoard();
            pageContext.setAttribute("board", board);
          }
          pageContext.write(_jsp_string0, 0, _jsp_string0.length);
          
    java.sql.ResultSet sqlRst;
    sqlRst=board.listBoard();

          pageContext.write(_jsp_string3, 0, _jsp_string3.length);
          out.print((user.countUser()));
          pageContext.write(_jsp_string4, 0, _jsp_string4.length);
          out.print((board.countBoard()));
          pageContext.write(_jsp_string5, 0, _jsp_string5.length);
        } catch (java.lang.Throwable _jsp_e) {
          pageContext.handlePageException(_jsp_e);
        } finally {
          JspFactory.getDefaultFactory().releasePageContext(pageContext);
        }
      }

      private com.caucho.java.LineMap _caucho_line_map;
      private java.util.ArrayList _caucho_depends = new java.util.ArrayList();

      public boolean _caucho_isModified()
      {
        if (_caucho_isDead)
          return true;
        if (com.caucho.util.CauchoSystem.getVersionId() != 2057024151)
          return true;
        for (int i = _caucho_depends.size() - 1; i >= 0; i--) {
          com.caucho.vfs.Depend depend;
          depend = (com.caucho.vfs.Depend) _caucho_depends.get(i);
          if (depend.isModified())
            return true;
        }
        return false;
      }

      public long _caucho_lastModified()
      {
        return 0;
      }

    Threaded Messages (3)

  2. Serious need of help[ Go to top ]

    This class is automatically generated by the Servlet Container based on your JSP file.

    During runtime, the Servlet container generate a Servlet class (i.e. the class that you have provided) based on your JSP file (i.e. text file). This Servlet class is a Servlet source file. Then, the Servlet container compile this source Servlet file into a binary file.

    You should not have to worry about the automatic generated JSP class. You should only concern about your text JSP file
  3. Thanx![ Go to top ]

    Thanx a lot for your helpful reply. Btw, do u know whether it's the same if we use Tomcat Server?
  4. Thanx![ Go to top ]

    It's the same (or similar) no matter what servlet-container you use. Every JSP becomes a Servlet behind the scenes.

    Cheers and happy conding,
    Martin