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

Similar Messages

  • How to include a .class file in a jsp page

    hi everyone,
    i know the syntax as:
    <%@ include file = "filename.class" %>
    then at run time the server could not find the class file
    if i use,
    <%@ page import = "FileName.class" %>
    then also the same problem persists
    & if i use
    <jsp:include page = "Relative address"/>
    the problem still remains as it is...
    please help me out...i am working on developing an EJB application in which client interacts with server's Stateful session bean through a jsp page...it is necessary for me to include the home interface class file in my jsp page.
    P.S. do not suggest me to include the class file in a package & then use
    <%@ page import = "packageName.ClassFileName" %>
    i
    Edited by: Ankit_JIITU on 6 Jul, 2008 1:55 AM

    Ankit_JIITU wrote:
    i have already included the remote interface class file by <%@ page import = "University.RemoteInterfaceName" %>in my jsp page ...
    if i try to make a new package called test & then include my home interface in that package...i need to import University.*to generate the class file of my home interface ; but the class file generation is not taking place as i am getting the error..
    "package University does not exist".How can i overcome this problem. The package University, which you are trying to import, must be in the classpath. If you removed it then you will have to add it back.
    i have tried my best..but tell me if there's any possible way of including a class file in the jsp page without involving a package.No, there isn't.
    If not,then pls help me to generate the class file of my home interface within a package called test.Read the New To Java Tutorial and understand how packages work.
    >
    i am assuming that u have a deep knowledge of developing EJB applications.

  • 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 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.

  • 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?

  • How to Include a HTML file in a UIX Page

    I have an old .html file (content.html) which contains some infomation and now I want to present that information inside a Uix Page! Is it possible to do so if then how.
    I tried using uix include tag but no luck.
    Any help is greatly appreciated.
    Thanks
    Kolluru

    Here is the .jsp file and the serverinclude tag is written in the 4th line from last.
    <uix:servletInclude source="layout.html" />
    I want the content of the layout.html in the main content pane but instead it is getting added on to the top or to the SideNav.
    Thanks for the help anyway.
    ====================================================
    <%@ page errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://xmlns.oracle.com/uix/ui" prefix="uix" %>
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <jbo:ApplicationModule id="MyBC4JModule" definition="MyUIX.MyBC4JModule" releasemode="Stateful" />
    <jbo:DataSource id="ds1" appid="MyBC4JModule" viewobject="EmpView1" rangesize="4" />
    <%-- user interface begins here --%>
    <HTML>
    <HEAD>
    <TITLE>Oracle Migration Maps </TITLE>
    <uix:styleSheet/>
    </HEAD>
    <BODY>
    <uix:pageLayout>
    <uix:pageHeader>
    <uix:globalHeader selectedIndex="0">
    <uix:contents>
    <uix:link text="Migration Maps" destination="uixpage1.jsp" />
    <uix:link text="Migration Checklist" destination="http://www.oracle.com" />
    <uix:link text="Templates" destination="http://www.oracle.com" />
    <uix:link text="Scripts" destination="http://mtg.ie.oracle.com" />
    <uix:link text="Release" destination="http://www.oracle.com/" disabled="true" />
    </uix:contents>
    </uix:globalHeader>
    </uix:pageHeader>
    <uix:productBranding>
    <uix:image source="productBrand.gif" shortDesc="product" />
    </uix:productBranding>
    <uix:cobranding>
    <uix:image source="cobrand.gif" shortDesc="brand" />
    </uix:cobranding>
    <uix:copyright>
    <uix:flowLayout>
    <uix:contents>
    <uix:image source="images/info.gif" />
    <uix:link text=" @Copyright 2003, Oracle Corp. " destination="http://www.oracle.com" />
    </uix:contents>
    </uix:flowLayout>
    </uix:copyright>
    <uix:privacy>
    <uix:flowLayout>
    <uix:contents>
    <uix:image source="images/info.gif" />
    <uix:link text="privacy statement" destination="http://www.oracle.com" />
    </uix:contents>
    </uix:flowLayout>
    </uix:privacy>
    <uix:globalButtons>
    <uix:globalButtonBar>
    <uix:contents>
    <uix:globalButton icon="images/returntoportal.gif" text="Home"
    destination="uixpage1.jsp"/>
    <uix:globalButton icon="images/logout.gif" text="Logout"
    destination="http://www.oracle.com"/>
    <uix:globalButton icon="images/preferences.gif" text="Preferences"
    destination="http://www.oracle.com"/>
    <uix:globalButton icon="images/help.gif" text="Help"
    destination="http://www.oracle.com" targetFrame="_blank"/>
    </uix:contents>
    </uix:globalButtonBar>
    </uix:globalButtons>
    <uix:breadCrumbs>
    <uix:contents>
    <uix:link text="Home" destination="uixpage1.jsp" />
    <uix:link text="Qualification" destination="qualification.jsp" />
    <uix:link text="Customer Survey" destination="customersurvey.jsp" />
    </uix:contents>
    </uix:breadCrumbs>
    <uix:quickSearch>
    <uix:messageTextInput prompt="Search" name="QSearch" text="Cabo">
    <uix:end>
    <uix:submitButton accessKey="g" text="Go" />
    </uix:end>
    </uix:messageTextInput>
    </uix:quickSearch>
    <uix:start>
    <uix:sideNav>
    <uix:link text="Home" destination="uixpage1.jsp" />
    <uix:link text="Help" destination="/site1/PageTemplate.jsp" />
    <uix:link text="Migration Process Guide" destination="http://pta.us.oracle.com:9999/" />
    <uix:link text="MSMS v1.1" destination="http://amgdev1.ie.oracle.com/mtg/" />
    <uix:link text="Knowledge Base" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Factory Infrastructure" destination="http://webiv.oraclecorp.com" />
    <uix:link text="BugDB" destination="http://bug.us.oracle.com" />
    <uix:link text="Oracle Migration Workbench " destination="http://webiv.oraclecorp.com" />
    <uix:link text="Application SQL Tools" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Support" destination="http://webiv.oraclecorp.com" />
    <uix:link text="Migration Technology Centre" destination="http://otn.oracle.com/tech/migration/content.html" />
    <uix:link text="Migration Technology Group" destination="http://mtg.ie.oracle.com" />
    </uix:sideNav>
    </uix:start>
    <uix:end>
    <uix:contentContainer text="Related Maps" background="light" icon="testInfo.gif" width="100%">
    <uix:link text="Customer Surveys" destination="http://www.oracle.com" />
    <uix:link text="Survey Request" destination="http://www.oracle.com" />
    <uix:link text="Customer Analysis" destination="http://www.oracle.com" />
    </uix:contentContainer>
    </uix:end>
    <%-- Main page contents go here --%>
    <uix:contents>
    <uix:header styleClass="OraLightHeader" text="Qualification Stage" />
    <uix:styledText styleClass="OraHeaderSubSub" text="" />
    <uix:spacer width="10" height="15" />
    <uix:styledText styleClass="OraDarkHeaderSubSub" text="Qualifying the Customer - Receiving Customer Surveys" />
    <uix:spacer width="10" height="10" />
    <bc4juix:TableDetail></bc4juix:TableDetail>
    <uix:styledText styleClass="OraInstructionText" text="Prospective customers
    are identified by a variety of sources, such as sales consultants and
    Oracle Direct. These customers are asked to complete a customer survey and
    the results are automatically sent to the Migration Factory. The table below
    lists the location of the customer surveys once they are released on the
    Oracle eMarketing system." />
    <uix:spacer width="10" height="20" />
    <uix:servletInclude source="layout.html" />
    </uix:contents>
    </uix:pageLayout>
    </BODY>

  • How I can include js (javascript) file in a jsp page?

    Hi,
    I�ve tried to include a js (javascript) file in jsp file but it doesn�t work.
    When I try to use a js function in the browser I always receive an error. Oh, of course, I�m including the correct tag <script src= ...
    What can I do? Does the problem in the WebServer?

    I cheated and put the scripts in another '.jsp' file and had no problem...then put an include b4 the closing 'head' tag, like this:
    <jsp:include page="scrpt.jsp" flush="true" />
    I had to do it this way for debugging using JDeveloper (it doesnt seem to like '.js' files). But when the jsp is on the server I used the following line instead:
    <script language='JavaScript' src='scrpt.js'></script>
    hope this helps.

  • 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.

  • How to embed a .swf file to my jsp page in eclipse

    I had a swf file which i want to include in my jsp page.
    To embed it i m using this code
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
    WIDTH="550" HEIGHT="400" id="Main">
    <PARAM NAME=movie VALUE="Main.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=bgcolor VALUE=#FFFFFF>
    <EMBED src="images/Main.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400"
    NAME="Main" ALIGN="" TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
    </EMBED>
    </OBJECT>
    but its not working i had also checked the path of the swf.
    I am using eclipse 3.1
    Thanks,
    Leozeo
    Edited by: leozeo on Mar 27, 2008 4:22 AM

    Hi,
    Did you try Object-> insert HTML, see if that helps

  • 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

  • Link to a file in the jsp page does not open correctly

    Hi all,
    I have a JSP application which is similar to a discussion forum and the messages usually carry a link to an attachment file which could be of any extension.
    The client pool I am dealing with are concerned only with MS Word/Excel/PPT files. When the user clicks on the file, a new browser window opens but it does not open the file in the correct application. I know that browsers can display Doc, ppt and xls files.
    In my case, the browser just shows some garbage. THe link is to the correct file, I know that because I can right click and download the file and then open it in the correct application. But I want browser to find the application and open the file.
    Can somebody give me hints as to what may be wrong?
    Also, I am in the development stage and therefore I have only 100 odd messages in the database. Many have attachements. But only one attachment to a particular message works well..ie the browser finds MS Word and displays the doc.
    Why not the remaining doc/ppt files?
    Help please!!
    Thanks in advance.
    m_asu

    Add the following code to web.xml mime-mapping section and restart tomcat:
    <mime-mapping>
    <extension>doc</extension>
    <mime-type>application/msword</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>xls</extension>
    <mime-type>application/msexcel</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>ppt</extension>
    <mime-type>application/ms-powerpoint</mime-type>
    </mime-mapping>

  • 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 can I merge my files in the correct page order?

    Hello -
    I'm trying to combine several files... but I want to arrange the order of the pages. Does anyone know how to do this?
    Thanks!

    Hi alicia.horton,
    When you use the Combine Files option on Acrobat.com, you can determine which order the files are combined, but not at the page level. For that, you would need Acrobat. (If you have an Acrobat subscription, you'll also see an Organize Files option on Acrobat.com, which you could use to rearrange pages.)
    Best,
    Sara

  • Is anyone know how to create dynamic pdf file from a JSP page or Servlet ?

    Hi
    Is any one know how to create a dynamic PDF file from JSP or servlet. I need to have standard form format needs to be created and want to send the info to that form dynamically.
    Is there any libraries available?
    Thanks

    I posted a link in this thread to a lib that lets you create PDFs from an app. They have a Java version. I have not used it but I know someone who used it with Microsoft ASP and they liked it.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=287285
    -S-

Maybe you are looking for

  • Subject: Integrating SMS and Email Notifications

    Hi All, I'm trying to integrate our email notification system with some sort of SMS messaging system and I've a couple of questions 1. Is it free to send the SMS from my java application... 2. If I'm using smslib and GSM modem......who pay's for the

  • Can I move Array from one Xserve RAID to another and keep the data

    I'd like to move a set of disk with an existing Array from one Xserve RAID to another. Can I simply shutdown both Xserve RAIDs and move the disk over, assuming I put the disk back in the same order?

  • In-process inspection in repetitive manufacturing

    Hi, My client handles assembling of electronic products.  product passes through different set of operations where in it proceeds to the next operation only when the prior operation is approved in terms of quality. We are trying to go with repetitve

  • Fusion MIddleware 11g

    Hi, Trying to install Oracle Fusion Middleware 11gR1 on windows. I have followed the guidelines provided in the http://download.oracle.com/docs/cd/E12839_01/install.1111/e14318/toc.htm 1. Installing the weblogic (11g) 2. Oracle 11g databse installati

  • Import to different user - triggers/functions invalid

    Hi, I´m using Oracle 9.2 in both servers. In my production server, I export the schema CARS. In my dev server I have two schemas: CARS and CARS_DEV. I can import the dump file to CARS_DEV using TO/FROM. The command that I'm using is: imp file=carsFeb