How to access a static method inside the JSP page

Here i had wrote the code in java to access databases , i had include the class path to all the class files.
my problem is when i click the register.jsp page, it will pose eror as null pointer exception i've put my code in this section as follows
memberchecking.jsp
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*,businessclasses.*,businessobjects.*,projectutils.DateUtilities.*,java.util.*" errorPage="" %>
<html>
<head>
<title>Checking Member's Registration Details...</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
String loginId = request.getParameter("loginId");
String resourcePassword = request.getParameter("resourcePassword");
String confirmPassword = request.getParameter("confirmPassword");
String resourceStatus=request.getParameter("resourceStatus");
String nameTitle = request.getParameter("nameTitle");
String jobTitle = request.getParameter("jobTitle");
String firstName = request.getParameter("firstName");
String middleName = request.getParameter("middleName");
String lastName = request.getParameter("lastName");
String displayName = request.getParameter("displayName");
String resourceInitials = request.getParameter("resourceIniitials");
String countryCode = request.getParameter("countryCode");
String resourceLanguage = request.getParameter("resourceLanguage");
//String resourceCurrency = request.getParameter("resourceCurrency");
String resourceEmail2 = request.getParameter("resourceEmail2");
String birthMonth = request.getParameter("birthMonth");
String birthDay = request.getParameter("birthDay");
String birthYear = request.getParameter("birthYear");
String resourceGender = request.getParameter("resourceGender");
String martialStatus = request.getParameter("martialStatus");
String resourceOccupation = request.getParameter("resourceOccupation");
String webPage = request.getParameter("webPage");
String homePhone = request.getParameter("homePhone");
String homePhone2 = request.getParameter("homephone2");
String homeFax = request.getParameter("homepFax");
String phoneOffice = request.getParameter("phoneOffice");
String phoneOffice2 = request.getParameter("phoneOffice2");
String officeFax = request.getParameter("officeFax");
String resourcePager = request.getParameter("resourcePager");
String resourceMobile = request.getParameter("resourceMobile");
String resourceType=request.getParameter("resourceType");
String resourceName = firstName + " " + middleName + " " + lastName;
//java.util.Date resourceBirthDate = (String)birthMonth + "/" + birthDay + "/" + birthYear;
session.setAttribute("Name",resourceName);
session.setAttribute("UserId",loginId);
out.println("name==========="+resourceName);
//check whether the input data is valid for insert
//input validation code goes here.....
ResourceBC aResourceBC=new ResourceBC();
//marshall the resource
ResourceBO resource=new ResourceBO();
String e1 = (String)resource.getEmail();
String e2 = (String)resource.getEmail2();
if(loginId != e1 && resourceEmail2 != e2 ) {
          resource.setStatus( "L");
          resource.setId(5);
          resource.setCountryCode(countryCode);
     //     resource.setResourceTypeCode(resourceType);     
     //     resource.setResourceParent(rs.getLong(6));
     //     resource.setHKey(rs.getLong(7));          
          resource.setName(resourceName);
          resource.setDisplayName(displayName);
          resource.setLogonPassword(resourcePassword);
          resource.setNameTitle(nameTitle);
          resource.setJobTitle(jobTitle);
          resource.setEmail(loginId);
          resource.setEmail2(resourceEmail2);          
     //     resource.setPasswordUpdateDate(rs.getDate(14));
     //     resource.setPasswordExpireDate(rs.getDate(15));
     //     resource.setAccessCode(rs.getString(16));
     //     resource.setLogonUnSuccessTries(0);
          resource.setWebPage(webPage);
          resource.setPhoneOffice(phoneOffice);
          resource.setPhoneOffice2(phoneOffice2);
          resource.setPhoneOfficeFax(officeFax);
          resource.setPhoneHome(homePhone);
          resource.setPhoneHome2(homePhone2);
          resource.setPhoneHomeFax(homeFax);
          resource.setMobile(resourceMobile);
          resource.setPager(resourcePager);
          resource.setStatus(resourceStatus);     
          resource.setGender(resourceGender);     
     //     resource.setBirthDate(resourceBirthDate);
          resource.setMartialStatus(martialStatus);
          resource.setLanguage(resourceLanguage);
//          resource.setCurrency(resourceCurrency);
//          resource.setPhoto(photo);
          resource.setInitials(resourceInitials);                         
//          resource.setCreatedBy(1);
//          resource.setCreatedDate(rs.getDate(36));
//          resource.setUpdatedBy(rs.getLong(37));
//          resource.setUpdatedDate(rs.getDate(38));
          resource.setFirstName(firstName);
          resource.setLastName(lastName);
          resource.setMiddleName(middleName);     
          //resource.setCreatedDate(new java.sql.Date());
          int rowsAdded=aResourceBC.resourceAdd(resource);
          out.println("rowsAdded= "+rowsAdded);
          //add message for success or failure to add resource
          String msg="";
          if(rowsAdded == -1){
               msg="<font color=red>The ResourceName already exists .Try another</font>";
               session.setAttribute("message",msg);
               response.sendRedirect(response.encodeRedirectURL("memberregister.jsp"));
          else if(rowsAdded > 0){
               msg="<font color=green>Resource Added successfully..........</font>";     
               session.setAttribute("message",msg);
%>
               <jsp:forward page="memberlist.jsp">
               <jsp:param name="message" value="<%=msg%>"/>
               </jsp:forward>
<%}
%>
</body>
</html>
ResourceBC.java
package businessclasses;
import java.sql.*;
import businessobjects.ResourceBO;
import java.util.*;
import dbutilities.DBManager;
public class ResourceBC
     public Vector resourceList() throws Exception{
     Vector resourceList=new Vector();
     String listSQL="";
     StringBuffer listSQLBuffer=new StringBuffer();
     listSQLBuffer.append("SELECT ");
     listSQLBuffer.append("RES_ID,");
     listSQLBuffer.append("RES_NAME,");
     listSQLBuffer.append("CNTRY_CODE,");
     listSQLBuffer.append("RES_LOGON_PASSWORD,");
     listSQLBuffer.append("RESTYPE_CODE,");
     listSQLBuffer.append("RES_PARENT,");
     listSQLBuffer.append("RES_HKEY,");
     listSQLBuffer.append("RES_DISPLAY_NAME,");
     listSQLBuffer.append("RES_NAME_TITLE,");     
     listSQLBuffer.append("RES_JOB_TITLE,");     
     listSQLBuffer.append("RES_EMAIL,");
     listSQLBuffer.append("RES_EMAIL2,");     
     listSQLBuffer.append("RES_PASSWORD_ACTION,");     
     listSQLBuffer.append("RES_PASSWORD_UPDATE_DATE,");     
     listSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE,");     
     listSQLBuffer.append("RES_ACCESS_CODE,");     
     listSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
     listSQLBuffer.append("RES_WEB_PAGE,");
     listSQLBuffer.append("RES_PHONE_OFFICE,");
     listSQLBuffer.append("RES_PHONE_OFFICE2,");
     listSQLBuffer.append("RES_PHONE_OFFICE_FAX,");
     listSQLBuffer.append("RES_PHONE_HOME,");
     listSQLBuffer.append("RES_PHONE_HOME2,");
     listSQLBuffer.append("RES_PHONE_HOME_FAX,");
     listSQLBuffer.append("RES_MOBILE,");
     listSQLBuffer.append("RES_PAGER,");
     listSQLBuffer.append("RES_STATUS,");
     listSQLBuffer.append("RES_GENDER,");
     listSQLBuffer.append("RES_BIRTH_DATE,");
     listSQLBuffer.append("RES_MARTIAL_STATUS,");
     listSQLBuffer.append("RES_LANGUAGE,");
     listSQLBuffer.append("RES_CURRENCY,");
     listSQLBuffer.append("RES_PHOTO,");
     listSQLBuffer.append("RES_CREATED_BY,");
     listSQLBuffer.append("RES_NAME_INITIALS,");          
     listSQLBuffer.append("RES_CREATED_DATE,");
     listSQLBuffer.append("RES_UPDATED_BY");
     listSQLBuffer.append("RES_UPDATED_DATE,");
     listSQLBuffer.append("RES_NAME_FIRST,");
     listSQLBuffer.append("RES_NAME_LAST,");
     listSQLBuffer.append("RES_NAME_MIDDLE");     
     listSQLBuffer.append(" FROM T_RESOURCES ");
     listSQL=listSQLBuffer.toString();
System.out.println("listSQL---"+listSQL);
     DBManager dbManager=new DBManager();
     Connection con =dbManager.getConnection();
     Statement stmt=con.createStatement();
     ResultSet rs=stmt.executeQuery(listSQL);
     ResourceBO resource=null;
     while(rs.next()){
          resource=new ResourceBO();
          resource.setId(rs.getLong(1));
          resource.setName(rs.getString(2));
          resource.setCountryCode(rs.getString(3));
          resource.setLogonPassword(rs.getString(4));
          resource.setResourceTypeCode(rs.getLong(5));     
          resource.setResourceParent(rs.getLong(6));
          resource.setHKey(rs.getLong(7));          
          resource.setDisplayName(rs.getString(8));
          resource.setNameTitle(rs.getString(9));
          resource.setJobTitle(rs.getString(10));
          resource.setEmail(rs.getString(11));
          resource.setEmail2(rs.getString(12));          
          resource.setPasswordAction(rs.getString(13));
          resource.setPasswordUpdateDate(rs.getDate(14));
          resource.setPasswordExpireDate(rs.getDate(15));
          resource.setAccessCode(rs.getString(16));
          resource.setLogonUnSuccessTries(rs.getLong(17));
          resource.setWebPage(rs.getString(18));
          resource.setPhoneOffice(rs.getString(19));
          resource.setPhoneOffice2(rs.getString(20));
          resource.setPhoneOfficeFax(rs.getString(21));
          resource.setPhoneHome(rs.getString(22));
          resource.setPhoneHome2(rs.getString(23));
          resource.setPhoneHomeFax(rs.getString(24));
          resource.setMobile(rs.getString(25));
          resource.setPager(rs.getString(26));
          resource.setStatus(rs.getString(27));     
          resource.setGender(rs.getString(28));     
          resource.setBirthDate(rs.getDate(29));
          resource.setMartialStatus(rs.getString(30));
          resource.setLanguage(rs.getString(31));
          resource.setCurrency(rs.getString(32));
          resource.setPhoto(rs.getString(33));
          resource.setCreatedBy(rs.getLong(34));
          resource.setInitials(rs.getString(35));                         
          resource.setCreatedDate(rs.getDate(36));
          resource.setUpdatedBy(rs.getLong(37));
          resource.setUpdatedDate(rs.getDate(38));
          resource.setFirstName(rs.getString(39));
          resource.setLastName(rs.getString(40));
          resource.setMiddleName(rs.getString(41));          
          resourceList.add(resource);
          con.close();
          con=null;
          return resourceList;
//Method to insert the values into the database
public int resourceAdd(ResourceBO resource){
     System.out.println("in resourceAdd method ");
     //check for duplicate record in the table
     String checkDuplicationSQL="SELECT RES_ID FROM T_RESOURCES WHERE RES_ID='"+resource.getId()+"'";     
     DBManager dbManager=new DBManager();//.getInstance();
     boolean hasDuplicateRecord=dbManager.hasDuplicateRecord(checkDuplicationSQL);
     int rowsAdded=0;
     //insert the record
     //hasDuplicateRecord=false;
          if(!hasDuplicateRecord){
               //get the next resource id for insertion
          long nextID=dbManager.getNextIDForColumnAndTable("RES_ID","T_RESOURCES");
          System.out.println("nextID================== "+nextID);
StringBuffer fieldsbuffer=new StringBuffer();
     fieldsbuffer.append("INSERT INTO T_RESOURCES (");
     fieldsbuffer.append("RES_ID,");
     fieldsbuffer.append("RES_NAME,");
     fieldsbuffer.append("CNTRY_CODE,");
     fieldsbuffer.append("RES_LOGON_PASSWORD,");
     fieldsbuffer.append("RESTYPE_CODE,");     
     fieldsbuffer.append("RES_PARENT,");
     fieldsbuffer.append("RES_HKEY,");
     fieldsbuffer.append("RES_DISPLAY_NAME,");     
     fieldsbuffer.append("RES_NAME_TITLE,");
     fieldsbuffer.append("RES_JOB_TITLE,");
     fieldsbuffer.append("RES_EMAIL,");
     fieldsbuffer.append("RES_EMAIL2,");
     fieldsbuffer.append("RES_PASSWORD_ACTION,");
     fieldsbuffer.append("RES_PASSWORD_UPDATE_DATE,");          
     fieldsbuffer.append("RES_PASSWORD_EXPIRE_DATE,");          
     fieldsbuffer.append("RES_ACCESS_CODE,");          
     fieldsbuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
     fieldsbuffer.append("RES_WEB_PAGE,");
     fieldsbuffer.append("RES_PHONE_OFFICE,");
     fieldsbuffer.append("RES_PHONE_OFFICE2,");
     fieldsbuffer.append("RES_PHONE_OFFICE_FAX,");
     fieldsbuffer.append("RES_PHONE_HOME,");
     fieldsbuffer.append("RES_PHONE_HOME2,");
     fieldsbuffer.append("RES_PHONE_HOME_FAX,");
     fieldsbuffer.append("RES_MOBILE,");
     fieldsbuffer.append("RES_PAGER,");
     fieldsbuffer.append("RES_STATUS,");     
     fieldsbuffer.append("RES_GENDER,");     
     fieldsbuffer.append("RES_BIRTH_DATE,");          
     fieldsbuffer.append("RES_MARTIAL_STATUS,");          
     fieldsbuffer.append("RES_LANGUAGE,");          
     fieldsbuffer.append("RES_CURRENCY,");          
     fieldsbuffer.append("RES_PHOTO,");     
/*     fieldBuffer.append("RES_CREATED_BY,");
     fieldBuffer.append("RES_NAME_INITIALS,");          
     fieldBuffer.append("RES_CREATED_DATE,");
     fieldBuffer.append("RES_UPDATED_BY");
     fieldBuffer.append("RES_UPDATED_DATE,");
     fieldBuffer.append("RES_NAME_FIRST,");
     fieldBuffer.append("RES_NAME_LAST,");
     fieldBuffer.append("RES_NAME_MIDDLE");     */
     StringBuffer valuesBuffer=new StringBuffer(" VALUES(");
valuesBuffer.append(nextID+",");
     valuesBuffer.append("'"+resource.getName()+",");
     valuesBuffer.append("'"+resource.getCountryCode()+",");
     valuesBuffer.append("'"+resource.getLogonPassword()+"',");
     valuesBuffer.append("'"+resource.getResourceTypeCode()+",");
     valuesBuffer.append("'"+resource.getResourceParent()+",");
     valuesBuffer.append("'"+resource.getHKey()+",");
     valuesBuffer.append("'"+resource.getDisplayName()+",");
     valuesBuffer.append("'"+resource.getNameTitle()+",");
     valuesBuffer.append("'"+resource.getJobTitle()+",");
     valuesBuffer.append("'"+resource.getEmail()+"',");
     valuesBuffer.append("'"+resource.getEmail2()+"',");
     valuesBuffer.append("'"+resource.getPasswordAction()+",");
     valuesBuffer.append("'"+resource.getPasswordUpdateDate()+",");
     valuesBuffer.append("'"+resource.getPasswordExpireDate()+",");
     valuesBuffer.append("'"+resource.getAccessCode()+",");
     valuesBuffer.append("'"+resource.getLogonUnsuccessTries()+",");     
     valuesBuffer.append("'"+resource.getWebPage()+"',");
     valuesBuffer.append("'"+resource.getPhoneOffice()+"',");
     valuesBuffer.append("'"+resource.getPhoneOffice2()+"',");
     valuesBuffer.append("'"+resource.getPhoneOfficeFax()+"',");
     valuesBuffer.append("'"+resource.getPhoneHome()+"',");
     valuesBuffer.append("'"+resource.getPhoneHome2()+"',");
     valuesBuffer.append("'"+resource.getPhoneHomeFax()+"',");
     valuesBuffer.append("'"+resource.getMobile()+"',");
     valuesBuffer.append("'"+resource.getPager()+"',");
     valuesBuffer.append("'"+resource.getStatus()+"',");
     valuesBuffer.append("'"+resource.getGender()+"',");
     valuesBuffer.append("'"+resource.getBirthDate()+"',");
     valuesBuffer.append("'"+resource.getMartialStatus()+"',");
     valuesBuffer.append("'"+resource.getLanguage()+"',");
     valuesBuffer.append("'"+resource.getCurrency()+"',");
     valuesBuffer.append("'"+resource.getPhoto()+"',");
     valuesBuffer.append("'"+resource.getCreatedBy()+"',");
     valuesBuffer.append("'"+resource.getInitials()+"',");
     valuesBuffer.append("'"+resource.getCreatedDate()+"',");
     valuesBuffer.append("'"+resource.getUpdatedBy()+"',");
     valuesBuffer.append("'"+resource.getUpdatedDate()+"',");
     valuesBuffer.append("'"+resource.getFirstName()+"',");
     valuesBuffer.append("'"+resource.getLastName()+"',");
     valuesBuffer.append("'"+resource.getMiddleName()+"')");
     String insertSQL=fieldsbuffer.toString()+valuesBuffer.toString();
          System.out.println("insertSQL="+insertSQL);
          rowsAdded=dbManager.executeSQL(insertSQL);
          System.out.println("rowsAdded= "+rowsAdded+"hasDuplicateRecord "+hasDuplicateRecord);
          }//end if
          else{
               //throw new Exception("Has a duplicate Record");
               return -1;
          return rowsAdded;
public int resourceUpdate(ResourceBO resource){
          int rowsUpdated=0;
/*          String orgCodeStr=null;
          if(resource.getOrgCode()==0){
               orgCodeStr="NULL";
     }else{
               orgCodeStr=""+resource.getOrgCode();
          StringBuffer updateSQLBuffer=new StringBuffer();
     updateSQLBuffer.append("UPDATE T_RESOURCES SET ");          
     updateSQLBuffer.append("RES_NAME='"+resource.getName()+"',");
     updateSQLBuffer.append("CNTRY_CODE='"+resource.getCountryCode()+"',");
     updateSQLBuffer.append("RES_LOGON_PASSWORD='"+resource.getLogonPassword()+"',");
     updateSQLBuffer.append("RESTYPE_CODE="+resource.getResourceTypeCode()+",");
     updateSQLBuffer.append("RES_PARENT="+resource.getResourceParent()+",");
     updateSQLBuffer.append("RES_HKEY="+resource.getHKey()+",");
     updateSQLBuffer.append("RES_DISPLAY_NAME="+resource.getDisplayName()+",");
     updateSQLBuffer.append("RES_NAME_TITLE="+resource.getNameTitle()+",");
     updateSQLBuffer.append("RES_JOB_TITLE="+resource.getJobTitle()+",");
     updateSQLBuffer.append("RES_EMAIL='"+resource.getEmail()+"',");
     updateSQLBuffer.append("RES_EMAIL2='"+resource.getEmail2()+"',");
     updateSQLBuffer.append("RES_PASSWORD_ACTION="+resource.getPasswordAction()+",");
     updateSQLBuffer.append("RES_PASSWORD_UPDATE_DATE="+resource.getPasswordUpdateDate()+",");
     updateSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE="+resource.getPasswordExpireDate()+",");
     updateSQLBuffer.append("RES_ACCESS_CODE="+resource.getAccessCode()+",");
     updateSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES="+resource.getLogonUnsuccessTries()+",");     
     updateSQLBuffer.append("RES_WEB_PAGE='"+resource.getWebPage()+"',");
     updateSQLBuffer.append("RES_PHONE_OFFICE='"+resource.getPhoneOffice()+"',");
     updateSQLBuffer.append("RES_PHONE_OFFICE2='"+resource.getPhoneOffice2()+"',");
     updateSQLBuffer.append("RES_PHONE_OFFICE_FAX='"+resource.getPhoneOfficeFax()+"',");
     updateSQLBuffer.append("RES_PHONE_HOME='"+resource.getPhoneHome()+"',");
     updateSQLBuffer.append("RES_PHONE_HOME2='"+resource.getPhoneHome2()+"',");
     updateSQLBuffer.append("RES_PHONE_HOME_FAX='"+resource.getPhoneHomeFax()+"',");
     updateSQLBuffer.append("RES_MOBILE='"+resource.getMobile()+"',");
     updateSQLBuffer.append("RES_PAGER='"+resource.getPager()+"',");
     updateSQLBuffer.append("RES_STATUS='"+resource.getStatus()+"',");
     updateSQLBuffer.append("RES_GENDER='"+resource.getGender()+"',");
     updateSQLBuffer.append("RES_BIRTH_DATE='"+resource.getBirthDate()+"',");
     updateSQLBuffer.append("RES_MARTIAL_STATUS='"+resource.getMartialStatus()+"',");
     updateSQLBuffer.append("RES_LANGUAGE='"+resource.getLanguage()+"',");
     updateSQLBuffer.append("RES_CURRENCY='"+resource.getCurrency()+"',");
     updateSQLBuffer.append("RES_PHOTO='"+resource.getPhoto()+"',");
     updateSQLBuffer.append("RES_NAME_INITIALS='"+resource.getInitials()+"',");
     updateSQLBuffer.append("RES_NAME_FIRST='"+resource.getFirstName()+"',");
     updateSQLBuffer.append("RES_NAME_LAST='"+resource.getLastName()+"',");
     updateSQLBuffer.append("RES_NAME_MIDDLE='"+resource.getMiddleName()+"'");
     updateSQLBuffer.append("WHERE RES_ID="+resource.getId());
     String updateSQL=updateSQLBuffer.toString();
          //String updateSQL="UPDATE T_RESOURCES SET CLIENT_NAME='"+resource.getName()+"',CLIENT_STATUS='"+resource.getStatus()+"',CLIENT_EMAIL_PRIMARY='"+resource.getEmailPrimary()+"',CLIENT_EMAIL_ALTERNATIVE='"+resource.getEmailAlternate()+"',CLIENT_CURRENCY_SYMBOL='"+resource.getCurrencySymbol()+"',CLIENT_CURRENCY_DIGITS="+resource.getCurrencyDigits()+",CLIENT_DIRECTORY_DOCUMENT='"+resource.getDirectoryDocument()+"',CLIENT_DIRECTORY_TEMPLATE='"+resource.getDirectoryTemplate()+"',CLIENT_STORAGE_QUOTA="+resource.getStorageQuota()+",CLIENT_KEY='"+resource.getKey()+"' WHERE CLIENT_ID="+resource.getId();
          System.out.println("updateSQL---"+updateSQL);
          DBManager dbManager=new DBManager();
          rowsUpdated=dbManager.executeSQL(updateSQL);
          return rowsUpdated;
public int resourceDelete(long resourceId){
          int rowsDeleted=0;
          DBManager dbManager=new DBManager();
          String deleteSQL="DELETE FROM T_RESOURCES WHERE RES_ID="+resourceId;
          System.out.println("deleteSQL==="+deleteSQL);
          rowsDeleted=dbManager.executeSQL(deleteSQL);
          System.out.println("rowsDeleted= "+rowsDeleted);
          return rowsDeleted;
public ResourceBO getResourceById(long resourceId)throws Exception{
          StringBuffer selectSQLBuffer=new StringBuffer();
          selectSQLBuffer.append("SELECT ");
          selectSQLBuffer.append("RES_ID,");
          selectSQLBuffer.append("RES_NAME,");
          selectSQLBuffer.append("CNTRY_CODE,");
          selectSQLBuffer.append("RES_LOGON_PASSWORD,");
          selectSQLBuffer.append("RESTYPE_CODE,");
          selectSQLBuffer.append("RES_PARENT,");
          selectSQLBuffer.append("RES_HKEY,");
          selectSQLBuffer.append("RES_DISPLAY_NAME,");
          selectSQLBuffer.append("RES_NAME_TITLE,");          
          selectSQLBuffer.append("RES_JOB_TITLE,");     
          selectSQLBuffer.append("RES_EMAIL,");
          selectSQLBuffer.append("RES_EMAIL2,");     
          selectSQLBuffer.append("RES_PASSWORD_ACTION,");     
          selectSQLBuffer.append("RES_PASSWORD_UPDATE_DATE,");     
          selectSQLBuffer.append("RES_PASSWORD_EXPIRE_DATE,");     
          selectSQLBuffer.append("RES_ACCESS_CODE,");     
          selectSQLBuffer.append("RES_LOGON_UNSUCCESS_TRIES,");     
          selectSQLBuffer.append("RES_WEB_PAGE,");
          selectSQLBuffer.append("RES_PHONE_OFFICE,");
          selectSQLBuffer.append("RES_PHONE_OFFICE2,");
          selectSQLBuffer.append("RES_PHONE_OFFICE_FAX,");
          selectSQLBuffer.append("RES_PHONE_HOME,");
          selectSQLBuffer.append("RES_PHONE_HOME2,");
          selectSQLBuffer.append("RES_PHONE_HOME_FAX,");
          selectSQLBuffer.append("RES_MOBILE,");
          selectSQLBuffer.append("RES_PAGER,");
          selectSQLBuffer.append("RES_STATUS,");
          selectSQLBuffer.append("RES_GENDER,");
          selectSQLBuffer.append("RES_BIRTH_DATE,");
          selectSQLBuffer.append("RES_MARTIAL_STATUS,");
          selectSQLBuffer.append("RES_LANGUAGE,");
          selectSQLBuffer.append("RES_CURRENCY,");
          selectSQLBuffer.append("RES_PHOTO,");
          selectSQLBuffer.append("RES_CREATED_BY,");
          selectSQLBuffer.append("RES_NAME_INITIALS,");          
          selectSQLBuffer.append("RES_CREATED_DATE,");
          selectSQLBuffer.append("RES_UPDATED_BY");
          selectSQLBuffer.append("RES_UPDATED_DATE,");
          selectSQLBuffer.append("RES_NAME_FIRST,");
          selectSQLBuffer.append("RES_NAME_LAST,");
          selectSQLBuffer.append("RES_NAME_MIDDLE");     
          selectSQLBuffer.append(" FROM T_RESOURCES WHERE RES_ID="+resourceId);
          String fetchSQL=selectSQLBuffer.toString();
System.out.println("fetchSQL---"+fetchSQL);
               DBManager dbManager=new DBManager();
               Connection con =dbManager.getConnection();
               Statement stmt=con.createStatement();
               ResultSet rs=stmt.executeQuery(fetchSQL);
               ResourceBO resource=new ResourceBO();
               while(rs.next()){                    
               resource.setId(rs.getLong(1));
               resource.setName(rs.getString(2));
               resource.setCountryCode(rs.getString(3));
               resource.setLogonPassword(rs.getString(4));
               resource.setResourceTypeCode(rs.getLong(5));     
               resource.setResourceParent(rs.getLong(6));
               resource.setHKey(rs.getLong(7));          
               resource.setDisplayName(rs.getString(8));
               resource.setNameTitle(rs.getString(9));
               resource.setJobTitle(rs.getString(10));
               resource.setEmail(rs.getString(11));
               resource.setEmail2(rs.getString(12));          
               resource.setPasswordAction(rs.getString(13));
               resource.setPasswordUpdateDate(rs.getDate(14));
               resource.setPasswordExpireDate(rs.getDate(15));
               resource.setAccessCode(rs.getString(16));
               resource.setLogonUnSuccessTries(rs.getLong(17));
               resource.setWebPage(rs.getString(18));
               resource.setPhoneOffice(rs.getString(19));
               resource.setPhoneOffice2(rs.getString(20));
               resource.setPhoneOfficeFax(rs.getString(21));
               resource.setPhoneHome(rs.getString(22));
               resource.setPhoneHome2(rs.getString(23));
               resource.setPhoneHomeFax(rs.getString(24));
               resource.setMobile(rs.getString(25));
               resource.setPager(rs.getString(26));
               resource.setStatus(rs.getString(27));     
               resource.setGender(rs.getString(28));     
               resource.setBirthDate(rs.getDate(29));
               resource.setMartialStatus(rs.getString(30));
               resource.setLanguage(rs.getString(31));
               resource.setCurrency(rs.getString(32));
               resource.setPhoto(rs.getString(33));
               resource.setCreatedBy(rs.getLong(34));
               resource.setInitials(rs.getString(35));                         
               resource.setCreatedDate(rs.getDate(36));
               resource.setUpdatedBy(rs.getLong(37));
               resource.setUpdatedDate(rs.getDate(38));
               resource.setFirstName(rs.getString(39));
               resource.setLastName(rs.getString(40));
               resource.setMiddleName(rs.getString(41));          
               con.close();
               con=null;
               return resource;
}//end of class
plz help me to solve this problem....
rajkumar

The JSP wil be converted into a java file and then compiled into a class. If you are using tomcat, the java file will be somewhere in the work folder of your tomcat installation. Find the java file and check the line that is reported in the exception to see where the null-pointer is coming from.

Similar Messages

  • How to use custome tag lib in the JSP page?

    How to use custome tag lib in the JSP page?...with JDeveloper

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/

  • How to call an exe program from the JSP page?

    How to call and display the interface from a exe (residing on C: drive) on my JSP page. Our customers supplied us with an exe file and they want this to be incorporated on the JSP page that has other components also, like forms, etc. The interface of the program has to be displayed in specific co-ordinates on the JSP page. Any help is highly appreciated. Thanks in advance.

    Can't be done with JSP.
    JSP runs java on the SERVER only.
    All that gets to client is an HTML page. So all that
    you can do at the client is what an HTML page can do.
    Obviously that doesn't include running a file on the
    client machine.
    Take a look into Applets, or maybe ActiveX controls.Thanks for the reply.
    Any idea on how to use the ActiveX controls in this regard?

  • Could not invoke the service() method when the JSP page is loaded

    I am new to servlets/jsp so excuse if I am doing something silly here:
    I have a JSP page the suppose to be loading a session attrbute from a simple servlet. When I go to load the jsp page, I get Could not invoke the service() method.
    Any help is much appreciated:
    Here is my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <%@ page session="true" import="insurance.PolicyObj,java.util.*"%>
    <% Vector VTable = (Vector) session.getAttribute("policyTable"); %>
    <HTML>
    <BODY>
    <Form name=listTable action="InsSer" method="post">
    <TABLE border="1">
         <TBODY>
              <TR>
                   <TD width="258" align="center"><B>Policy Id</B></TD>
                   <TD width="187" align="center"><B>Customer Name</B></TD>
                   <TD width="160" align="center"><B>Agent Name</B></TD>
                   <TD width="134" align="center"><B>Status</B></TD>
              </TR>
              <TR>
    <%
    for (int index=0; index < VTable.size();index++) {
    PolicyObj TableL = (PolicyObj) VTable.elementAt(index);
    %>
         <TR bgcolor="#99CCFF">
    <TD width="258" align="center"> <%= TableL.getPolicyId()%> </TD>
    <TD width="187" align="center"> <%= TableL.getCustomerName()%> </TD>
    <TD width="187" align="center"> <%= TableL.getAgentName() %> </TD>
    <TD width="187" align="center"> <%= TableL.getPolicyStatus() %></TD>
    </TR>
         <% } %>
         </TBODY>
    </TABLE>
    <P><INPUT type="submit" name="Submit" value="Refresh Active Policies"></P>
    </BODY>
    </HTML>
    Here is my servlet:
    package insurance;
    import java.io.IOException;
    import java.util.Vector;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.Servlet;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class InsSer extends HttpServlet implements Servlet {
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#HttpServlet()
         public InsSer() {
              super();
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              doPost(req,resp);
              // TODO Auto-generated method stub
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              //PolicyObj[] policyTable = new PolicyObj[3];
              HttpSession session = req.getSession(false);
              //if (session == null) {
                   //resp.sendRedirect("http://localhost:9080/Insurance/error.html");
              //Vector buylist = (Vector) session.getAttribute("PolicyList");
              Vector policyList = null;
              policyList.addElement(new PolicyObj());
              ((PolicyObj) policyList.get(0)).setPolicyId("0009800002");
              ((PolicyObj) policyList.get(0)).setCustomerName("Salim Zeitouni");
              ((PolicyObj) policyList.get(0)).setAgentName("Jack Smith");
              ((PolicyObj) policyList.get(0)).setPolicyStatus("Pending");
              session.setAttribute("policyTable",policyList);
              ServletContext sc = getServletContext();
              RequestDispatcher rd = sc.getRequestDispatcher("InsSev1.jsp");
              rd.forward(req,resp);
    Message was edited by:
    sfz1
    Message was edited by:
    sfz1

    I am new to servlets/jsp so excuse if I am doing something silly here:
    I have a JSP page the suppose to be loading a session attrbute from a simple servlet. When I go to load the jsp page, I get Could not invoke the service() method.
    Any help is much appreciated:
    Here is my JSP:
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
         pageEncoding="ISO-8859-1"%>
    <%@ page session="true" import="insurance.PolicyObj,java.util.*"%>
    <% Vector VTable = (Vector) session.getAttribute("policyTable"); %>
    <HTML>
    <BODY>
    <Form name=listTable action="InsSer" method="post">
    <TABLE border="1">
         <TBODY>
              <TR>
                   <TD width="258" align="center"><B>Policy Id</B></TD>
                   <TD width="187" align="center"><B>Customer Name</B></TD>
                   <TD width="160" align="center"><B>Agent Name</B></TD>
                   <TD width="134" align="center"><B>Status</B></TD>
              </TR>
              <TR>
    <%
    for (int index=0; index < VTable.size();index++) {
    PolicyObj TableL = (PolicyObj) VTable.elementAt(index);
    %>
         <TR bgcolor="#99CCFF">
    <TD width="258" align="center"> <%= TableL.getPolicyId()%> </TD>
    <TD width="187" align="center"> <%= TableL.getCustomerName()%> </TD>
    <TD width="187" align="center"> <%= TableL.getAgentName() %> </TD>
    <TD width="187" align="center"> <%= TableL.getPolicyStatus() %></TD>
    </TR>
         <% } %>
         </TBODY>
    </TABLE>
    <P><INPUT type="submit" name="Submit" value="Refresh Active Policies"></P>
    </BODY>
    </HTML>
    Here is my servlet:
    package insurance;
    import java.io.IOException;
    import java.util.Vector;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.Servlet;
    import javax.servlet.ServletContext;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    public class InsSer extends HttpServlet implements Servlet {
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#HttpServlet()
         public InsSer() {
              super();
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              doPost(req,resp);
              // TODO Auto-generated method stub
         /* (non-Java-doc)
         * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest arg0, HttpServletResponse resp)
         protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              //PolicyObj[] policyTable = new PolicyObj[3];
              HttpSession session = req.getSession(false);
              //if (session == null) {
                   //resp.sendRedirect("http://localhost:9080/Insurance/error.html");
              //Vector buylist = (Vector) session.getAttribute("PolicyList");
              Vector policyList = null;
              policyList.addElement(new PolicyObj());
              ((PolicyObj) policyList.get(0)).setPolicyId("0009800002");
              ((PolicyObj) policyList.get(0)).setCustomerName("Salim Zeitouni");
              ((PolicyObj) policyList.get(0)).setAgentName("Jack Smith");
              ((PolicyObj) policyList.get(0)).setPolicyStatus("Pending");
              session.setAttribute("policyTable",policyList);
              ServletContext sc = getServletContext();
              RequestDispatcher rd = sc.getRequestDispatcher("InsSev1.jsp");
              rd.forward(req,resp);
    Message was edited by:
    sfz1
    Message was edited by:
    sfz1

  • Accessing a java class method from the jsp page.

    Hi im a beginner with jsp and im trying to find a way to access a method of my java class file in jsp page. After searching through the forums i tried to use the usebean tag. Im using apache to host the jsp file.Below is an excerpt of my code and the error message i got. What am i doing wrong? anyone know?
    <%@ page language="java" %>
    <jsp:useBean id="movies" class="movie.Movie" />
    <jsp:setProperty name="movies" property="*"/>
    <%
    movies.getStart("file:///C:/Video/Applications2/sun.mpg");
    response.setContentType("text/xml");
    %>
    exception
    org.apache.jasper.JasperException: Exception in JSP: /View.jsp:7
    4: <jsp:setProperty name="movies" property="*"/>
    5: <%
    6:
    7: movies.getStart("file:///C:/Video/Applications2/sun.mpg");
    8: response.setContentType("text/xml");
    9: %>
    Stacktrace:
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.ServletException: javax/media/ControllerListener

    Hi thanks for responding. Ok i did look through and it was opening some gui. I still need the program to do server side processes so cant use an applet.but i dont need the gui so i revised it and removed the gui. also im using a servlet to call the class now yet i still have the same error. Any ideas?
    Below is the vid2jpg code minus the gui.
    import java.io.*;
    import java.awt.*;
    import javax.media.*;
    import javax.media.control.*;
    import javax.media.format.*;
    import javax.media.protocol.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class vid2jpg implements ControllerListener
         Processor p;
         Object waitObj = new Object();
         boolean stateOK = true;
         DataSourceHandler handler;
    int imgWidth;int imgHeight;
         Image outputImage;
         String sep = System.getProperty("file.separator");
         int[] outvid;
         int startFr = 1;int endFr = 1000;int countFr = 0;
         boolean sunjava=true;
         * Static main method
         public static void main(String[] args)
              if(args.length == 0)
                   System.out.println("No media address.");
                   new vid2jpg("file:///C:/Video/applications2/sun.mpg");     // or alternative "vfw://0" if webcam
              else
                   String path = args[0].trim();
                   System.out.println(path);
                   new vid2jpg(path);
         * Constructor
         public vid2jpg(String path)
              MediaLocator ml;String args = path;
              if((ml = new MediaLocator(args)) == null)
                   System.out.println("Cannot build media locator from: " + args);
              if(!open(ml))
                   System.out.println("Failed to open media source");
         * Given a MediaLocator, create a processor and start
         private boolean open(MediaLocator ml)
              System.out.println("Create processor for: " + ml);
              try
                   p = Manager.createProcessor(ml);
              catch (Exception e)
                   System.out.println("Failed to create a processor from the given media source: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if(!waitForState(p.Configured))
                   System.out.println("Failed to configure the processor.");
                   return false;
              // Get the raw output from the Processor.
              p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
              TrackControl tc[] = p.getTrackControls();
              if(tc == null)
                   System.out.println("Failed to obtain track controls from the processor.");
                   return false;
              TrackControl videoTrack = null;
              for(int i = 0; i < tc.length; i++)
                   if(tc.getFormat() instanceof VideoFormat)
                        tc[i].setFormat(new RGBFormat(null, -1, Format.byteArray, -1.0F, 24, 3, 2, 1));
                        videoTrack = tc[i];
                   else
                   tc[i].setEnabled(false);
              if(videoTrack == null)
                   System.out.println("The input media does not contain a video track.");
                   return false;
              System.out.println("Video format: " + videoTrack.getFormat());
              p.realize();
              if(!waitForState(p.Realized))
                   System.out.println("Failed to realize the processor.");
                   return false;
              // Get the output DataSource from the processor and set it to the DataSourceHandler.
              DataSource ods = p.getDataOutput();
              handler = new DataSourceHandler();
              try
                   handler.setSource(ods);     // also determines image size
              catch(IncompatibleSourceException e)
                   System.out.println("Cannot handle the output DataSource from the processor: " + ods);
                   return false;
         //     setLayout(new FlowLayout(FlowLayout.LEFT));
    //          currPanel = new imgPanel(new Dimension(imgWidth,imgHeight));
         //     add(currPanel);
         //     pack();
              //setLocation(100,100);
         //     setVisible(true);
              handler.start();
              // Prefetch the processor.
              p.prefetch();
              if(!waitForState(p.Prefetched))
                   System.out.println("Failed to prefetch the processor.");
                   return false;
              // Start the processor
              //p.setStopTime(new Time(20.00));
              p.start();
              return true;
         * Sets image size
         private void imageProfile(VideoFormat vidFormat)
              System.out.println("Push Format "+vidFormat);
              Dimension d = (vidFormat).getSize();
              System.out.println("Video frame size: "+ d.width+"x"+d.height);
              imgWidth=d.width;
              imgHeight=d.height;
         * Called on each new frame buffer
         int nextframetime = 0;
    private void useFrameData(Buffer inBuffer)
    try
    if(inBuffer.getData()!=null) // vfw://0 can deliver nulls
    if(sunjava) // and with import javax.imageio.*;
    int frametimesecs = (int)(inBuffer.getTimeStamp()/1000000000);
    if(frametimesecs%10 == 0 && frametimesecs==nextframetime)
    nextframetime+=10;
    BufferedImage bi = new BufferedImage(outputImage.getWidth(null), outputImage.getHeight(null), BufferedImage.TYPE_INT_RGB);
    Graphics g = bi.getGraphics();
    ImageIO.write(bi, "png", new File("images"+sep+"image_"+(inBuffer.getTimeStamp()/1000000000)+".png"));
    catch(Exception e){}
         * Tidy on finish
         public void tidyClose()
              handler.close();
              p.close();
         * Block until the processor has transitioned to the given state
         private boolean waitForState(int state)
              synchronized(waitObj)
                   try
                        while(p.getState() < state && stateOK)
                        waitObj.wait();
                   catch (Exception e)
              return stateOK;
         * Controller Listener.
         public void controllerUpdate(ControllerEvent evt)
              if(evt instanceof ConfigureCompleteEvent ||     evt instanceof RealizeCompleteEvent || evt instanceof PrefetchCompleteEvent)
                   synchronized(waitObj)
                        stateOK = true;
                        waitObj.notifyAll();
              else
              if(evt instanceof ResourceUnavailableEvent)
                   synchronized(waitObj)
                        stateOK = false;
                        waitObj.notifyAll();
              else
              if(evt instanceof EndOfMediaEvent || evt instanceof StopAtTimeEvent)
                   tidyClose();
         * Inner classes
         * A DataSourceHandler class to read from a DataSource and displays
         * information of each frame of data received.
         class DataSourceHandler implements BufferTransferHandler
              DataSource source;
              PullBufferStream pullStrms[] = null;
              PushBufferStream pushStrms[] = null;
              Buffer readBuffer;
              * Sets the media source this MediaHandler should use to obtain content.
              private void setSource(DataSource source) throws IncompatibleSourceException
                   // Different types of DataSources need to handled differently.
                   if(source instanceof PushBufferDataSource)
                        pushStrms = ((PushBufferDataSource) source).getStreams();
                        // Set the transfer handler to receive pushed data from the push DataSource.
                        pushStrms[0].setTransferHandler(this);
                        // Set image size
                        imageProfile((VideoFormat)pushStrms[0].getFormat());
                   else
                   if(source instanceof PullBufferDataSource)
                        System.out.println("PullBufferDataSource!");
                        // This handler only handles push buffer datasource.
                        throw new IncompatibleSourceException();
                   this.source = source;
                   readBuffer = new Buffer();
              * This will get called when there's data pushed from the PushBufferDataSource.
              public void transferData(PushBufferStream stream)
                   try
                        stream.read(readBuffer);
                   catch(Exception e)
                        System.out.println(e);
                        return;
                   // Just in case contents of data object changed by some other thread
                   Buffer inBuffer = (Buffer)(readBuffer.clone());
                   // Check for end of stream
                   if(readBuffer.isEOM())
                        System.out.println("End of stream");
                        return;
                   // Do useful stuff or wait
                   useFrameData(inBuffer);
              public void start()
                   try{source.start();}catch(Exception e){System.out.println(e);}
              public void stop()
                   try{source.stop();}catch(Exception e){System.out.println(e);}
              public void close(){stop();}
              public Object[] getControls()
                   return new Object[0];
              public Object getControl(String name)
                   return null;
    below is the servlet code.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class ShowMovie extends HttpServlet {
    String rootURL="http://127.0.0.1:8080/Video/";
    public void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
         //String movie=request.getParameter("movie");
         String movie ="son";
         getStart(movie);
              response.sendRedirect(rootURL+"View.jsp");
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    processRequest(request, response);
         public void getStart(String url){
              new vid2jpg(url);
    this is the error from the server. Im using tomkat 5
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoClassDefFoundError: javax/media/ControllerListener
         java.lang.ClassLoader.defineClass1(Native Method)
         java.lang.ClassLoader.defineClass(Unknown Source)
         java.security.SecureClassLoader.defineClass(Unknown Source)
         org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
         org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
         java.lang.ClassLoader.loadClassInternal(Unknown Source)
         ShowMovie.getStart(ShowMovie.java:31)
         ShowMovie.processRequest(ShowMovie.java:14)
         ShowMovie.doGet(ShowMovie.java:22)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.

  • How to call a class method from a jsp page?

    Hi all,
    i would like to create a basic jsp page in jdev 1013 that contains a button and a text field. When clicking the button, i would like to call a method that returns a string into the text field.
    The class could be something like this:
    public class Class1 {
    public String getResult() {
    return "Hello World";
    How do i go about this?
    Thanks

    Here is a sample:
    HTML><HEAD><TITLE>Test JDBC for Oracle Support</TITLE></HEAD><BODY>
    <%@ page import="java.sql.*, oracle.jdbc.*, oracle.jdbc.pool.OracleDataSource" %>
    <% if (request.getParameter("user")==null) { %>
    <FORM method="post" action="testjdbc.jsp">
    <H1>Enter connection Parameters</H1>
    <H5>Please enter host name:</H5><INPUT TYPE="text" name="hostname" value="localhost" />
    <H5>Please enter port number:</H5><INPUT TYPE="text" name="port" value="1521" />
    <H5>Service nanme:</H5><INPUT TYPE="text" name="service" value="XE" />
    <H5>Please enter username: </H5><INPUT TYPE="text" name="user" />
    <H5>Please enter password</H5><INPUT TYPE="password" name="password" />
    <INPUT TYPE="submit" />
    </FORM>
    <% } else { %>
    <%
    String hostName = request.getParameter("hostname");
    String portNumber = request.getParameter("port");
    String service = request.getParameter("service");
    String user = request.getParameter("user");
    String password = request.getParameter("password");
    String url = "jdbc:oracle:thin:" + user + "/" + password + "@//" + hostName + ":" + portNumber + "/" + service;
    try {
    OracleDataSource ods = new OracleDataSource();
    ods.setURL(url);
    Connection conn = ods.getConnection();
    // Create Oracle DatabaseMetaData object
    DatabaseMetaData meta = conn.getMetaData();
    // gets driver information
    out.println("<TABLE>");
    out.println("<TR><TD>");
    out.println("<B>JDBC Driver version</B>");
    out.println("</TD>");
    out.println("<TD>");
    out.println(meta.getDriverVersion());
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR><TD>");
    out.println("<B>JDBC Driver Name</B>");
    out.println("</TD>");
    out.println("<TD>");
    out.println(meta.getDriverName());
    out.println("</TD>");
    out.println("</TR>");
    out.println("<TR><TD>");
    out.println("<B>JDBC URL</B>");
    out.println("</TD>");
    out.println("<TD>");
    out.println(meta.getURL());
    out.println("</TD>");
    out.println("<TABLE>");
    conn.close();
    } catch (Exception e) {e.printStackTrace(); }
    %>
    <%-- end else if --%>
    <% } %>
    </BODY>
    </HTML>

  • How to create a xml file from the jsp page?

    I'm a beginner of the develop xml,my question like this,
    there has a jsp page,some parameters in it,I wanna get the parameters and create a xml file,so,what parser method should I use?
    And how to create a new xml file,when the file haven't exist at first?
    pls give some code,thanks.

    a ggod link for u http://www.theserverside.com/resources/article.jsp?l=JSP-XML2

  • How to make J2EE engine auto load The JSP Pages

    After I modify some JSP pages, If I just copy them to  the folder in the Server, The pages didn't update.
    How to make it auto update?

    Hello Shen,
    please take in consideration, that JSP page is translated to HttpServlet  component when deployed. It's not accessed via original JSP file.
    You can try to modify the final HttpServlet class file, but then you have to go through pre-compiling.
    Hope it helps,
    regards.
    mz

  • How to generate trend chart after submitting the jsp page

    hi,
    i have a jsp page, in that i will selec some values , after submitting that jsp with selected values , the trend chart will be displayed.
    how to do this , please tell me.

    thank you for your reply
    i took JFreeChart which is thirdparty API , but , in that i got one query.
    how to set the limit for y-axis?means , i want to put maximumm of 100, but its taking what is the maximum value i added to dataset.
    any one know about this, please tell me.

  • How to include a js file in the JSP page

    Hi
    i have included a script tag like the following in the JSP file
    <SCRIPT language="JavaScript">vDateFormat='mm/dd/yyyy';</SCRIPT>
    while deploying i am getting an error 'vDateFormat' unidentified
    Can any one help me

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • How to Generate a Java file for a JSP Page

    Hi ,
    I am using weblogic11 .
    I am working on a JSP page which nearly consists of 4000 lines of code.
    I need to debug the file , but weblogic server is not generating the java file for the JSP pages .
    Please let me know how can i genertae Java file for the jsp pages ??

    JSPs are compiled into servlets automatically and those classes are stored in WEB-INF/classes folder. Servlet engine handles servlets.

  • What is the purpose of Static methods inside a class?

    Hi,
    What is the purpose of Static methods inside a class?
    I want the answers apart from "A static method does not require instance of class(to access) and it can directly be accessed by the class name itself"
    My question is what is the exact purpose of a static method ?
    Unlike attributes, a separate copy of instance attributes will be created for each instance of a class where as only one copy of static attributes will be created for all instances.
    Will a separate copy of instance method be created for each instance of a class and only one copy of static methods be create?
    Points will be rewarded for all helpful answers.

    Hi Sharma,
    Static methods is used to access statics attributes of a class. We use static attributes when we want to share the same attribute with all instances of a class, in this case if you chage this attribute through the instance A this change will change will be reflected in instance B, C........etc.
    I think that your question is correct -> a separate copy of instance method will be created for each instance of a class and only one copy of static methods be create ?
    "A static method does not require instance of class(to access) and it can directly be accessed by the class name itself"
    Static Method: call method class=>method.
    Instance Method: call method instance->method.
    Take a look at this wiki pages.
    [https://wiki.sdn.sap.com/wiki/x/o5k]
    [https://wiki.sdn.sap.com/wiki/x/ZtM]
    Best regards.
    Marcelo Ramos

  • How to call a static method in a class if I have just the object?

    Hello. I have an abstract class A where I have a static method blah(). I have 2 classes that extend class A called B and C. In both classes I override method blah(). I have an array with objects of type B and C.
    For every instance object of the array, I'm trying to call the static method in the corresponding class. For objects of type B I want to call blah() method in B class and for objects of type C I want to call blah() method in C class. I know it's possible to call a static method with the name of the object, too, but for some reason (?) it calls blah() method in class A if I try this.
    So my question is: how do I code this? I guess I need to cast to the class name and then call the method with the class name, but I couldn't do it. I tried to use getClass() method to get the class name and it works, but I didn't know what to do from here...
    So any help would be appreciated. Thank you.

    As somebody already said, to get the behavior you
    want, make the methods non-static.You all asked me why I need that method to be
    static... I'm not surprised to hear this question
    because I asked all my friends before posting here,
    and all of them asked me this... It's because some
    complicated reasons, I doubt it.
    the application I'm writing is
    quite big...Irrelevant.
    Umm... So what you're saying is there is no way to do
    this with that method being static? The behavior you describe cannot be obtained with only static methods in Java. You'd have to explicitly determine the class and then explicitly call the correct class' method.

  • How to find the arguments of a static method from the class file

    Hi,all !
    How to find the arguments of a static method from the class file? for example, when we meet a bytecode "invokestatic", how can I know the arguments of this static method?

    Hi,all !
    How to find the arguments of a static method from the
    class file? for example, when we meet a bytecode
    "invokestatic", how can I know the arguments of this
    static method?You mean
    1. The values?
    2. Argument names?
    3. Argument signatures.
    I would suppose for the last that the easiest way would be to parse the signature string.
    The first is not possible - not from the class file.
    The second is only in the debug information stored in the optional part of the class file. And figuring out the format for that is going to be a problem.

  • Hi How do we create Methods inside the Business objects of Z

    Hi Abapers,
                        How do we create Methods inside the Business objects (z objects) and how *** an import parameter or export parameter  to be defined for the new Methods.
    Regards
    Bhaskar Rao.M

    Hi Bhaskar,
    that ´s not difficult.
    Open your Bus.Obj. in SWO1 with CHANGE/EDIT
    Click on the "Methods" header line and then use the button for "Create".
    If you want to add the method on basis of a function module, choose next in the next pop up. Then the system will offer you the ex/import parameter from the function module. So this is a really simple way.
    If you don´t have a FM, it is a little bit more difficult.
    Choose No on the quetion about a FM, fill in the next pop up  methode name (no blanks allowed).
    Dialogue is for user related method (call screen...) synchronous for methods which have to give back a result directly in to the workflow.
    After completing the screen the method will be displayed as new method at the end of method list. Now add parameters (first click on the method name, then choose parameter button, same functionality to add program to the method).
    Programm:
    Code snip:
    BEGIN_METHOD ZWFCHECKMIRO CHANGING CONTAINER.
    DATA:
          ZBELNR TYPE RBKP-BELNR,
          ZGJAHR TYPE RBKP-GJAHR,
          RESULT TYPE HRP1001-ISTAT,
          BELNR TYPE BKPF-BELNR,
          GJAHR TYPE BKPF-GJAHR,
          BUKRS TYPE BKPF-BUKRS.
    to import parameter
      SWC_GET_ELEMENT CONTAINER 'Zbelnr' ZBELNR.
      SWC_GET_ELEMENT CONTAINER 'Zgjahr' ZGJAHR.
    *(or SWC_GET_TABLE)
    here add the functionality of your method!
    to export parameter
    SWC_SET_ELEMENT CONTAINER 'Result' RESULT.
      SWC_SET_ELEMENT CONTAINER 'Belnr' BELNR.
    *(or SWC_SET_TABLE)
    !!! Important: naming convention!!! Use same writing of parameter names in
    PARAM area (button PARAMETER) and here in code.
    To use your method, change it to implemented after adding your code.
    -> Edit -> Change release status -> object type component -> into implemented
    (Sorry , have a german screen here, possibly terms are a little bit different.
    Hope this helps a little bit.!
    regards
    Dirk

Maybe you are looking for