Java bean - urgent help

Hi,
I am creating a java bean in a jsp file. I want to pass this bean to a java class in the same jsp file.
eg:
A1.jsp
<jsp:useBean id="customer" class="com.Customer" scope="session"/>
<jsp:setProperty name="customer" property="*"/>
<% Teller teller=new Teller();
int custid=teller.addCustomer("customer");
%>
Teller.java
public class Teller
public int addCustomer(*C*ustomer pcus)
          CustomerDb Cdb=new CustomerDb();
          return Cdb.addCustomer(pcus);
CustomerDb.java
public class CustomerDb{
int customerid;
public int addCustomer(*C*ustomer pcus){
     try{
some code....
When I try to compile Teller.java and CustomerDb.java it is giving error in the lines highlighted with bold.
Please help in this.

Problem Description
You are getting
FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-105100.
When you run FileUpload utility
Solution Description
Follow the steps given below to fix and run the FileUpload Bean successfully.
Make sure you have set your System Path similar to following, in the same order:
System PATH:
E:\Dev6i\bin;E:\Dev6i\forms60\java;E:\jdk1.2.2\bin;E:\jdk1.2.2\jre\bin;
E:\jdk1.2.2\jre\bin\classic; %SystemRoot%\system32;%SystemRoot%;
%SystemRoot%\System32\Wbem;C:\Program Files\Oracle\JInitiator1.1.8.16\bin;.
CLASSPATH :
E:\dev6i\forms60\java;E:\dev6i\forms60\java\UploadServer.jar;
E:\jdk1.2.2\jre\bin\classic;E:\jdk1.2.2\jre\lib;E:\Dev6i\TOOLS\COMMON60\JAVA\IMPORTER.JAR;.
Now, Open Form Builder ->Layout Editor->Program menu->Import Java Classes
Check here to make sure that the FileUpload.class is displayed there under
Oracle/forms/demos/uploadclient folder.
Note that the java bean uses the implementation class
file oracle.forms.demos.uploadclient.FileUploader
So, you need to put the FileUploader.class in
<ORACLE_HOME>\FORMS60\java\oracle\forms\demos\uploadclient\FileUploader.class
or you need to change the oracle.forms.demos.uploadclient.FileUploader
in implementation Class property matching to
the class name where you have actually put it.
You need to set archive_jini=f60all_jinit.jar,uploadclient.jar.sig in formsweb.cfg
Open the fileupload.fmb, remove the attached Library.
Open the fileupload.pll from File->Open.
Recompile all the procedure and packages again.
Save this fileupload.pll.
Then reattach this library as a attached library to this form, recompile the form.
This should solve the problem.
If the path is set as explained above solves the PDEUI0001 problem of
Java Importer also.
Explanation
Reason:
This error occurs when the upload button is pressed in the File upload utility
because the attached PLL library is not compiled properly.
Please let me know if this helps.
Regards
Grant Ronald
Forms Product Management

Similar Messages

  • Learning about Java Beans. Help!.

    Hello all.
    I want to learn to create and use JavaBeans, but not by where to begin.
    Somebody can explain to me that it is a Java Bean and as is used.
    Knows some site where it can see examples or it has a tutorial on Beans.
    Thank you very much.

    Hi
    I've just started learning Java too on my own. What I know about JavaBeans for the moment is that a JavaBean is a visual component you can create and give methods(setters and getters).
    For example: JPanel, JLabel, JTextField, these are examples of JavaBeans, but you can also create them by yourself.
    I use JBuilder 5 Enterprise from Borland. You can download JBuilder 6, trial version I belief from www.borland.com. I'm not certain.
    How do I create JavaBeans in JBuilder?
    First you have to create a new Project. Then you can go to the menu File/New and you choose to create a JavaBean. Then JBuilder asks for some information, which package, name, base class...
    I've made a JavaBean, xJTextField. With each JTextField, ussually you also have a JLabel, so I've created a JavaBean xJTextField based on a JPanel. In that panel I've placed two components, a JTextField and a JLabel. I've added some methods and that's it. Now I can place an instance of xJTextField on every frame and automatically I have a JLabel and JTextField.
    I have just begon too with Java, I hope I helped you a bit. If you would like it, I can send you my project with my JavaBean and some explanation.
    Do you know some interesting websites about J2EE?
    Rik

  • Datacapturing using Java Bean (Please help)

    I am stressed with this projeject. The stage I am at right now is that I want to capture some parameters from a posted form in my bean and send it to the database.
    Can anyone please help with advice.

    Here is the methos used to insert it did not work
    public String insertSkills_Developer() {
    try {
    // load the driver
    // create the connection
    // create the statement
         Stmt = C.createStatement();
    // create the sql to execute and execute
    String[] skill_dev_array = this. getDev_id();
    String[] skill_sets_array = this.getSkills_sets();
    int counter = 0;
    for(int i=0;i<skill_sets_array.length;i++)
    String insert_skill = "INSERT INTO ADEBAYO.DEV_SKILLS (dev_id, skill_id, skilled, interested, deliver_session, description) VALUES (" + this.getDev_id() +'","' + skill_sets_array'","' + this.getSkilled_id() + "','" + this.getSkills_ptp() + "','" + this.getSkill_ta() + "','" + this.getDescription() + "')";
    int stmtInt_2 = Stmt.executeUpdate(insert_skill);
    System.out.println("SQL COMMAND " + insert_skill);
    counter++;
         System.out.println("Inserted row " + counter);
    return "Inserted rows " + counter;
    } catch (SQLException E) {
         System.out.println(E);
         return "SQLException: " + E.getMessage();
    } catch (Exception e) {
         e.printStackTrace();
    return e.getMessage();
    } finally {
    // ALWAYS, ALWAYS close the connections to the db
    try {
    Stmt.close();
    C.close();
    } catch (Exception E) {
    E.printStackTrace();

  • (ABAP UNKNOWN JAVA UNKNOWN)-URGENT HELP

    Hello,
    I am trying to install SAP Enterprise portal on Application Server ECC, on step 8 of 8 I get an error of "ABAP UNKNOWN JAVA UNKNOWN 0:00 Minutes".  I am installing on option High Availability with Dialog Instance.  Any help is much appreciated.  Thanks
    Edited by: Amit Budhram on Jan 24, 2008 3:08 PM

    Hi,
    We have come across the same kind of problem while installing Dialog instance in Heterogeneous environment.
    So please place all the Profiles ( start profile and instance profile of DVEBMGS<NN> and SCS<00> ) in the profile folder which it is looking.
    Award points if helpful.
    Thanks,
    Tanuj

  • XSD to java beans

    How to convert complex xml(xml having compex attribute) into java beans
    pls help ASAP

    if you have the xsd or the dtd for the xml file, use JAXB for converting XML to java objects and vice versa.
    http://java.sun.com/webservices/jaxb/users-guide/jaxb-using.html
    this link should give you all the details you need.

  • Need urgent help on Java Bean

    Can some one help me to find a place for step by step documentation on how to create java bean and load an image thru java Bean on a form. I'm not loading from the same server it must be loaded from a different server.
    Very urgent please. I really appreciate any help.
    Thanks in advance.

    Hi,
    for the first part of your question: start Forms Builder, press F1 and the seach for Bean Area. The online help also comes with code examples
    for the second part, this URL will give you a head start: http://www.particle.kth.se/~lindsey/JavaCourse/Book/Java/Chapter11/loadingImages.html
    Frank

  • Urgent  help needed(java frames)

    Hi,
    I need urgent help for correcting a piece of code.
    I have written a piece of code for building a gui with some buttons, drawing some geometric shapes.The code consists of two files called Graph and Frame.
    The problem I suppose in the last part of the Graph file, which Rectangle and Circle are called together, the only shape that the program draws is rectangle.Here is the code:
    //Graph
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import java.io.*;
    import java.util.*;
    public class Graph extends JPanel {
    LinkedList color;
    LinkedList figures;
    public Graph() {
    setBackground(Color.white);
    figures = new LinkedList();
    color = new LinkedList();
    int z;
    class Point {
    int x;
    int y;
    public Point(int x, int y) {
    this.x = x;
    this.y = y;
    public Point(Point p) {
    x = p.x;
    y = p.y;
    public String toString() {
    return "(" + x + ", " + y + ")";
    public void move(Point dist) {
    x += dist.x;
    y += dist.y;
    abstract class GeomFigur {
    public abstract void move(Point p);
    class Line extends GeomFigur {
    Point p1, p2;
    public Line(Point p1, Point p2) {
    this.p1 = new Point(p1);
    this.p2 = new Point(p2);
    public String toString() { return "Line from " + p1 + " to " + p2;  }
    public void move(Point dist) {
    p1.move(dist);
    p2.move(dist);
    class Rectangle extends Line {
    public Rectangle(Point p1, Point p2) {
    super(p1, p2);
    public String toString() { return "Rectangle from " + p1 + " to " + p2; }
    class Circle extends GeomFigur{
    Point centre;
    int radius;
    public Circle(Point centre, int radius) {
    this.centre = new Point(centre);
    this.radius = radius;
    public String toString() {
    return "Circle, centre " + centre + ", radius " + radius;
    public void move(Point dist) { centre.move(dist); }
    public void addRectangle(int x, int y, Color col) {
    Rectangle r =new Rectangle(new Point(x,y),new Point(x+20,y+20));
    figures.addLast(r);
    color.addLast(col);
    repaint();
    public void addCircle(int x, int y, Color col) {
    Circle c =new Circle(new Point(x,y), 1 );
    figures.addLast(c);
    color.addLast(col);
    repaint();
    public void paintComponent(Graphics g) {
    super.paintComponent(g);
    for (int i=0;i < figures.size();i++) {
    Rectangle rect = (Rectangle)figures.get(i);
    //Circle circ = (Circle)figures.get(i);
    g.setColor(Color.black);
    g.drawRect(rect.p1.x,rect.p1.y,20,20);
    g.setColor((Color)color.get(i));
    g.fillRect(rect.p1.x,rect.p1.y,20,20);
    //g.setColor(Color.black);
    // g.drawOval(circ.centre.x,circ.centre.y,20,20);
    // g.setColor((Color)color.get(i));
    // g.fillOval(circ.centre.x, circ.centre.y, 20, 20);
    //Frame
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    public class Frame extends JFrame implements ActionListener {
    JButton button1, button2, button3, button4, button5 ;
    Graph gr;
    JComboBox cbx;
    JComboBox cby;
    JComboBox col;
    JMenu filemenu;
    JMenuItem quit;
    JMenuBar menubar;
    int x=10;
    int y=10;
    Color color=Color.red;
    public Frame() {
    menubar = new JMenuBar();
    filemenu = new JMenu("File");
    filemenu.setMnemonic('F');
    quit = new JMenuItem("Quit");
    quit.addActionListener(this);
    quit.setMnemonic('Q');
    quit.setAccelerator(KeyStroke.getKeyStroke('Q',Event.CTRL_MASK,false));
    filemenu.add(quit);
    menubar.add(filemenu);
    setJMenuBar(menubar);
    button1 = new JButton("Rectangle");
    button1.addActionListener(this);
    button2 = new JButton("Circle");
    button2.addActionListener(this);
    button4 = new JButton("Ellipse");
    button4.addActionListener(this);
    button5 = new JButton("Triangle");
    button5.addActionListener(this);
    button3 = new JButton("Reset");
    button3.addActionListener(this);
    String[] elements_x= {"10","20","30","40","50","60","70"};
    cbx = new JComboBox(elements_x);
    cbx.addActionListener(this);
    cbx.setActionCommand("cbx");
    String[] elements_y= {"10","20","30","40","50","60","70"};
    cby = new JComboBox(elements_y);
    cby.addActionListener(this);
    cby.setActionCommand("cby");
    String[] elements_color = {"Red","Blue","Green","Orange","Yellow" };
    col = new JComboBox(elements_color);
    col.addActionListener(this);
    col.setActionCommand("col");
    gr = new Graph();
    JPanel top = new JPanel(new BorderLayout());
    JPanel inputs = new JPanel(new GridLayout(6,1));
    inputs.add(button1);
    inputs.add(button2);
    inputs.add(button3);
    inputs.add(button4);
    inputs.add(button5);
    inputs.add(cbx);
    inputs.add(cby);
    inputs.add(col);
    top.add(gr,BorderLayout.CENTER);
    top.add(inputs,BorderLayout.WEST);
    getContentPane().add(BorderLayout.CENTER, top);
    setSize(500,300);//set window size
    //take care of actions
    public void actionPerformed(ActionEvent e) {
    String command = e.getActionCommand();
    if (command.equals("Quit")){
    System.exit(0);//terminate program
    else if (command.equals("Rectangle")){
    //add Rectangle to graph at
    //position x,y and with certain color
    gr.addRectangle(x,y,color);
    else if (command.equals("Circle")){
    gr.addCircle(x,y,color);
    else if (command.equals("Reset")){
    else if (command.equals("Triangle")){
    else if (command.equals("Ellipse")){
    else if (command.equals("cbx")){
    x=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("cby")){
    y=Integer.valueOf((String)((JComboBox)e.getSource()).getSelectedItem()).intValue();
    else if (command.equals("col")){
    String temp=(String)((JComboBox)e.getSource()).getSelectedItem();
    if (temp=="Red") color=Color.red;
    else if (temp=="Blue") color=Color.blue;
    else if (temp=="Green") color=Color.green;
    else if (temp=="pink") color=Color.pink;
    else if (temp=="lightGray") color=Color.lightGray;
    //main program
    public static void main(String [] args) {
    Frame appl = new Frame();
    appl.setVisible(true);
    Thanks in advance
    Marina

    Hi,
    You are very lucky that I'm currently boored. You should never tag a question as urgent. It might be urgent to you, but not to us who answer. And you should also use code formatting when you post code (see the formatting tips, or use the code-button).
    I made some changes to your Graph class. The most important thing is the abstract draw method that I added to the GeomFigur class.
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    public class Graph extends JPanel {
        LinkedList figures;
        public Graph() {
            setBackground(Color.white);
            figures = new LinkedList();
        int z;
        abstract class GeomFigur {
            protected Color color;
            public GeomFigur(Color color) {
                this.color = color;
            public abstract void move(Point p);
            public abstract void draw(Graphics g);
        abstract class Line extends GeomFigur {
            Point p1, p2;
            public Line(Color c, Point p1, Point p2) {
                super(c);
                this.p1 = new Point(p1);
                this.p2 = new Point(p2);
            public String toString() {
                return "Line from " + p1 + " to " + p2;
            public void move(Point dist) {
                p1.move(dist.x, dist.y);
                p2.move(dist.x, dist.y);
        class Rectangle extends Line {
            public Rectangle(Color c, Point p1, Point p2) {
                super(c, p1, p2);
            public String toString() {
                return "Rectangle from " + p1 + " to " + p2;
            public void draw(Graphics g) {
                System.out.println("Draw rectangle at " + p1 + " with color " + color);
                g.setColor(Color.black);
                g.drawRect(p1.x, p1.y, 20, 20);
                g.setColor(color);
                g.fillRect(p1.x, p1.y, 20, 20);
        class Circle extends GeomFigur {
            Point centre;
            int radius;
            public Circle(Color c, Point centre, int radius) {
                super(c);
                this.centre = new Point(centre);
                this.radius = radius;
            public String toString() {
                return "Circle, centre " + centre + ", radius " + radius;
            public void move(Point dist) {
                centre.move(dist.x, dist.y);
            public void draw(Graphics g) {
                System.out.println("Draw circle at " + centre + " with color " + color);
                g.setColor(Color.black);
                g.drawOval(centre.x, centre.y, 20, 20);
                g.setColor(color);
                g.fillOval(centre.x, centre.y, 20, 20);
        public void addRectangle(int x, int y, Color col) {
            System.out.println("x,y,col " + x + ":" + y + ":" + col);
            Rectangle r = new Rectangle(col, new Point(x, y), new Point(x + 20, y + 20));
            figures.addLast(r);
            repaint();
        public void addCircle(int x, int y, Color col) {
            System.out.println("x,y,col" + x + ":" + y + ":" + col);
            Circle c = new Circle(col, new Point(x, y), 1);
            figures.addLast(c);
            repaint();
        public void paintComponent(Graphics g) {
            super.paintComponent(g);
            for (int i = 0; i < figures.size(); i++) {
                GeomFigur drawable = (GeomFigur)figures.get(i);
                drawable.draw(g);
    }/Kaj

  • Urgent : java bean having bidirectional one to many relationship

    Hi,
    We have complex requirement in our application.
    We need to copy java bean having bidirectional one to many relationship to another javabean having bidirectional one to many relationship..
    E.g
    Class Basket1 {
    public String color;
    pubic String type;
    public List<Basket1> basketList = new ArrayList()
    Class Basket2 {
    public String color;
    pubic String type;
    public List<Basket2> basketList = new ArrayList()
    We need to exact copy Basket1 to Basket2. We are in trouble to copy List of child because we do not have how many child Basket1 have of same type..
    Can someone help us how we can implement such kind of complex object bidirectional one to many relationship??

    I can't see anything bidirectional about these relationships. What I can see is a couple of BasketN classes that look identical so I don't know why they both exist, and they both contain lists of themselves as members, which suggests some kind of tree structure. Nothing bidirectional there. I can see tat these things can form circular object graphs but I don't see why you would want to do that.
    We need to exact copy Basket1 to Basket2And I don't know what that means. Please explain.

  • Need Help-How Store the input parameter through java bean

    Hello Sir,
    I have a simple Issue but It is not resolve by me i.e input parameter
    are not store in Ms-Access.
    I store the input parameter through Standard Action <jsp:useBean>.
    jsp:useBean call a property IssueData. this property exist in
    SimpleBean which create a connection from DB and insert the data.
    At run time servlet and server also show that loggging are saved in DB.
    But when I open the table in Access. Its empty.
    Ms-Access have two fields- User, Password both are text type.
    Please review these code:
    login.html:
    <html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>LoginServlet.java:
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String user=request.getParameter("user");
    String pass=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setUserName(user);
    st.setPassword(pass);
    request.setAttribute("user",st);
    request.setAttribute("pass",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }SimpleBean.java:
    package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String user="";
    private String pass="";
    private String s="";
    public String getUserName() {
    return user;
    public void setUserName(String user) {
    this.user = user;
    public String getPassword() {
    return pass;
    public void setPassword(String pass) {
    this.pass = pass;
    public String getIssueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getUserName();
    getPassword();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:simple");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUserName();
    st.setString(1,User);
    String Password=getPassword();
    st.setString(2,Password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s=  "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }submit.jsp:
    This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("user")).getUserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("pass")).getPassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:getProperty name="st" property="IssueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>issue.jsp</jsp-file>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Please Help me..Thanks.!!!
    --

    Dear Sir,
    Same issue is still persist. Input parameter are not store in database.
    After follow your suggestion when I run this program browser show that:i.e
    This is Submit page Hello Student Name: vijay
    Password: kumar
    <jsp:setProperty name="st" property="userName" value="userValue/> Your logging is saved in DB
    Please review my code.
    login.html:
    {code}<html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="tmp" >
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>{code}
    LoginServlet.java:
    {code}import javax.servlet.*;
    import javax.servlet.http.*;
    public class LoginServlet extends HttpServlet{
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException{
    try
    String userValue=request.getParameter("user");
    String passValue=request.getParameter("pass");
    co.SimpleBean st = new co.SimpleBean();
    st.setuserName(userValue);
    st.setpassword(passValue);
    request.setAttribute("userValue",st);
    request.setAttribute("passValue",st);
    RequestDispatcher dispatcher1 =request.getRequestDispatcher("submit.jsp");
    dispatcher1.forward(request,response);
    catch(Exception e)
    e.printStackTrace();
    }{code}
    SimpleBean.java:
    {code}package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean {
    private String userValue="";
    private String passValue="";
    private String s="";
    public String getuserName() {
    return userValue;
    public void setuserName(String userValue) {
    this.userValue = userValue;
    public String getpassword() {
    return passValue;
    public void setpassword(String passValue) {
    this.passValue= passValue ;
    public String getissueData() //method that create connection with database
    try
    System.out.println("Printed*************************************************************");
    getuserName();
    getpassword();
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("Connection loaded");
    Connection con=DriverManager.getConnection("jdbc:oracle:thin:@VijayKumar-PC:1521:XE","SYSTEM","SYSTEM");
    System.out.println("Connection created");
    PreparedStatement st=con.prepareStatement("insert into vij values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String userName=getuserName();
    st.setString(1,userName);
    String password=getpassword();
    st.setString(2,password);
    st.executeUpdate();
    System.out.println("Query Executed");
    con.close();
    s= "Your logging is saved in DB ";
    System.out.println("Your logging is saved in DB *****************");
    return(s);
    catch(Exception e)
    e.printStackTrace();
    return "failed";
    }{code}
    submit.jsp:
    {code}This is Submit page
    <html><body>
    Hello
    Student Name: <%= ((co.SimpleBean)request.getAttribute("userValue")).getuserName() %>
    <br>
    Password: <%= ((co.SimpleBean)request.getAttribute("passValue")).getpassword() %>
    <br>
    <jsp:useBean id="st" class="co.SimpleBean" scope="request" />
    <jsp:setProperty name="st" property="userName" value="userValue/>
    <jsp:setProperty name="st" property="password" value="passValue"/>
    <jsp:getProperty name="st" property="issueData" />
    </body></html>web.xml:<web-app>
    <servlet>
    <servlet-name>one</servlet-name>
    <servlet-class>LoginServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>one</servlet-name>
    <url-pattern>/tmp</url-pattern>
    </servlet-mapping>
    <jsp-file>submit.jsp</jsp-file>
    <url-pattern>*.do</url-pattern>
    <welcome-file-list>
    <welcome-file>Login.html</welcome-file>
    </welcome-file-list>
    </web-app>Sir I can't use EL code in jsp because I use weblogic 8.1 Application Server.This version are not supported to EL.
    Please help me...How store th input parameter in Database through Java Bean                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • 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

  • Need Help Regarding JAVA BEAN

    Is any one tell me that JAVA BEAN only used in WEB or also you in Desktop applications???? and aslo tell how i implement Java class and use JAVA BEAN. I need help regarding above matter
    thanks in advance
    Rehan MIrza

    Here is a good link that indicate that JavaBean is not only for applets
    http://java.sun.com/docs/books/tutorial/javabeans/whatis/beanDefinition.html
    quote:
    The JavaBeans API makes it possible to write component software in the Java programming language. Components are self-contained, reusable software units that can be visually composed into composite components, applets, applications, and servlets using visual application builder tools. JavaBean components are known as Beans.
    Francois

  • URGENT Help: Converting JAVA ALE API (9.3)  to MDX API (11.1.1)

    Hi All,
    currnetly I am in the process of converting ALE to MDX API as ALE is no more used
    com.hyperion.ap.IAPMdMember in ALE Api gives the member details like Alias, level, Gen etc
    Equivalent to IAPMdMember , In MDX there are two
    1.com.essbase.api.metadata.IEssMember -> It gives all the member details like Alias, level, Gen etc
    IEssMember metatdata extraction is very slow. need to increase maxport user as Goodwin said.Even then for 10 lakhs metadata it fails at one point or other (Using outline or member selection every thing fails)
    SEVERE: Cannot get members. Essbase Error(1007165): Cannot obtain new member handle.  The maximum number of open member handles for this outline has been reached.  You must save and close the outline to continue
    2. com.essbase.api.dataquery.IEssMdMember - It gives members Name/alias based on Query setting and some properties like readonly etc.
    This IEssMdMember metadata extraction is very fast. Even 10 lakhs data is retrieved ina minute, but I am in need of Alias, level and Gen to frame the metadat as Nodes (or in bean object with same hierarchy)
    can some Java MDX experts help me.Is there any to access member details like geb, level, alias using IEssMdMember? I searched in API i couldnt find any clue. converting IEssMdMember to IEssMember using outline findmember also time consuming and it taking 2 to 3 days to fetch the 10 lakhs record.
    If there is no way to get details , then give me some tips how it can be managed, by cache technology or threading or is there any fastest collection object available

    Add the below DIMENSION properties in MDX query will provide the Gen_Number, level and alias
    DIMENSION PROPERTIES MEMBER_ALIAS ,GEN_NUMBER ,LEVEL_NUMBER,MEMBER_NAME on columns
    Thanks for http://www.network54.com/Forum/58296/

  • Need some help how to generate xml from java bean.

    Hi,
    Can some one help me how to generate the xml format output from a java bean.
    The bean contains around 15 to 20 attribute values.
    Thanks in Advance.
    sarayu

    You can use XMLEncoder with custom persistence delegates if needed:
    http://java.sun.com/products/jfc/tsc/articles/persistence4/

  • Help on Java Bean

    I have learnt java to a good point but ca someone help me on wrapping my classes to java beans. I need basic steps to wrapping my classes to javabeans. thanks

    Base requirements are that the class is serializable and has public get/set method for attributes.

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

Maybe you are looking for

  • Problem using my Group level function in a chart

    Post Author: LcdCyn CA Forum: Charts and Graphs I have created a function (StatePerRecord) that is displayed under the Details section to evaluate each records' state: Here is my code: If Not IsNull () Then    (    select         case "fail":        

  • Looking for 2 Product Solutions for eCommerce site created in Muse and published to BC

    Seeking suggestions for 2 separate BC eCommerce website product applications: I have within BC so far about 200 image in the in a folder in the "File Manager" -AND- each image has been optimized as a low-res digital image down-load product (divided a

  • Region refresh on clicking button

    Hello, I have created one report and report should be refresh on clikcing REFRESH button.so for that i have created DYNAMIC ACTION that action is fired on clicking REFRESH (DOM objects). But region can not refresh as other SET VALUE action fired. Can

  • Windows under a Java programm

    Hello, how can I implement Windows of instructions with a Java program? A program steer, without being even active. Separate only over a Javaprogramm. How can I Windows Shut down?? Thanks

  • Need NEW Tiger on Ti G4 and its not available

    I need to run Photoshop CS3 and open files from NIKON DSLR RAW NEF and I have 0S 9.2, and Fry's San Diego computer store say it will not run on my Titanium the new OS X.v10.5 and APPLE store dont sell TIGER, where can I buy it new, Thanks I already b