May i use the session bean in the jsp

<%@ page import="sms.EJB.*,sms.UserDetailEJB.*" %>
<%
if (request.getParameter("userid")!=null && request.getParameter("password") !=null && request.getParameter("userLevel")!=null)
UserHome userHome look up...
UserLocal userLocal;
userLocal = userHome.create(userid,password,userlevel);
%>
<html>
     <head>
          <title>Insert One Page</title>
     </head>
     <body>
     <form action="/testing/insertOne.jsp">
          <h1 align="center">Insert into User Database !</h1>
          <table align="center">
               <tr>
                    <td bgcolor ="#FFFCCC">User Name :</td>
                    <td bgcolor ="#FFFCCC"><input type="text" name="userName" size="12" maxlength="12"></td>
               </tr>
               <tr>
                    <td bgcolor ="#FFFCCC">Password :</td>
                    <td bgcolor ="#FFFCCC"><input type="password" name="password" size="12" maxlength="12"></td>
               </tr>
               <tr>
                    <td bgcolor ="#FFFCCC">User Level :</td>
                    <td bgcolor ="#FFFCCC"><input type="text" name="userLevel" size="12" maxlength="12"></td>
               </tr>
          </table>
          <p align="center"><input type="submit" name="submit" value="add it"</p>
     </form>
     </body>
</html>
May i use the session bean like this, if i dont want to use the data access object
may i use this...

Hey it apperars to me like heero82 is using session facade and all he has to do is use session bean to make one business call on session bean. Now if u say it is not correct then i would like to know the better way to doing so.
I can imagine one ways is use business delegate. Just make new of java class in jsp and let that java class do lookup and delegate the call to session facade.
Let me know inpout on this
pranav

Similar Messages

  • Error while adding a new method to the Session Bean

    Hello everyone. I'm using jdev 11g, ejb, jpa & jsf. Everything works fine. But when I try to add a custom method to the Session Bean, I'm having an error.
    Here is my steps:
    1) I added a new method to SessionBean.java. Something like this:
    public void Hello() {
    System.out.println("Hello!");
    2) Then using Structure palette I exposed this method through Local interface and created data control
    3) Finally, I made a command button binded to this method (just droped it from DataControls.dcx to my page)
    When I start the page and click the button, I'm having the following error:
    Error 500--Internal Server Error
    javax.faces.el.EvaluationException: Method not found: Hello.execute(javax.faces.event.ActionEvent)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:58)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1227)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:70)
    ... (I've truncated the log because there is nothing important in the missing part)

    Yes, I have binding in the page def. Everything is correct there:
    <methodAction id="Hello" RequiresUpdateModel="true" Action="invokeMethod"
    MethodName="Hello" IsViewObjectMethod="false"
    DataControl="PriceServiceLocal"
    InstanceName="PriceServiceLocal.dataProvider"/>
    I've droped the method from the Data Controls panel

  • Cannot deploy a EJB 3.0 Session bean to the OAS 10.1.3.4

    Hi All,
    I am unable to deploy a EJB 3.0 Session bean with no deployment descriptors to OAS 10.1.3.4 App server.This Session bean is also exposed as a web service using annotations. I am able to deploy this bean to a standalone oc4j 10.1.3.x containers and test it successfully.
    i have written a simple stateless session bean ( exposed as webservice) and every bean is having issues with deployment having the same exception stated below
    Can some one please help as i need to deploy this urgently.
    below is the session bean code:
    import javax.ejb.Stateless;
    @Stateless(name="SiebelQuoteEJB")
    public class SiebelQuoteEJBBean implements SiebelQuoteEJBLocal,
    SiebelQuoteEJBWebService {
    public SiebelQuoteEJBBean() {
    public String publishMessage(String message,String type) throws java.rmi.RemoteException {
    client.publishMessage(message,type);
    return "SUCCESS";
    Below is the error while deploying:
    11/01/06 15:03:49 WARNING: Application.setConfig Application: javasso is in failed state as initialization failed.
    java.lang.NullPointerException
    11/01/06 15:03:50 WARNING: Application.setConfig Application: SiebelQuoteEJB is in failed state as initialization failed.
    java.lang.InstantiationException: Error initializing ejb-modules: null Error parsing application-server config file: null
    11/01/06 15:03:50 java.lang.NullPointerException
    at com.evermind.server.ObjectReferenceCleaner.cleanupApplicationLogLevels(ObjectReferenceCleaner.java:166)
    at com.evermind.server.ObjectReferenceCleaner.loaderDestroyed(ObjectReferenceCleaner.java:88)
    at oracle.classloader.EventDispatcher.loaderDestroyed(EventDispatcher.java:248)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1113)
    at oracle.classloader.PolicyClassLoader.close(PolicyClassLoader.java:1041)
    at com.evermind.server.ApplicationStateRunning.destroyClassLoaders(ApplicationStateRunning.java:1171)
    at com.evermind.server.Application.stateCleanUp(Application.java:3635)
    at com.evermind.server.Application.setConfig(Application.java:506)
    at com.evermind.server.Application.setConfig(Application.java:355)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1895)
    at com.evermind.server.ApplicationServer.initializeDeployedApplications(ApplicationServer.java:1651)
    at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1034)
    at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:131)
    at java.lang.Thread.run(Thread.java:736)

    which jdk version? Had this with 1.6 and had to install an up-to-date jdbc.

  • How can i lookup a session bean from the client side

    how can i lookup a session bean from the client side...........i am using sun appserver..............
    this is my code.................[B]
    private final static String JNDI_NAME="ejb/LmsBean";
    private static String url="ldap://localhost:4848";
    Hashtable h=new Hashtable();
    h.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
    h.put(Context.PROVIDER_URL,url);
    System.out.println("Before Loading Context in Delegate");
    Context ctx=new InitialContext(h);
    System.out.println("Loaded Context in Delegate");
    Object obj=ctx.lookup(JNDI_NAME);
    System.out.println("Loaded Object in Delegate");
    System.out.println("Before Loading Home in Delegate");
    LmsHome home = (LmsHome )PortableRemoteObject.narrow(obj,com.parx.lms.controller.LmsHome.class);
    System.out.println("Loaded Home in Delegate");
    lms = home.create();
    System.out.println("Loaded remote in Delegate");
    [B]and i got the exception........
    Inside Client before calling delegate
    Before Loading Context in Delegate
    javax.naming.CommunicationException: Request: 1 cancelled
    javax.naming.CommunicationException: Request: 1 cancelled
    at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:60)
    at com.sun.jndi.ldap.Connection.readReply(Connection.java:405)
    at com.sun.jndi.ldap.LdapClient.ldapBind(LdapClient.java:340)
    at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:171)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2640)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:290)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175)
    at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193
    at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.ja
    va:136)
    at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.jav
    a:66)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
    62)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243
    at javax.naming.InitialContext.init(InitialContext.java:219)
    at javax.naming.InitialContext.<init>(InitialContext.java:195)
    at com.parx.lms.lmsdelegate.LmsDelegate.getController(LmsDelegate.java:3
    0)
    at com.parx.lms.lmsdelegate.LmsDelegate.addUserDelegate(LmsDelegate.java
    :50)
    at com.parx.lms.client.consoleClient.Client.main(Unknown Source)
    pls go tru the exception and pls help.........

    That url string should be having the server name or ip instead of localhost.

  • Error message: 'Codec not found. You may be using a compression type without the corresponding hardware card' - then - 'Error. Out of memory'

    Hi all. This is a new error I've never seen before.
    It's stopping me doing anything at all really.
    As soon as I start up FCP and click on a sequence I get this message: 'Codec not found. You may be using a compression type without the corresponding hardware card.'
    Then I click on OK and it says 'Error - Out of memory.'
    I've heard rumours that it could be the fact I'm using a strange type of JPEG, but it still happens with PNGs.
    I've made sure my scratch disks are all going to the right place. I also have 100gb of free space.
    The version of FCP I'm using is 6.0.5. I'm using an iMac with OSX 10.4.11 (yes, I know it's old!) and I've downloaded the latest version of Quicktime.
    Help, anyone? I have an assignment due in tomorrow.
    Many thanks...

    p.s. having looked at other posts, perhaps I am missing some (or all) of the relevant codecs?
    In the folder Macintosh HD > Library > Quicktime
    there is basically nothing. Do you think this is the problem?
    If so, where do I download FCP codecs from?
    Many thanks..

  • HT4970 May i use my PC to manage the reminder of my ipad and iphone?

    May i use my PC to manage the reminder of my ipad and iphone?
    And how can I do it?

    Why install the control panel on your PC when you can just as easily go to the iCloud website?
    Because you can't access your photo stream photos from the iCloud website.  I iCloud control panel gives you the ability to have those same pictures streaming between your iPhone/iPad (your photo stream), sync to your local pc. 
    I too use gmail exchange so my mail, contacts, notes, and calendar are already sync'd.  Like I said, I only use the photo stream sync'ing aspect of the iCloud control panel.

  • Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins, the session opens in the other computer but all the synths reset to presets

    Hi, ive been having trouble passing my logic sessions to another computer, we're both using a macbook pro 10.6.8 and logic pro 9 with the same plugins (native instruments komplete 7), the session opens in the other computer but all the synths reset to presets, this didnt happen the first time I shared a session, but its been happening lately quite often

    kwmlr439 wrote:
    CSOUND Read the title please:
    Re: Macbook Pro 10.6.8 RAM Upgarde to 8 GB
    The amount of RAM is not dependant on the operating system. It is all about the model of you Mac.
    10.6.8 is the version of OS X that is installed on your system. It has no real baring on the amount of RAM that CAN be installed.
    Personally I have never had good luck with Corsair RAM. I have always had good luck with Crucial and Kingston.
    Message was edited by: Shootist007
    Message was edited by: Shootist007

  • Can I deploy the session bean to 9i in the JDeveloper3.2

    dear ONT
    My JDeveloper3.2 can't find the method to deploy the session bean to 9i.
    sk

    I'm not sure that's entirely correct.
    Personally I run both EJBs and servlets/JSP in OC4J. OC4J has all the 'web' features of IAS, including full SSL support.
    From a speed perspective, running the EJBs and web components in the same container will give you a huge benefit.
    Also I'm not sure what you mean by "you can't deploy EJBs into OC4J yet" - I do it daily? ;)
    -mike
    Atlassian - Supporting Your 'Orion/OC4J' World
    http://www.atlassian.com

  • How to use a session bean in another session bean (or an EJB in a session)

    JDev 11.1.1.4, WLS 10.3.4, Windows 7 x64
    I have a login controller with a session-scoped bean that manages logins.
    I have another session-scoped bean that manages menu security.
    both modules compile and work fine now I need to share the data from one to another.
    I need to reference the login controller in the menu security bean. How do I reference (include) the login bean in the security bean?
    I tried an EJB - what a farce - these are supposed to be universal and easy ( basis of the oop in Java).
    the bean is defined:
    @Stateless(name = "SecurityEJB", mappedName = "ZITASApplication-ZITASModel-SecurityEJB")
    I have tried :
    ic = new InitialContext();
    session = (SecurityEJBLocal)ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJBLocal");
    session = (SecurityEJBLocal)ic.lookup("java:ejb/model.security.logic.SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:ejb/SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:app/SecurityEJB");
    session = (SecurityEJBLocal)ic.lookup("java:module/SecurityEJB");
    All return null pointers and claim the name cannot be resolved.
    As you can see - I have found various claims to how to do this.
    One way says create a sevlet, generate a listener and use the sevlet. Basically one for every EJB - a lot of work to use the EJBs
    I would assume that this would be one of the easiest parts of java - as it is the foundation of re-usability and oop.
    I can do either in the application - the added complexity of the EJB is less desirable - but better programming?

    Hi,
    ic.lookup("ZITASApplication-ZITASModel-SecurityEJB#model.security.logic.SecurityEJB");This should work with remote interface. If you want to lookup local interface, you need to register it in web.xml. Quote:
    To access the business local interface you need to define ejb local references for your component environment (i.e. from your servlet environment). You can do this by defining references in your web.xml. For example:
    <ejb-local-ref>
    <ejb-ref-name>ejb/BusinessLogicBean</ejb-ref-name>
    <local>packagename.BusinessLogicBean</local>
    </ejb-local-ref>
    To lookup your local reference from your servlet you need to use the following JNDI reference:
    java:comp/env/ejb/BusinessLogicBean Another one
    First, declare a local ejb reference in your web.xml file (This will add it to JNDI):
    <ejb-local-ref>
    <ejb-ref-name>ejb/Foo</ejb-ref-name>
    <local>simple.ejb.FooLocal</local>
    </ejb-local-ref>
    Then it can be looked up from JNDI:
    InitialContext ctx = new InitialContext();
    FooLocal foo = ctx.lookup("java:comp/env/ejb/Foo");Hope this helps.
    Pedja
    Helpful links (judging from your first post, you are probably sick of these :) )
    How to lookup local EJB in Oracle Weblogic 10.3
    http://m-button.blogspot.com/2008/07/reminder-on-how-to-use-ejb3-with.html
    http://www.coderanch.com/t/451012/EJB-JEE/java/EJB-Local-Lookup-not-working

  • How to realize timeout while invoking a method in remote sesssion bean using my session bean running on wls5.1

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

  • Code using advisor session bean..returning of a list

    Hi,
    I am using Advisor Session Bean for classifying users instead of using pz:div
    tags. The steps are given in documentation. I wanted to know what advice.getResult()
    returns? It has been given in the API as an Object. Even in pz:div java file they
    have used this code to check if the getresult returns something ...
    Object nestedResult = advice.getResult();
    if((nestedResult instanceof List) && ((List)nestedResult).size() > 0)
    {  //belongs to segment
    My code works perfectly but I am curious to know about this code. Can anyone please
    tell me about the above given code?
    Thanx

    Assuming you are using v7.0
    This might help
    http://edocs.bea.com/wlp/docs70/dev/p13n.htm#1000231
    i dont know if this has changed in v8.1
    hth
    deepak
    "Madhu" <[email protected]> wrote:
    >
    Hi,
    I want to use the Advisor session bean directly in place of the tags
    to return
    content based on a static query and match the content to users based
    on rules
    that execute a content query. Where can I find more information on this?
    Thanx.
    Madhu

  • I need to add the values stored in the session object into the html textbox

    Dear Sir,
    i have been trying to create an edit employee details page
    What i have done till now is as follow:
    1. Got employee id from HTML page.
    2. Compared it with the id stored in the database.
    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.
    4. Dispatched the session values to another servlet EditEmpDetails2.java
    what i need to do now
    5. Now i need to set the session values in the text field of the html form
    6. I also need to be able to edit those vales and store the edited values in the database.
    Please help me as i have tried doing it for 1 week without any clues
    i have tried to create a html page which is something like this:
    <html>
    <head>
    <title>Edit Employee Details Page</title>
    <body BGCOLOR="red" text="black">
    <h1 ><font color="black">Edit Employee Details Page</font></h1>
    <form action = "EditEmpDetails" method="Get">
    <table width="50% align="center"
    <tr><td>Employee ID: </td>
    <td><INPUT TYPE="TEXT" name="employeeid"<br></td></tr>
    <tr><td><center><input type="submit" value="submit"></center></td></tr>
    <tr><td><center><input type="reset" value="reset" ></center></td></tr>
    </table>
    </form>
    </body>
    </html>
    design of my servlet EditEmpDetails.java
    public void EditEmpDetails1 extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
    PrintWriter out = response.getWriter();
    response.setContentType("text/html");
    HttpSession session = request.getSession();
    String employeeid;
    String X = request.getParameter("employeeid");
    System.out.println("Employee iD:" + X);
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection("jdbc:odbc:murphy");
    String query = "Select * from users where employeeid=?";
    PreparedStatement stat = con.prepareStatement(query);
    System.out.println(stat);
    stat.setString(1,X);
    ResultSet rs = stat.executeQuery();
    while(rs.next())
    String Z = rs.getString(password);
    if(Z.equals(X))
    String A = rs.getString(1);
    session.setAttribute("employeeid", A);
    String B = rs.getString(2);
    session.setAttribute("firstname", B);
    String C = rs.getString(3);
    session.setAttribute("lastname", C);
    String D = rs.getString(4);
    session.setAttribute("gender", D);
    String E = rs.getString(5);
    session.setAttribute("dateofbirth", E);
    String F = rs.getString(6);
    session.setAttribute("address", F);
    String G = rs.getString(7);
    session.setAttribute("postalcode", G);
    String H = rs.getString(8);
    session.setAttribute("phone", H);
    String I = rs.getString(9);
    session.setAttribute("mobile", I);
    String J = rs.getString(10);
    String url = "/EditEmpDetao;s.java";
    RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(url)
    dispatcher.forward(request,response);
    catch (Exception e)
    system.out.println(e)
    I do not know how to put the values stored in the session object into the html text box

    3. If the id is correct then pulled the record of the corresponding employee and stored it in the session object.do you really need to store this in session object?
    5. Now i need to set the session values in the text field of the html form which form? in a new html/jsp page? i suggest go for a JSP
    In your JSP page use JSP expression tags to put the session attributes.
    it's something like : <input type='text' name='employeeid' value='<%= session.getAttribute("employeeid") %>' >and you need to generateanother servlet for saving the details/modifications to the database.
    I think i m clear enough.
    if you need more clarifications. just try it and then post your problem.
    Diablo

  • How to call the form bean value on jsp withthe help of jstl tag

    hi
    all friends
    i am working in struts & i use jstl tag in jsp. i have one problem rise is how to call the form bean value in jsp page by using jstl tag.
    i now how to retrive the value through jsp:logic
    eg. <logic:empty name="userListForm" property="users">
    NO USER FOUND
    </logic:empty>
    see * userListForm mean formbaen name.
    * users means collection object.
    so how can i write above e.g in jstl

    You use the jstl core:if or core:choose combined with the EL:
    <c:if test="${empty users.userListForm}">
    NO USERS FOUND
    </c:if>I suggest you lookup the jsp expression language (EL) using google, it's very powerful.

  • The Managed Bean in the faces-config.xml File

    I am still very new to JSF. I am confused about the managed bean.
    For example, I have a button in my web page. A click on this button invokes an action; say, ListAction.java.
    In this ListAction class, I instantiate a business delegate; say, ListPersonnel.java and call a method in this business delegate to return an ArrayList: personnel. Of course, this business delegate goes through facade, DAO, etc. to populate the ArrayList. This ArrayList is a collecation of a JavaBean called PersonnelBean that gets and sets a number of personnel information; such as ssn, name, etc.
    Upon this ArrayList is successfully populated and received by the ListAction class, I am going to display a web page with a table. In JSF, it is <h:dataTable ...>.
    My questions are regarding the managed bean in the faces-config.xml file.
    1. Which one is my <managed-bean-class>? packageName.ListAction? or packageName.PersonnelBean? or something else?
    2. What should be my <managed-bean-name>? I guess that I can give a name I like. Is it right? What about xyz?
    3. Then, how do I specify the "value" attribute of my <h:dataTable ...> tag when I display a web page to show the data table? Is it correct to specify value="#{xyz.personnel}"? What is the correct specification if it is wrong?
    4. I guess that I can give any name to the "var" attribute in the <h:dataTable ...> tag. Is it right?

    1. Which one is my <managed-bean-class>?
    packageName.ListAction? or
    packageName.PersonnelBean? or something else?ListAction
    2. What should be my <managed-bean-name>? I guess
    that I can give a name I like. Is it right? What
    about xyz?Anything you like. xyz is OK.
    3. Then, how do I specify the "value" attribute of my
    <h:dataTable ...> tag when I display a web page to
    show the data table? Is it correct to specify
    value="#{xyz.personnel}"? What is the correct
    specification if it is wrong?xyz.personnel is OK assuming that ListAction class has a public
    method getPersonnel() which returns the ArrayList of PersonnellBeans.
    4. I guess that I can give any name to the "var"
    attribute in the <h:dataTable ...> tag. Is it right?Yes, you can give any name you like.

  • How to get stateful and stateless session bean in second jsp

    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the second jsp? I find that somebody store the bean in HttpSession.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, both stateful and stateless can maintain the state in the second jsp. What is the difference between stateful and stateless session bean in this case ?
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use session bean. Can anyone provide sample jsp to show difference of stateful and stateless? How the stateful session bean can maintain the state for the client?

    Greetings,
    I create stateful session bean in the first jsp, then how can I get the stateful session bean in the
    second jsp? I find that somebody store the bean in HttpSession.Which is the correct scope for sharing client-specific data when 'request' scope is insufficient.
    If I store the stateful session bean in HttpSession, then I can get it in the second jsp. My problem is
    that I can store the stateless session bean in HttpSession, and get it in the second jsp. Then, bothWhy is that a "problem"? Does your application not require the stateless bean to be shared? If so, then don't store the EJBObject reference in the session...
    stateful and stateless can maintain the state in the second jsp. What is the difference betweenWhat do you mean by this exactly?..
    stateful and stateless session bean in this case ?Statefulness of session beans is in regard to maintaining client state (er, in all cases). If your "stateless" bean is receiving information from the client (i.e. its caller) - either through a create method or a business method - and that information is available (retrievable from the bean) on subsequent method calls, then that bean is, in fact, stateful - regardless of how it is deployed.
    I understand the definition of stateful and stateless session bean, but I'm confuse how to use
    session bean.The correct question, it here seems, is "when" to use which type... Use a "stateful" bean when information about (from) the client (i.e. the caller) must be maintained across method calls of the bean. Use a "stateless" bean for general business methods that do not depend on "prior knowledge" of the client (i.e. the caller).
    Can anyone provide sample jsp to show difference of stateful and stateless? How the statefulA "sample JSP" would yield nothing additional... The semantics of calling, using, and "persisting", bean references are always the same - regardless of type or class. However, the reason(s) for using one over the other depends entirely on the needs of your application.
    session bean can maintain the state for the client?I recommend that you spend more time learning about EJBs generally. In particular, it seems you require more fundamental understanding of their scope and lifecycle. Refer to sections 4, 6, and 7 of the EJB 2.0 Specification.
    Regards,
    Tony "Vee Schade" Cook

Maybe you are looking for

  • SQL Developer 3.0 Unit Test

    Hi all, I'm hoping that one of you very knowledgeable individuals may be able to assist me! I'm an APEX developer, and I'm trying to make use of Hudson (www.hudson-ci.org) to automate my build process. I can successfully check files out of a source c

  • CFIMAGE tag and WriteToBrowser Issue

    Recently installed CF8 on a CF5 machine and started using the CFIMAGE tags. I was testing the WriteToBrowser action of <cfimage> and all I get is a red X and the path is something like ... sample code looks like the following: <cfimage name="objThumb

  • How to Minimize Java Applications

    how to mininize my java apps for nokia 2700 classic Moderator's Note: This post was edited. A more appropriate subject was provided. Solved! Go to Solution.

  • Flash Player Won't Work - Help?!?!

    Mac OSX - 10.1 Safari Version - 8.0 I am having some trouble downloading Flash Player to work with Safari and my friend is also having the same issue. I have done pretty much every procedure: uninstalled, deleted plugins but still no luck. It reaches

  • Captivate 7 Subscription

    Can I access my Captivate 7 on a second computer when I have subscribed to the month to month subscription