Member 9983063 Ответов: 1

HTTP status 500 - невозможно скомпилировать класс для JSP:


Здравствуйте ребята я работаю над проектом jsp этот проект сделали мои старшеклассники теперь они ушли и я действительно просто немного здраво разбираюсь в jsp пожалуйста помогите мне когда я запускаю этот проект так что получаю эти ошибки пожалуйста помогите
как я могу ее решить?

HTTP Status 500 - Unable to compile class for JSP:
type Exception report

message Unable to compile class for JSP:

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Unable to compile class for JSP: 

An error occurred at line: [18] in the generated java file: [C:\Program Files\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\vsuite\org\apache\jsp\v_002dsuite\WebContent\Login_jsp.java]
Only a type can be imported. com.apv.erp.resource.DbHandler resolves to a package

An error occurred at line: [19] in the generated java file: [C:\Program Files\Apache Software Foundation\Tomcat 7.0\work\Catalina\localhost\vsuite\org\apache\jsp\v_002dsuite\WebContent\Login_jsp.java]
Only a type can be imported. com.apv.erp.resource.PersistenceFactory resolves to a package

An error occurred at line: 13 in the jsp file: /v-suite/WebContent/Login.jsp
UserInformationVO cannot be resolved to a type
10:   int 		iLockUserAttempts   = 3; 	//Account Locking Policy
11:   
12:   
13:   UserInformationVO userVO      = new UserInformationVO();
14:   RowSet oRowSet=null;
15:   Logger oLogger=Logger.getLogger("Login.jsp");
16:   


Что я уже пробовал:

<%@page errorPage="ErrorPage.jsp" %>
<%@ page import="test.whatever.Config" %>


<%@page import ="com.apv.erp.user.*,com.apv.erp.user.application.*,com.apv.erp.user.vo.*,com.apv.erp.resource.*,com.apv.erp.resource.DbHandler,com.apv.erp.resource.PersistenceFactory,java.sql.*,javax.sql.RowSet,org.apache.log4j.*"%>
<%
  String            txtUsrId    = "";
  String            txtUsrPwd   = "";
  
  int		iPasswordAgeInDays  = 30;	//Password Expiry Policy
  int 		iLockUserAttempts   = 3; 	//Account Locking Policy
  
  
  UserInformationVO userVO      = new UserInformationVO();
  RowSet oRowSet=null;
  Logger oLogger=Logger.getLogger("Login.jsp");
  
  

  if ( request.getParameter("txtUsrId") != null )
    txtUsrId = request.getParameter("txtUsrId");
  if ( request.getParameter("txtUsrPwd") != null )
    txtUsrPwd = request.getParameter("txtUsrPwd");
	
  if (txtUsrId.length() > 0 && txtUsrPwd.length() > 0)
  {
    userVO  = com.apv.erp.user.application.UserManagerBean.getInstance().authenticateUser(txtUsrId, txtUsrPwd, session);
  }
  else
    userVO = null;
    
    
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Welcome to SBL VAMM Module</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/login.css" rel="stylesheet" type="text/css">
</head>

<!--<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">  -->
<body onLoad="init()">

<div align="center">
  <table width="778" border="0" cellpadding="0" cellspacing="0" bgcolor="D7DBE3">
    <!--DWLayoutTable-->
    <tr> 
      <td height="74" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr> 
            <td width="778" height="64"><img src="images/logo.JPG" width="778" height="74"></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="145" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr> 
            <td width="778" height="145" valign="top"><img src="images/banner.jpg" width="778" height="145"></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td width="576" height="203" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="9BA6BA">
          <!--DWLayoutTable-->
          <tr> 
            <td width="576" height="20"> </td>
          </tr>
          <tr> 
            <td height="44" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <!--DWLayoutTable-->
                <tr> 
                  <td width="21" height="44" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="21" height="44"> </td>
                      </tr>
                    </table></td>
                  <td width="554" valign="top"><img src="images/clientlogin.jpg" width="107" height="33"></td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td height="139" valign="top">
			 <form name="form1" method="post" action="Login.jsp" onSubmit="return validateForm()">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">			
                <!--DWLayoutTable-->
                <tr> 
                  <td width="25" height="16"></td>
                  <td width="549" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="555"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Please 
                          enter your User Id and Password:</font></td>
                      </tr>
                    </table></td>
                  <td width="2"></td>
                </tr>
                <tr> 
                  <td height="3"></td>
                  <td rowspan="2" valign="top">
				  
				  <table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="555" height="7"></td>
                      </tr>
                      <tr> 
                          <td><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">User 
                            Id </font></td>
                      </tr>
                      <tr> 
                        <td>
                            <input type="text" name="txtUsrId" value="" maxlength="20">
                        </td>
                      </tr>
                    </table></td>
                  <td></td>
                </tr>
                <tr> 
                  <td rowspan="4" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="26" height="120"> </td>
                      </tr>
                    </table></td>
                  <td height="42"></td>
                </tr>
                <tr> 
                  <td height="16" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="555"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Password</font></td>
                      </tr>
                    </table></td>
                  <td></td>
                </tr>
                <tr> 
                  <td height="22"><input type="password" name="txtUsrPwd" value="" maxlength="12"></td>
                  <td></td>
                </tr>
                
                
                
                <tr> 
                  <td height="40" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                      <!--DWLayoutTable-->
                      <tr> 
                        <td width="555" height="40" valign="middle"><input type="image" src="images/signin.jpg" name="Submit">
						<script language="JavaScript" src="js/validation.js"></script>
						<script language="javascript">
						function validateForm()
						{
							MM_validateForm('txtUsrId','User Id','RisLoginId','txtUsrPwd','Password','R');
						
							return document.MM_returnValue;
							//if (document.MM_returnValue==false)
							//	return false
						
							//document.loginForm.submit();
						}
						</script>
						</td>
                      </tr>
                      <tr>
                        <td><span class="loginErrorMsg">
                          <%
						  if ( userVO != null )
						  {
						  
						  		if(oLogger.isDebugEnabled())
							{
						  		oLogger.debug("Password Age "+userVO.getPasswordAgeInDays());
						  		oLogger.debug("Reset Password "+userVO.getResetPasswordFlag());
						  		oLogger.debug("Segment Name "+userVO.getSegName());
						  		oLogger.debug("Creation Timestamp "+userVO.getPasswordCreationTimestamp());
						  		oLogger.debug("getUserLoginid() "+userVO.getUserLoginid());
						  		oLogger.debug("getUserFirstname "+userVO.getUserFirstname());
						  		oLogger.debug("getUserLastname "+userVO.getUserLastname());
						  		//oLogger.debug("getUserEmail "+userVO.getUserEmail());
						  		oLogger.debug("getBrchId "+userVO.getBrchId());
						  		oLogger.debug("getSegId( "+userVO.getSegId());
						  		oLogger.debug("getUserEmployeeid "+userVO.getUserEmployeeid());
						  		oLogger.debug("getUserBudgetedLimit "+userVO.getUserBudgetedLimit());
						  		oLogger.debug("getUserNonBudgetedLimit "+userVO.getUserNonBudgetedLimit());
						  		oLogger.debug("getPasswordExpiresFlag "+userVO.getPasswordExpiresFlag());
						  		oLogger.debug("getIsLockedFlag "+userVO.getIsLockedFlag());
						  	}
						  	
						  	
						  	

						  	///	if(oRowSet.("USER_PASSWORD_EXPIRY_TIMESTAMP")< Timestamp.valueOf(new java.util.Date().toString()))
						  		if((userVO.getPasswordExpiresFlag()=='y' && userVO.getPasswordAgeInDays() >= iPasswordAgeInDays ) || userVO.getResetPasswordFlag()=='y')
						  	    {
						  			response.sendRedirect("change_expired_password.jsp");
						  		}
						  		else if(userVO.getIsLockedFlag()=='y')
						  		{
						  			out.print("Your Account is Locked, Please Contact Administrator");
						  			if(oLogger.isDebugEnabled())
						  				oLogger.debug("Your Account is Locked, Please Contact Administrator");
						  		}
						  		else
						  		{
						  			response.sendRedirect("Main.jsp");
						  		}
								  
						  }
						  else if (txtUsrId.length() > 0 && txtUsrPwd.length() > 0 )
						  {
								  System.out.println("Invalid User Id or Password. Please Try again.");
								  out.print("Invalid User Id or Password. Please Try again.");
								  %>
								  <br>
								  <%
								  if(oLogger.isDebugEnabled())
								  {
								  	  oLogger.debug("oLockCount "+ session.getAttribute("oLockCount"));
								  }
								  
								  if( session.getAttribute("oLockCount")!=null)
								  {
								  	Integer oLockCount = (Integer) session.getAttribute("oLockCount");
								  	int iLockCount = oLockCount.intValue();
								  	iLockCount++;
								  	
								  	
								  	
								  	if(iLockCount >= iLockUserAttempts)
								  	{
								  		
								  			int iFlag=com.apv.erp.user.application.UserManagerDelegate.getInstance().lockUser(txtUsrId);
								  			if(iFlag>0)
								  			{
								  				out.print("Your Account has been Locked Due to Several Wrong Attempts");
								  				if(oLogger.isDebugEnabled())
								  					oLogger.info("Your Account has been Locked Due to Several Wrong Attempts!");
								  			}
								  			else
								  				if(oLogger.isDebugEnabled())
								  					oLogger.info("Account Lock Failed");
								  		
								  	}
								  	else
								  	{
								  	
								  		oLockCount = new Integer(iLockCount);
								  		session.setAttribute("oLockCount",oLockCount);
								  	}
								  }
								  else
								  {
								  	session.setAttribute("oLockCount",new Integer(1));
								  }
								  
						  }
						  %>
                        </span></td>
                      </tr>
                      
                      <tr>
                      
                      <td width="555" style="display:none"><a href="forgot_password.jsp" style="TEXT-DECORATION:none"><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">
                         Forgot Your Password?</font><a></td>
                      
                      </tr>
                      
                    </table></td>
                  <td></td>
                </tr>
              </table>
			 </form></td>
          </tr>
        </table></td>
      <td width="202" rowspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="D7DBE3">
          <!--DWLayoutTable-->
          <tr> 
            <td width="7" height="19"></td>
            <td width="194"> </td>
            <td width="1"></td>
          </tr>
          <tr> 
            <td height="19"></td>
            <td valign="top"><p><font color="666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">Stay 
                Informed</font></p></td>
            <td></td>
          </tr>
          <tr> 
            <td height="24"></td>
            <td valign="top" ><font color="666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">Sign 
              up to be the first to read about vSuite news and events.</font></td>
            <td></td>
          </tr>
          <tr> 
            <td height="13"></td>
            <td></td>
            <td></td>
          </tr>
          <tr> 
            <td height="19"></td>
            <td valign="top"><font color="666666" size="1" face="Verdana, Arial, Helvetica, sans-serif">Email 
              Address:</font></td>
            <td></td>
          </tr>
          <tr> 
            <td height="22"></td>
            <td valign="top"><input type="text" disabled name="textfield22"></td>
            <td></td>
          </tr>
          <tr> 
            <td height="9"></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td height="21"></td>
            <td valign="bottom"><img src="images/submit.jpg" width="77" height="21"></td>
            <td></td>
          </tr>
          <tr>
            <td height="83"></td>
            <td> </td>
            <td></td>
          </tr>
          <tr> 
            <td rowspan="2"> </td>
            <td rowspan="2"> </td>
            <td height="52"> </td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="78" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
          <!--DWLayoutTable-->
          <tr> 
            <td width="576" height="78" valign="baseline" style="border-left: 1px solid #9BA6BA;" ><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="576" height="78">
              <param name="movie" value="images/flash.swf">
              <param name="quality" value="high">
              <embed src="images/flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="576" height="78"></embed>
            </object></td>
          </tr>
        </table></td>
    </tr>
    <tr> 
      <td height="19" colspan="2" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="9BA6BA">
          <!--DWLayoutTable-->
          <tr> 
            <td width="778" height="19"><div align="center"><font color="#FFFFFF" size="1" face="Verdana, Arial, Helvetica, sans-serif">Copyright 
                © 2016 vSuite by Workstream Automation Limited / Al Intisar (Private) Limited.</font></div></td>
          </tr>
        </table></td>
    </tr>
  </table>
</div>
</body>
<!-- ****************************************************** -->
<div id="loading" style="position:absolute; width:100%; text-align:center; top:300px;"><img src="img/loading.gif" border=0></div>
<script> var ld=(document.all); var ns4=document.layers; var ns6=document.getElementById&&!document.all; var ie4=document.all; if (ns4) ld=document.loading; else if (ns6) ld=document.getElementById("loading").style; else if (ie4) ld=document.all.loading.style; function init() { if(ns4){ld.visibility="hidden";} else if (ns6||ie4) ld.display="none"; } </script>

<script language="JavaScript">
        setFocus();
</script>
<!-- ****************************************************** -->
</html>

1 Ответов

Рейтинг:
2

Jerry Jeremiah

Shouldn't the import of com.apv.erp.resource.DbHandler be com.apv.erp.resource.DbHandler.* and the import of com.apv.erp.resource.PersistenceFactory be com.apv.erp.resource.PersistenceFactory.* ?