Search in form by using java bean or PJC.

hi all
i am confused because i do not know java bean to much,is it possible to create a search button with one text item in java bean to display all records
example:
if i enter dept 10 then it display all records related to dept 10?
is it possible?
if yes please cany anyone send me a demo?
here is my email add.
[email protected]
sarah

hi
Francois thanks for the link and its very useful and i am studying the codes and also i downloaded demos and run them its working fine and its very very nice.
i like java and trying to learn and its very useful.
why i want to use java bean because one of my friend her name is sheela she wants me to do it but i am failed i did not do it in java bean
so i thought lets try on the forum may be someone help u.
so i posted a thread over here.
thanks Francois.
u r appreciated.once again thanks.
sarah

Similar Messages

  • Help : Unable to use Java Beans in Oracle forms 6i

    Hi ,
    I have been trying to run few sample code to understand how to use Java beans in oracle forms 6i .But have been largely unsuccessfull.
    It will be great if somebody can provide me with some simple form( and java code )which uses java beans concept to give some data to the java program and receive some data from it . Pls inform me about the settings that need to be done.
    If you guys know it then pls take the pains of writing a simple form and java code.
    i hope somebody will respond because your reply is very necesary for me to proceed.
    U can email me the code > [email protected]
    Thanks in advance.

    Thanks for your reply Francois.
    Actually i am not facing problem understanding the programming technique.
    I think the problem at my end is more of a cofiguration one.I am using forms version 6i
    on oracle 8.
    Every time i set the imlementation class property of the bean area it gives an error 13010 which translates to that "the class being mentioned is not extending the IView class".
    The class i have written extends VBean so i am not sure why this error is occuring.
    I think if oracle (correctly) finds the java class to use then i will be able to proceed.
    Pls reply.
    If you have some code that is working fine then pls send it to me.And also inform is some environment variables have to be set for its use.

  • How to upload a file using java bean?

    hi,
    i need a code simple how to upload a file from jsp form to a java bean file (not a servlet)
    thank,s zik

    Hi,
    i need a code sample how to upload a file from jsp
    form to a java bean file (not a servlet)You can use jspSmartUpload component which is a free, fully-featured JSP component.
    jspSmartUpload provides you with all the upload/download features you could possibly wish for :
    * Simple and complete upload
    * Total control over the upload process
    * �Mixed forms� management
    * Total control over files sent
    * Download whatever you want
    For further information about jspSmartUpload please visit
    http://www.jspsmart.com/
    Hope this helps.
    Good Luck.
    Gayam.Srinivasa Reddy
    Developer Technical Support
    Sun Micro Sysytems
    http://www.sun.com/developers/support/

  • Using java bean with jsp

    hello friends,
    i'm new to jsp. i want to create an html form that accepts username and a value from four radio buttons and display back the entered name and checked radio button's value using java bean.
    i use the <jsp:setProperty id="" property="*"> method. i don't know how to access the radio buttons value from the html.
    also when i use an additional field other than username the jsp page is showing error.
    Please give me the correct method to use java bean with jsp in this circumstance.
    thank you.

    thank you, but i have a problem left. the case is like this.
    i got the jsp and bean worked fine when i have a sinle input text field.
    but when i added a second text field i recieved the following error.
    javax.servlet.ServletException: basket.newbean.getUserPass()Ljava/lang/String;
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
         org.apache.jsp.newform.process_jsp._jspService(process_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    where userPass is the new form element. I have made the subsequent chanes in my bean program and jsp file.
    pls hlp.

  • Running Oracle forms 9i using java plug in 1.4.x

    Hi,
    i want run my forms (9i) using java plug in 1.4.x? could u plz tel me what are changes i have to do in formsconfig and in other places.

    Thanks for the reply.
    I am using Webutil 1.06 an jacob 1.8 with Oracle forms 9iDS (9.0.2.9 version)
    i have gone through, step by step as u said,
    but form is not running.. i am able to run the form using java-plug-in (1.4.2.)
    but when i am implenting with webutil, form is not running...
    as i studied the links given by u, in that webutil is compatible with only from 10g.
    if so, which is the compatible webutil version for Oracle forms 9iDS (9.0.2.9 version).
    My actual goal is to store a file (it may be .doc, .pdf, .xls, .ppt) in the database and retrieving through forms..
    and also suggest me if there is any other ways to do it..
    plz suggest me..
    Naresh.P

  • Why use Java Beans?

    Why should we use java beans?
    Everybody says it is used to set the properties. What does this mean?
    Can anyone give me a realtime scenario of the problems it can solve?
    How does Spring framework utilize beans to solve problems? i.e wiring beans, declaring them in context file.

    shalearns wrote:
    Why should we use java beans?[http://java.sun.com/docs/books/tutorial/javabeans/index.html]
    Everybody says it is used to set the properties. What does this mean?[http://java.sun.com/docs/books/tutorial/javabeans/whatis/index.html]
    Can anyone give me a realtime scenario of the problems it can solve?[http://java.sun.com/docs/books/tutorial/javabeans/nb/index.html]
    How does Spring framework utilize beans to solve problems? i.e wiring beans, declaring them in context file.[http://static.springframework.org/spring/docs/1.2.x/reference/beans.html]
    ~

  • How to use Java Beans In JSTL?

    Hi
    I want to know how to use Java bean in JSTL
    please explain this with giving any one example.
    Thanks-
    Swapneel

    A bean is obtain by <jsp:useBean> tag nd once bean is obtained we can get its property by using getProperty tag.

  • Run oracle form 6i contain java bean in web?

    i have already made oracle form 6i contain java bean when i run it in client/server
    there is no errors but there is no bean to appear when i invoke it?
    and i'd like to put this form in the oracle application suite

    I think it is better for you to ask this question in Oracle Forms/Oracle Forms Server development forum.
    This issue would better addressed in Development forums.
    Just my 0.02£
    Yury

  • How can I using java bean to insert new record

    Hi everybody,
    I'd some problem when I insert a record using java bean. When insert a record, the resultset executeUpdate return 0 anc cannot add record to database. Would you please tell me what's wrong in my code?
    java bean
    package miniproj;
    import java.sql.*;
    public class Register{
    private String sql;
    private String username;
    private String usertype;
    private String password;
    private String blocknum;
    private int floornum;
    private String owner;
    private int rows;
    private String s;
    // set parameter to database
    public int setMember(){
    try{
    //load database driver
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // Get a connection to the database
    Connection sqlConn = java.sql.DriverManager.getConnection("jdbc.odbc:WFBS");
    // Get a statement from the connection
    Statement sqlStmt = sqlConn.createStatement();
    sql = "INSERT INTO USERS(user_name, password) VALEUS ('aaa', 'aaa')";
    // sql = "INSERT INTO USERS(user_name, password) VALEUS (" + user_name + "," + password + ")" ;
    rows = sqlStmt.executeUpdate(sql);
    // sqlRst.close();
    sqlStmt.close();
    sqlConn.close();
    catch(SQLException se){
    catch(Exception e){
    return rows;
    // set user name method
    public void setUsername(String name){
    username = name;
    // set passwrod method
    public void setPassword(String pwd){
    password = pwd;
    // set block num mehtod
    public void setBlockNum(String block){
    blocknum = block;
    // set floor num method
    public void setFloorNum(int floor){
    floornum = floor;
    // set owner method
    public void setOnwer(String own){
    owner = own;
    // get user name method
    public String getUsername(){
    return username;
    // get password method
    public String getPassword(){
    return password;
    jsp code
    <%@ include file="Header.jsp" %>
    <%@ page errorPage="Error.jsp" %>
    <jsp:useBean id="register" class="miniproj.Register" />
    <jsp:setProperty name="register" property="*" />
    User name : <%=register.getUsername()%><br>
    Password : <%=register.getPassword()%><br>
    <%
    int i = register.setMember();
    out.println(i);
    %>
    Thanks a lot
    Chris

    Seems to me that executeUpdate() would throw an SQLException, which in turn would get caught by your empty catch. The SQL keyword VALUES is misspelled. Put a 'se.printStackTrace()' in your catch to confirm this.

  • Value cannot refresh using Java bean

    When I use java bean to get a value. It suppose to refresh and show new value but it doesn't. So any code can help to resolve this issue.
    here is my code
    (Testing.jsp)
    <html>
    <head>
    <title>Page 3</title>
    <link rel=stylesheet type="text/css" href="auction.css">
    </head>
    <table class="mainBox" width="200">
    <tr><td class="boxTitle" >
    Testing number 3
    </td></tr>
    <tr><td>
    <span class="headline">
         <jsp:useBean id="testing2" class="com.jsp.newsys.testing.Testing2" scope="request">
         <jsp:setProperty name="testing2" property="user" value="Hello World"/>
    <jsp:getProperty name="testing2" property="user2"/>
         </jsp:useBean>
    </span>     
    </td></tr>
    </table>
    </html>
    The bean file which is Testing2.java
    package com.jsp.newsys.testing;
    import java.beans.*;
    import java.util.*;
    public class Testing2 extends Object implements java.io.Serializable {
         private String user;
         private String test;
    public Testing2() {
    public void setUser(String user)
              test="";
              if (user.equals("Hello World"))
                   test="Hi dqwqwd";
         public String getUser2()
         return this.test;
    I need to restart my tomcat everytime then only the value will refresh. Please help.
    Message was edited by:
    wesleygch
    Message was edited by:
    wesleygch
    Message was edited by:
    wesleygch

    Your bean maybe have misspelling error
    look at test and test2 on the jsp file. But I couldn't find any bean property test2 in your bean. Maybe you should try
    ${testing2.test} instead of ${testing2.test2}
    I am a new bie also....:-)

  • Step by Step how to Use Java Beans in Form 6i

    Dear All,
    Can anybody tell me step by step how to use Javabeans in form 6i.
    What i want is to know which form is getting executed and by whom with ip address on application server.
    When is execute the form made using javabeans
    Best Regards,
    Devendra

    Hello,
    <p>Here is the best way to start with Javabeans.<br>
    After reading that, you can see if this bean can fit</p>
    Francois

  • Using java bean in forms

    Hi,
    I want to import data from an excel file to oracle database. for this purpose i have find a java bean on :
    http://sites.google.com/site/jvrexcelproject/version-1-5-1-english
    i have download it.
    i put the jar files on forms/java
    i ve modify formsweb.cfg
    when i open my form , a message is displayed :
    FRM-13008: Cannot find JavaBean with name 'oracle.forms.jvr.xls.Read'
    please help me,
    thanks

    add Bean area in your form and set its Implementation class to oracle.forms.jvr.xls.Read (case sensitive)
    yesterday i wrote a new blog post about java bean but very basic ....... might help u to setup the thing
    http://baigsorcl.blogspot.com/2010/02/how-to-add-java-bean-by-writing-your.html
    Baig
    [My Oracle Blog|http://baigsorcl.blogspot.com/]

  • Upload to Excel using Java Bean

    Hi
    My requirement is that to upload the data to an excel sheet from a JTable(JTable is actually a java bean which gets its input from forms) and the user need to be given either to view the excel/save the excel/print the excel in any of the networked printers.
    Please cud someone help me with their inputs.
    Thanks again
    Deepa

    can you send me your code bean and form?
    I have example that i can send you to export to excel using webutil and OLE object.

  • Help with Login Form (JSP DB Java Beans Session Tracking)

    Hi, I need some help with my login form.
    The design of my authetication system is as follows.
    1. Login.jsp sends login details to validation.jsp.
    2. Validation.jsp queries a DB against the parameters received.
    3. If the query result is good, I retrieve some information (login id, name, etc.) from the DB and store it into a Java Bean.
    4. The bean itself is referenced with the current session.
    5. Once all that's done, validation.jsp forwards to main.jsp.
    6. As a means to maintain state, I prefer to use url encoding instead of cookies for obvious reasons.I need some help from step 3 onwards please! Some code snippets will do as well!
    If you think this approach is not a good practice, pls let me know and advice on better practices!
    Thanks a lot!

    Alright,here is an example for you.
    Assume a case where you don't want to give access to any JSP View/HTML Page/Servlet/Backing Bean unless user logging system and let assume you are creating a View Object with the name.
    checkout an example (Assuming the filter is being applied to a pattern * which means when a resource is been accessed by webapplication using APP_URL the filter would be called)
    public doFilter(ServletRequest req,ServletResponse res,FilterChain chain){
         if(req instanceof HttpServletRequest){
                HttpServletRequest request = (HttpServletRequest) req;
                HttpSession session = request.getSession();
                String username = request.getParameter("username");
                String password = request.getParameter("password");
                String method = request.getMethod();
                String auth_type  = request.getAuthType();
                if(session.getAttribute("useInfoBean") != null)
                    request.getRequestDispatcher("/dashBoard").forward(req,res);
                else{
                        if(username != null && password != null && method.equaIsgnoreCase("POST") && (auth_type.equalsIgnoreCase("FORM_AUTH") ||  auth_type.equalsIgnoreCase("CLIENT_CERT_AUTH")) )
                             chain.doFilter(req,res);
                        else 
                          request.getRequestDispatcher("/Login.jsp").forward(req,res);
    }If carefully look at the code the autherization is given only if either user is already logged in or making an attempt to login in secured way.
    to know more insights about where these can used and how these can be used and how ?? the below links might help you.
    http://javaboutique.internet.com/tutorials/Servlet_Filters/
    http://e-docs.bea.com/wls/docs92/dvspisec/servlet.html
    http://livedocs.adobe.com/jrun/4/Programmers_Guide/filters3.htm
    http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html
    http://www.servlets.com/soapbox/filters.html
    http://www.onjava.com/pub/a/onjava/2001/05/10/servlet_filters.html
    and coming back to DAO Pattern hope the below link might help you.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
    http://java.sun.com/blueprints/patterns/DAO.html
    http://www.javapractices.com/Topic66.cjp
    http://www.ibm.com/developerworks/java/library/j-dao/
    http://www.javaworld.com/javaworld/jw-03-2002/jw-0301-dao.html
    On the whole(:D) it is always a good practice to get back to Core Java/J2EE Patterns.and know answers to the question Why are they used & How do i implement them and where do i use it ??
    http://www.fluffycat.com/java-design-patterns/
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
    http://www.cmcrossroads.com/bradapp/javapats.html
    Hope that might help :)
    REGARDS,
    RaHuL

  • Using Java Beans in Java Server Pages

    Can we not use a method of Java Bean in a Java Server Page ?
    I am trying to retrieve the user email from a java bean method "getUserEmail". I am instantiating the class, but when I try to use that in JSP tags, I am getting an error.
    <jsp:useBean class = "formjavabean.application" id = "applicationId" scope = "session" />
    <%@ page import="java.io.*, java.lang.*" %>
    <%!
    String user = applicationId.getUserEmail() ;
    String f3 = "ftn03" ;
    String f3not = "ftn03 file not uploaded";
    ...........I am failing in debugging that, can anyone help plz ?

    Here is my whole code in parts:
    First the head section:
    <head>
    <title> Fastran </title>
    <jsp:useBean class = "formjavabean.application" id = "applicationId" scope = "session" />
    </head>JSP part in the body section :
    <%@ page import="java.lang.*, java.io.*" %>
    <%!
    private String f3 = "ftn03";
    private String f3not = "ftn03 file not uploaded";
    private String f7 = "ftn07";
    private String f7not = "ftn07 file not uploaded";
    private String f9 = "ftn09";
    private String f9not = "ftn09 file not uploaded";
    public String checkFile3()
        File ch3 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn03") ;
        if (ch3.exists() == true)
            return f3 ;
        else
            return f3not ;
    public String checkFile7()
        File ch7 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn07") ;
        if (ch7.exists() == true)
            return f7 ;
        else
            return f7not ;
    public String checkFile9()
        File ch9 = new File("C:\\JBoss\\jboss-4.0.5.GA\\bin\\Fastran\\ftn09") ;
        if (ch9.exists() == true)
            return f9 ;
        else
            return f9not ;
    %>Java Script in the body section, using methods defined in the JSP part:
    <script type="text/javascript">
            function validate_file ( )
                    var file3 = "<%= checkFile3() %>" ;
                    var file7 = "<%= checkFile7() %>" ;
                    var file9 = "<%= checkFile9() %>" ;
                    if ( file3 != "ftn03" || file7 != "ftn07" || file9 != "ftn09" )
                        alert("Please upload the required file") ;   
                        return ("fastran.jsp") ;
                    else
                        return ("processForm.jsp") ;
            function validate_upload ( )
                    valid = true;
                    if ( document.val_file.filefield.value == "")
                            alert("Please select a file for upload") ;
                            valid = false;
                    return valid;
        </script>Finally the form and button part of the page, in the body section:
    <form name = "val_file" method="post" action="upload.jsp" name="submit" enctype="multipart/form-data" onSubmit = "return validate_upload();">
    Upload Files: <input type="file" name="filefield" >&nbsp&nbsp<input type="submit" name="submit" value="Upload"><br>
    <font color = "Red"><h5>(ftn03,ftn07, and ftn09)</h5></font><br><br><br>
    Files on the server :<br><br>
    <font color = "Green"><h5>
    <%= checkFile3() %><br>
    <%= checkFile7() %><br>
    <%= checkFile9() %><br>
    </h5></font>
    <br><br><br><br><br><br><br><br><br>
    <input type=button onClick="location.href='logintest.jsp'" value='Home'>  <input type=button onClick="location.href=validate_file()" value='Proceed' ><br>
    </form>Now try this:
    Change <%! to <%, or try using bean method as:
    String userEmail = applicationId.getUserEmail() ;..........and that is my problem. I would really appreciate any help, thanks

Maybe you are looking for

  • OS X Mavericks on Mac Pro 2,1 and other customization

    Hello, So my friend and I want to give a Mac Pro 2,1 (from 2007-2008) a new life as editing machine for pictures and video. To be up to date with the latest software and stuff we wanted to upgrade to Mavericks, but it seems that it's not supported? L

  • BPM BpmPatternCollectTime problem

    Hi, I've been trying to get the example pattern BpmPatternCollectTime from SAP to work on PI 7.1. This pattern waits for messages and collects them into one message. I've checked my BPM against the SAP BPM and the only difference is that I'm using XS

  • Arabic Text Wrapping

    Hello, We are facing problems in our website with the new text layout framework. Text wrapping is not functioning. Arabic text is being shown right to left and everything is fine except when we have an arabic article which includes long sentences tha

  • [8i] Way to add a specific nbr of rows based on a column value? (Follow-up)

    I'm dealing with an old database that's being phased out, and here's the version info (yes, it's really old): Oracle8i Enterprise Edition Release 8.1.7.2.0 - Production PL/SQL Release 8.1.7.2.0 - Production CORE 8.1.7.0.0 Production TNS for HPUX: Ver

  • How to generate XML file out of ....

    I want to know, how to obtain a XML file as a output (in java), where in, the input is an object that contains number of enties in it. I found MXXMLParser doing something similar to, what I am interrested in. But it requires an comma seperated file a