Standard Javabean inside a JSP/EJB application

Hello!
I want to use a JSP-file as a graphical user interface for a j2EE-application. I want to use a standard Javabean as an intermediate connector between the JSP and the Enterprise Java Beans.
Deployment details:
- 2 bean-Jars inside a EJB-module
- A JSP-file inside a .WAR-file
But what about the standard Javabean, where shall I put it?
What are the correct settings in the deployment tool?....
bye from
G�ran, Stockholm

You just need the standard JavaBean available to the EJB as well as the JSP. One nice way is to package such beans into a JAR and include the JAR in the EJB module as well as the WAR as a library.

Similar Messages

  • Standard method of storing config info in an EJB application

    HI,
    What is the standard way of storing config information in an EJB application?

    Open source GlobalEnvironment at http://www.acelet.com/opensource/index.html.
    Also, you can use SuperEnvironment, a GUI, to manage it:
    http://www.acelet.com/super/SuperEnvironment/index.html.
    SuperEnvironment also has a plug-in for Netbeans.

  • Using JavaBeans in a JSP Page

    I wan't to know the advantages and disadvantages of using JavaBeans in a JSP page.
    Like for example general traditional approach for a database connection
    is to create a connection and access the database from that and close the connection
    at the end of the page, instead of the If I use a common connection bean for making connections,
    is that suggestable and then when should i close the connection then.
    One good application of JavaBeans is using a Set and Get methods for form fields in
    a registration form to get back the values.
    So may i know how best can we use the JavaBeans other than this application.
    ThanX in advance,
    kiran
    [email protected]

    I believe putting processing and query code in the JavaBean was one of the reasons for putting JavaBeans support in JSP in the first place. The original idea was to use the setXXX methods to populate the bean's data from the posted form, then do the processing (or database query), then use the getXXX methods to display the bean's data.
    Efficiency-wise, it's exactly the same as putting all the code in-line in the JSP page (actually, it might be a bit slower, because of the reflection required to do it.) Code-wise though, it makes the JSP easier to read.
    Of course, we have EJBs now too, which tie very closely and can match database queries almost one-to-one, one way to incorporate these is inside the JavaBean you reference from the JSP, another way from a servlet you redirect the JSP to, etc...

  • I used tag to show PDF file inside my JSP page, It is working properly in IE but nothing shows in Mozilla. What should I do?

    I've used to display a PDF file inside my JSP page. It is working fine in IE. However, many of users of this application are using Mozilla and the platform is Ubuntu so it is vital that the file is shown in Mozilla as well. How can I solve this problem.
    == This happened ==
    Every time Firefox opened
    == I run my jsp page

    Such conditional code will only work in IE and not in other browsers like Firefox.
    You can ask questions and advice about web development at the mozillaZine Web Development/Standards Evangelism forum.<br />
    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • What is the directory structure of EJB applications?

    I am new to EJB program. I know that after the development is done, we package the EJB components into .jar file, and package the Web components (HTML/JSP/Servlets/JavaBeans) into .war file, and then together we package .jar file and .war file into a single .ear file. Then we just deploy the .ear file into WebLogic's application directory.
    But, before the deployment, I mean during the development, what kind of directory structure is good for us to develop our EJB, HTML, JSP, Servlets, and JavaBean components?
    Previously, when I was doing JSP/Servlets applications, my directoy structure is:
    webapps\
    --------myapplication\
    -----------------------*.html
    -----------------------images\
    ------------------------------*.jpeg, *.gif
    -----------------------jsp\
    ------------------------------*.jsp
    -----------------------WEB-INF\
    ------------------------------web.xml
    ------------------------------classes\
    -------------------------------------Java Servlets located here
    -------------------------------------beans\
    -------------------------------------------JavaBeans are located here
    Now, I am doing EJB applications, what should be the directory structure?
    Thank you very much for your help!
    Jingzhi

    I have been involved in a few enterprise applications but have not been happy with the packaging structures used and am starting a new one now and am looking for other examples.
    this is what I've used before.
    web/
    classes/
    client/
    server/
    but if a class was used in the client and server it was put under the server/ package. I feel that more separation is needed.

  • Problem while running ejb application in Oracle Application Server

    I have created sample ejb application in jdeveloper with ejb 3.1 version,
    i also created jsp page which will invoke ejb client and display result,
    its running perfectly in embeded oc4j server, but while deploying application in
    Oracle application server its is giving below error message
    Javax naming exception: unable to find remote interface., i am confusing please give me sollution .

    Hi Mr.Frank,
    i have created remote interface by importing javax.ejb.Remote,
    my interface name is additionEjb
    and i defined a sample method and in my client i called like below
    additionEjb AdditionEjb = (additionEjb)context.lookup("additionEjb");
    In embeded oc4j server its running perfectly but after deploying to OAS below error throwing
    The exception is : javax.naming.NameNotFoundException: additionEjb not found
    Help me regrding this.

  • Frame issue in jsp/struts application

    I have a problem with jsp struts application .
    i have a jsp page which is inside a frame .
    The action class which receives the request from this page redirects the request to another jsp page.
    I want this new jsp page to be displayed without any frame , but it is getting displayed from inside the frame .
    can anybody help me out ...
    regards,               
    slam

    Possibly:
    1. Browser could be caching the page.
    2. If you use a proxy, the proxy may be caching the page.
    3. The page is not getting recompiled.

  • Calling an EJB application in webdynpro

    Dear SDN's,
    I am trying to call an EJB application  from a webdynpro application and is succeded in storing values to database via Java Bean Model.
    I want to retrieve all records from table via EJB and all the records should be displayed in Webdynpro Table UI element.
    How can we do it?
    The problem here is, how to return a set of records to webdynpro from EJB via a javabean.
    I am not clear in using Collection Framework! i.e, which collection class i have to use to store the retrieved records.
    Your help will be appreciated.
    Regards,
    Sireesha.B

    Hi Sireesha,
    Instead of adding resultset, create a EMP cinstance and add it.
    Ex : Consider you have created a EMP class
    class EMP
      String empname;
       int id;
      public void setEmpname(String name);
      public String getEmpname();
    Now
    ResultSet rs=statement.executeQuery(select * from emp);
    Vector v=new Vector();
    while(rs.next)
    Emp e=new EMP()l
    e.setEmpName(rs.getString(0));
    e.setID(rs.getInt(1)));
    v.add(emp);
    Iterator i=v.iterator();
    while(i.hasNext())
    Emp e1=(EMP)i.next()l
    System.out.println(e1.getempName());
    System.out.println(e1.getID);
    Regards, ANilkumar

  • Multiple form inside one jsp file

    I have to use nested jsp forms in my latest project
    ex:-
    <html>
    <head>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="ex.htm">
    <form id="form2" name="form2" method="post" action="ex2.htm">
    </form>
    <form id="form3" name="form3" method="post" action="ex3.htm">
    </form>
    </form>
    </body>
    </html>
    Can some one tell me, is there a way to submit the each forms seperatly?
    -----------------------------------------------------------------More on problem-----------------------------------------------------------------
    I am developing e-savings application.
    When the customer enter the accountno i need to display details - for this i use "form1"
    When the customer enter the withdrawal amount i need to display the balance - for this i use "form2"
    Finally i use "form3" to submit the data.
    I have done all the things inside one jsp page.
    I think you are now clear in my problem and hope best solution....
    Thank you........

    According to the HTML specification, you may not nest forms.
    You can use multiple forms as long as you don´t nest them.

  • How to run ejb application OC4J J2EE Container

    Hi all,
    I unable run ejb applications in OC4J J2EE Container.
    I have configure following files.
    in config directory
    Server.xml
    I have .ear file if configured in server.xml. this .ear copied into home/application directory
    I have create following deployment discriptor file.
    in META-INF for ejb.
    ejb-jar.xml
    application.xml
    I have specify all ejb classes details in ejb-jar.xml
    Please help me .How to run ejbs with jsp and application client.Which files shall i configure.
    Thnaks,

    Hi all,
    I unable run ejb applications in OC4J J2EE Container.
    I have configure following files.
    in config directory
    Server.xml
    I have .ear file if configured in server.xml. this .ear copied into home/application directory
    I have create following deployment discriptor file.
    in META-INF for ejb.
    ejb-jar.xml
    application.xml
    I have specify all ejb classes details in ejb-jar.xml
    Please help me .How to run ejbs with jsp and application client.Which files shall i configure.
    Thnaks,

  • How can I import a servlet inside a JSP?

    Hi! I have seen tons of instructions on importing beans inside a JSP page but I want to use servlets instead. This question might be stupid, but I'm not really adept with JSPs yet and I hope you can help me.
    I need to import classes inside my JSP page so that I can use the methods and manipulate them through the JSP.
    Thank you!
    lauramos

    I'm curious, have you looked into using the MVC or Struts framework? One idea would be to map the Servlet you created to a JSP via XML (or any other mapping you want #?.jhtml for all that matters) and jsp:include as needed. Just a few mappings needed in WEB-INF/web.xml for instance...
    <servlet>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<servlet-class>packagename.HeaderPageHandler</servlet-class>
    </servlet>
    <servlet-mapping>
    ��<servlet-name>HeaderPageHandler</servlet-name>
    ��<url-pattern>/header_page.jsp</url-pattern>
    </servlet-mapping>
    In the JSP:
    <jsp:include page = "header_page.jsp" flush = "true" />
    The Servlet could forward the information over to another page using the getRequestDispatcher(String url).include(req, resp); From there, use the application or request scope to handle the jsp:useBean to output what you need. You could take that further and customize some of your own TLDs so you could state simple tags like <tag:output class="text">some text here</tag:output>

  • How to Create One Full EJB Application?

    Hi,
    Does Anyone knows how to Create the EJB Application, as JSP as The Client using Eclipse and Weblogic?
    Thanks in Advance,
    Sundar

    Dont they come with sample projects.
    else search for tutorials in the net

  • Missing EJB application and tutorial sample in workshop 8.1

    HI,
    I just installed workshop 8.1 from the BEA CD. I wanted to follow the EJB tutorial
    that's available in e-docs on the web, however, i don't see the Enterprise JavaBeans
    tutorial (the Band example) in the list of new Applications (under tutorial).
    I also don't see a new application template of Enterprise javaBeans under 'All'
    (not sure if there should be one).
    Could someone please let me know why I'm missing the Enterprise javaBeans tutorial
    and how I can get it? Also, why don't I see an application template for EJB Application?
    Thanks,
    Prab

    Akshay,
    Please post this question in the Workshop 8.1 Beta Newsgroup.
    weblogic.developer.interest.81beta.workshop
    Thanks
    Raj Alagumalai
    WebLogic Workshop Support
    "Akshay Aggarwal" <[email protected]> wrote in message
    news:3e9107da$[email protected]..
    >
    Hi All,
    I am getting problem in loading variables and control in the Workshop Dataand
    Control Palette at times when I open the application. The Workshopinterface shows
    the variable at times and does not show up at all on another instance. Letme
    know if anybody else has faced a similar problem or not

  • My ejb application can't see jar files

    I am using JBoss 2.4.3 as my EJB server. I have followed the instructions in the documentation about making jar files visible to my ejb application. ie, I have an ear file with the following contents:
    meta-inf/application.xml
    meta-inf/Manifest.mf
    myEJB.jar
    myWAR.war
    lib/myUtilities.jar
    The classes inside myEJB.jar reference classes inside myUtilities.jar. The myEJB.jar contains a manifest file that looks like this:
    Manifest-Version: 1.0
    Created-By: Ant 1.4
    Class-Path: lib/myUtilities.jar
    But the classLoader spits a dummy and gives me a NoClassDefFoundError when the a method is called in the ejb that references the classes in myUtilities.jar. And yes, there is a carriage return after the Class-Path line. I've also tried it with ./lib/myUtilities.jar but with no luck. And I've tried putting it into the myEJB.jar, which (expectedly) didn't work.
    The only way the classes in myUtilities.jar can be visible is by putting the jar into the jboss lib/ext directory, which is not recommended.
    Any help is desperately appreciated.
    Thanks

    I am using JBoss 2.4.3 as my EJB server. I have
    followed the instructions in the documentation about
    making jar files visible to my ejb application. ie, I
    have an ear file with the following contents:
    meta-inf/application.xml
    meta-inf/Manifest.mf
    myEJB.jar
    myWAR.war
    lib/myUtilities.jar
    The classes inside myEJB.jar reference classes inside
    myUtilities.jar. The myEJB.jar contains a manifest
    file that looks like this:
    Manifest-Version: 1.0
    Created-By: Ant 1.4
    Class-Path: lib/myUtilities.jar
    But the classLoader spits a dummy and gives me a
    NoClassDefFoundError when the a method is called in
    the ejb that references the classes in
    myUtilities.jar. And yes, there is a carriage return
    after the Class-Path line. I've also tried it with
    ./lib/myUtilities.jar but with no luck. And I've tried
    putting it into the myEJB.jar, which (expectedly)
    didn't work.
    The only way the classes in myUtilities.jar can be
    visible is by putting the jar into the jboss lib/ext
    directory, which is not recommended.
    Any help is desperately appreciated.
    ThanksHi
    Can you please try placing your "myUtilities.jar" in the root.
    I mean your ear file with
    myEJB.jar
    myUtilities.jar
    And dont forget to add the following entry in
    meta-inf/Manifest.mf in your myEJB.jar
    Your meta-inf/Manifest.mf shld consist of
    Class-Path: ./myUtilities.jar
    I think this can solve your problem

  • JSP Sample Application

    We installed the SQLTAGLIB application from JSP sample application publish on TECHNET.
    Compiled and Run it successfully.
    Now we are trying to develop some Page using
    sqltaglib.tld but while compiling,
    on this line
    <%@taglib uri="sqltaglib.tld" prefix="sql" %>
    get this error message
    [ Start of root element ]
    pl. give the solution.
    Thanks
    null

    Here is some info from the docs:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Note the following requirements for using SQL tags:
    Install the file ojsputil.jar and include it in your classpath. This file is provided with the OracleJSP installation.
    Make sure the tag library description file, sqltaglib.tld, is deployed with the application and is in the location specified in the taglib directives of your JSP pages, such as in the following example:
    <%@ taglib uri="/WEB-INF/sqltaglib.tld" prefix="sql" %>
    For general information about JSP 1.1 tag library usage, including tag library description files and taglib directives, see "Standard Tag Library Framework".<HR></BLOCKQUOTE>
    Please post follow-ups in the OTN Sample Code forum.
    Thanks,
    -rh
    null

Maybe you are looking for

  • Difference between tRFC and RFC

    Hi Experts, Can any one help me in details to differentiate tRFC from RFC in their application perspective. And also let me know the role of ALE and BAPI in both the connection log.ie,Where we have to use ALE and BAPI. Regards Kumar

  • Query Manager Input Date Problem

    Dear expert, When i paste the following code in query manager, error is encountered. What is the problem. Regards, Kit Code: declare @type int declare @opening DateTime declare @closing DateTime declate @tmp DateTime select @type = T0.ItmsGrpCod from

  • I have Photoshop cs6. I need to update for Nikon d 3300 raw. Can I get it on a disk Or download to my phone?

    trying to update ps cs6 for camera raw for nikon d3300

  • Change one option for kernel recompile ?

    Greetings, I want to change a single kernel configuration option (CONFIG_HZ) and rebuild this kernel :     3.0-ARCH #1 SMP PREEMPT x86_64 I also want to do this in the simplest, fastest way possible. Suggestions ? Btw, I haven't used the ABS, so if t

  • Complex Select SQL

    Oracle Version: 10g I am trying to write an select statement based on chain of items. Any help constructing this SQL is appreciated. Thanks! ItemNo1 changed to ItemNo2 ItemNo2 changed to ItemNo3 ItemNo4 changed to ItemNo3 Items 1 and 2 is changed to