JSP with EJB

Hi
          How can one specify EJB jar files as command line options for compiling
          and executing JSP files.
          One approach is to specify in the compileCommand paramter. But this will
          be applicable to all the JSPs. Is there any way to restrict the option
          to certain JSPs and not all.
          RK
          

Maybe I'm daft, maybe it is the time? :)
          I don't follow you. Please give an example of why this is necessary and
          what you would think you would need configure?
          Cheers
          Mark G>
          RK wrote:
          > Hi
          >
          > How can one specify EJB jar files as command line options for compiling
          > and executing JSP files.
          >
          > One approach is to specify in the compileCommand paramter. But this will
          > be applicable to all the JSPs. Is there any way to restrict the option
          > to certain JSPs and not all.
          >
          > RK
          =====================================================
          Reply to the newsgroup. Don't reply to this mail
          alias. This is used only for answering posts on
          WebLogic Newsgroups.
          =====================================================
          

Similar Messages

  • Is it possible to use JSP with EJB

    A pretty dumb question.
    JSP + Servlet + DB can be used together to write a j2EE application, such as some shopping system.
    But what's the usage for EJB? Does it still need JSP to do the output to client?

    To use a JSP with an EJB:
    Create a taglib for the EJB and access the EJB in the JSP with the taglib.
    WebLogic provides the EJB to JSP integration tool.
    http://e-docs.bea.com/wls/docs61/jsp/ejb2jsp.html

  • Strategy for integrating JSF/JSP with EJB?

    Both JSF/JSP and EJB seem to be developing independently of each other. What is a good strategy for integrating them? I'm not sure how access my entity/session beans from my web pages.

    Follow the MVC architecture. Don't access EJB's from JSF/JSP pages. Here are some basic rules to follow.
    1) never put java code in JSP's. JSP's are for viewing data only. They should never contain business logic nor be tied to the business tier.
    2) JSP's should always send HTTP requests to servlets. Use the servlets to control the flow of the application and make decisions on which JSP should be returned to the client. Make calls to the EJB's from the servlet to perform business logic.

  • JSP AND EJB

    how to deploy EJB with JSP?
    can any body tell me how to connect JSP with EJB while deploying?
    I am using J2EE system application PE server8.0
    Thanks in advance

    ejb will be deployed in ejb container & jsp will be deployed in servlet container. i guess, your question is specific to as how to do it using deployment scripts. Or are you trying to deploy using Administration control of PE server. I have worked on IBM Websphere 5.0. My explanation is more from Websphere point of view, please check if it makes sense to you.
    ejb .jar file (which contains ejb classes) is considered as a ejb module by app server & web .war file (which contains servlets, jsps) is considered as a web module by app server. A seperate class-loader for each module can be set using administration console (it can also be done in deployment scripts, but i dont know how part of it). Dependent classes for ejb module are specified in manifest.mf of ejb project. and dependent ejb jar files for web project have to copied in "Web Content\Web INF\lib" folder of web project. Then JSPs can find the ejb classes.
    Thanks.
    Madhav

  • How to master good design with EJB and JSP?

    I use JSP to calling EJB. But the .jsp file is complex and it's difficult to maintain...I just want to work higher efficent with EJB,JSP and JavaBean. I want to know is there a good design with EJB and JSP? and is there any good material about MVC for EJB,JSP and JavaBean?

    You should read the J2EE blueprint available on this website. Better download the PDF, and print it for yourself so you can read it anytime.

  • New To Iplanet app server.Can some one help me getting started by delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with iplanet docs..didnt quite get it. thanx

     

    Hi,
    What is that you are trying to accomplish ? Is it deployment or
    trying to develop applications ? Are you getting any errors ? If so,
    please post them to help you. I think the documentation is the best place
    for you to begin with.
    Regards & Happy New Year
    Raj
    Arif Khan wrote:
    New To Iplanet app server.Can some one help me getting started by
    delpoying and calling one of each of these:JSP,Servlet,EJB.Tried with
    iplanet docs..didnt quite get it. thanx
    Try our New Web Based Forum at http://softwareforum.sun.com
    Includes Access to our Product Knowledge Base!

  • Deploy JSP/Servlet along with EJB

    how could deploy EJB with JSP/Servlet?.
    First i have
    package project.account
    1.HomeInterface class
    2.RemoteInterface class
    3.Bean class
    4.Client class
    I deployed the above bean in J2EE using Deploytool GUI.
    run the client like this
    java -classpath %CLASSPATH%;personDepClientClient.jar project.account.Client
    it displays result at prompt
    what i am asking is
    now i wrote JSP file which is kept also this project.account package
    i used the JSP file as client for the that bean.
    it is Show.jsp file(client file)
    <%@ page language="java" %>
    <%@ page import="java.util.*" %>
    <%@ page import="javax.naming.Context" %>
    <%@ page import="javax.naming.InitialContext" %>
    <%@ page import="javax.rmi.PortableRemoteObject" %>
    <%
         double balance;
    try
         Context initi = new InitialContext();
         Object ref = initi.lookup("AccountHome");
         AccountHome home = (AccountHome)javax.rmi.PortableRemoteObject.narrow(ref,AccountHome.class);
         AccountRemote vijay = home.create("200","vijay",0.00);
         vijay.credit(2000.0);
         vijay.debit(600);
         balance = vijay.getBalance();
    %>
         <tr>
    <td width="38%" height="31">
    </td>
    <td width="62%" height="31">
    <div align="center"><%= balance %></div>
    </td>
         </tr>
    <%
         AccountRemote kumar = home.create("199", "kumar", 0.00);
         kumar.credit(14000);
         AccountRemote xyz = home.findByPrimaryKey("199");
         xyz.debit(200.00);
         balance = xyz.getBalance();
    %>
         <tr>
    <td width="38%" height="31">
    </td>
    <td width="62%" height="31">
    <div align="center"><%= balance %></div>
    </td>
         </tr>
    <%}
    catch(Exception ex)
         System.err.println("Caught an exception." );
    ex.printStackTrace();
    %>
    after deployed this JSP file and executed as
    http://localhost:8000/project/person/Show.jsp
    it displays error as follows
    unable to find AccountRemote,AccountHome,findByPrimaryKey
    How could deploy JSP along with EJB?.
    pls any one tells steps to be followed while Deploying EJB/JSP.
    with thanks
    vijay

    Hmmmm...
    ssniazi does nothing but ask for contact information or recommend Oracle products.
    Based on this I consider it likely that this person is some sort of sales representative either directly or indirectly associated with Oracle.
    I personally wouldn't provide any contact information to this person. Nor would I accept any advice until this person starts to actually provide some solutions or at least correctly reveals any financial interests that they might have.

  • JSF combined with EJB, how??

    Hi @ll,
    I have been trying for some days to combine my JSF pages with EJB Session Beans, but I haven't really found a working way to do it.
    First, I had my session bean directly as the backing bean for the JSF page, but I read somewhere that this isn't "allowed", so I created a helper bean as managed bean. This is now the backing bean for the jsf page and has as attribute the session bean.
    My helper bean:
    public class ManagedHelperBean {
    @EJB private JDDACReaderBeanRemote reader;
    public JDDACReaderBeanRemote getReader() {
         return reader;
    public void setReader(JDDACReaderBeanRemote reader) {
         this.reader = reader;
    }Part of my faces-config.xml
    <managed-bean>
    <managed-bean-name>helper</managed-bean-name>
    <managed-bean-class>com.company.ManagedHelperBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>Part of my jsp page:
    <h:outputText value="#{helper}"/>
    <h:outputText value="#{helper.reader}"/>Now, the first output in the jsp page works, the second one doesn't. Why can't the property reader be accessed?? What is the correct way to combine JSF with EJB?
    Kind regards,
    Wiebke

    Hello,
    I faced the same problem, but on a Weblogic 10 server.
    The problem with Weblogic 10 is, even if it's "supposed" to be a EE5 compliant server, it is not.
    As described here http://e-docs.bea.com/wls/docs100/webapp/annotateservlet.html , there is no Dependency Injection in JSF managed beans:
    The web container will not process annotations on classes like Java Beans and other helper classes.
    But, WL 10 offers DI on Servlets, Filters and Listeners.
    Here is how I solved it (probably not the best way, but it works for me):
    - created a filter with a list of EJB injected (as it works). For every filtered request, set a list of known (enum) as request attributes mapped each to a EJB service:
    public class EJBInjectFilter implements Filter {
    @EJB
    private MyEJBService ejbRef;
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException,
                   ServletException {
    log.debug("Setting EJB ref into request as attribute ");
              req.setAttribute(ServiceEnum.MY_EJB_SERVICE.toString(), ejbRef);
              chain.doFilter(req, resp);     
    - for every managed bean who needs a service you can do something like:
    (MyEJBService) ((HttpServletRequest) FacesContext.getCurrentInstance().
                   getExternalContext().getRequest()).getAttribute(ServiceEnum.MY_EJB_SERVICE.toString())
    to get a reference to service.
    I agree it is a totally not elegant solution. But why does WL 10 say it's a full JEE5 compliant server, and though does not provide DI for managed beans?
    A drawbacks I could think of is performance slow-down (for every request, apply filter, set list of attributes + references into request) - probably it does take some time.
    Let me know your thoughts.
    Edited by: cosminj on Nov 20, 2007 8:16 AM

  • JSP and EJB in 8i

    Hi
    This is not really a JDBC question but this board appears to be
    the best fit.
    I am interested in hearing your experience with using EJBs on
    Oracle 8i. In particular, is it possible to use a JSP to access
    EJBs?
    Thanks
    Pratul
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by DAVOR BORCIC ([email protected]):
    Can anyone tell me where I can find Oracle JSP 1.1, mentioned in "Oracle 8i, Java Component Programming with EJB, CORBA and JSP" book?
    The Oracle JSP release available on Technet is 1.0.
    Oracle JSP 1.1 is, according to book, prerequisite for an installation on Tomcat.
    Please advise.
    <HR></BLOCKQUOTE>
    Oracle iAS

  • Debug weblogic jsp with jbuilder4EE

              Hi,
              Is it possible to debug an J2EE application based on jsp /JBeanProxy/ EJB (weblogic 5.1) using jbuilder4 EE ?
              Currently, I've only managed to use the tomcat module which is provided with JBuilder4 and
              debug the weblogic EJB if I use a standalone client application. My problem is I'd like to
              debug jsp pages using weblogic engine.
              Thanks.
              

    Having related issues, trying to debug WebLogic 5.1 Servlets with
              JBuilder4EE. Again, all I can locate via docs, etc. is JBuilder4 debugging
              with Tomcat.
              However, I'm also running into erratic problems with JBuilder/Tomcat Servlet
              debugging, where the debugger randomly losses variable references, and
              'stepping' through the code often results in 'running' past all remaining
              breakpoints that were set.
              Any similar problems or possible solutions??
              "Padraic Hannon" <[email protected]> wrote in message
              news:[email protected]..
              > denis boutin wrote:
              >
              > > Hi,
              > >
              > > Is it possible to debug an J2EE application based on jsp /JBeanProxy/
              EJB (weblogic 5.1) using jbuilder4 EE ?
              > > Currently, I've only managed to use the tomcat module which is provided
              with JBuilder4 and
              > > debug the weblogic EJB if I use a standalone client application. My
              problem is I'd like to
              > > debug jsp pages using weblogic engine.
              > >
              > > Thanks.
              >
              > did you get any responses?
              > looking to do the same thing.
              >
              > thx
              > paddy hannon
              >
              >
              

  • JSP use EJB's Client.jar

    There's a Client.jar fater deployed an EJB.
    I can do it like this:
    D:\>java -classpath %classpath%;Client.jar MyClient
    My question is:
    How can I run JSP with the EJB?
    Thank you!

    i thing right now your are accesing the ejb through comand prompt.first create a jsp then create *.war file by uing deployment tool.for forther help refer j2ee doc.
    call the jsp from browser.

  • How can i increase performance JSP with database?

    Hi,
    I am working a forum.
    I have been facing a problem.
    i am getting collection of records from sql server database to jsp page. here all the records to take long time (*delayness jsp with database*).
    plz any bodies know that increase the permance, tell me.
    thanks & regards,
    k.s.kumar

    again very bad idea never use Put DB Code or Business Logic or Special Service requests inside the servlets/backing beans.
    Ideally the below is the method which is recommended for a Peformant J2EE application which focuses at modulality,configurablity,scalablity & performance.
    http://java.sun.com/blueprints/corej2eepatterns/Patterns/index.html
    Anyways,it might be a costly in terms of investment.Ideally i personally fell the below way/patterm could be comparable.
    <!-- View / Presentation Layer -->
    STEP 1 --> VIEW RENDERED(JSP renders view using a View Object/Objects)
    STEP 2 --> USER (Fills Forms accordingly and request for an action)
    <!-- Controller part -->
    STEP 3 --> Controller(Servlet+Backing Bean)
    STEP 3.1 ---> Mapps the request made into a View Object & Scopes it (Done by servlet )
    STEP 3.2 ---> validation of the data in the VO (and servlet is responsible to find appropriate Backing Bean to pass on the respective View Object)
    STEP 3.3 ----> Backing Bean takes help of a ServiceLocator Object(Singleton Object) and gets appropriate Business Object which takes care of all the appropriate business rule(Managed by Specific Containers)
    <!-- Service Locator takes help of specific Stubs to provide access to specific business Object -->
    <!-- MODEL PART -->
    STEP 3.4 ---->Backing bean passes on respective View Object to the Business Object and Business Object apply business rule on the data recievd from the Backing bean and sends appropriate DTO to DAO Object(Singleton Object)
    STEP 3.5 ----> DAO executes responsible DB query and returns a DTO/Collection of DTO to Business Object.
    STEP 3.6 ----> Business Object apply business rules on the data and then passes it back to backing bean.
    STEP 3.7 -----> Backing Bean receievs appropriate DTO/Collection of DTO sent by Business Object Update the View Object Accordingly.
    STEP 3.8 -----> Depending on the results return by Business Object the backing bean returns to reference appropriate JSP to forward/redirect.
    STEP 3.9 -----> Servlet identifies the reference returned and forward/redirects accordingly.
    STEP 4 ---> Repeat STEP 1
    NOTE: One can make use of any builtin frameworks(like struts,JSF,tapestry,Spring MVC,etc or your custom built framework in VC layers, EJB or Spring IoC or Custom Built Component Layer handling business objects and any ORM like hibernate,Oracle Toplink,Ibatis,JDO,JPA or specific custom devoloped DAO layer) to do this job.
    Might Sound bit complicated but is a better way to plug & play with each layer and can enusure other layer is not distrubed because of change in one layer,distributes the load on respective layer & so on.
    Hope that sounds logical
    REGARDS,
    RaHuL

  • Starting out with ejb help

    hi,
    i'm starting out with ejb, know java and jsp servlets, and seem to be having trouble getting the first example running, i'm using Jboss_3.2.1.
    1. Where is the javax.ejb package? i have sdk 1.4.1, but don't see the package in there.
    2. Using JBoss where do i put the source and complied files? the book just shows the structure as:
    -classes
    -com
    -brainysoftware
    -ejb
    -meta-inf
    but where do i put this, there is no instructions as to where the classes and meta-inf go? i understand that the .jar goes in the deploy directory but what if i want to store the source and complied in jboss also?
    3. when running a servlet, client, from tomcat do i have to run both tomcat and jboss together? The book just mentioned that i needed to copy the ebj.jar, jboss-client.jar, jnp-client.jar and the Adder.jar (example build) into my lib for tomcat, but why do i need the Adder.jar (the example built), isn't that suppose to run from jboss not from tomcat?
    Thank you.

    1.) You find the package javax.ejb in the following file: $JBOSS_HOME/client/jboss-j2ee.jar
    2.) JBoss doesn't need your source-files. To install your EJBs you must copy a Enterprise Archive (*.ear), which including the jar-file with your EJB, in the directory $JBOSS_HOME/server/default/deploy. This is the directory for hot-deployment of the default-configuration. You could also copy the jar-file with your EJBs into this directory.
    3.) JBoss has always a web-server, either tomcat or jetty. Both are servlet-engines. You doesn't need another tomcat instance. In your web-application you need all classes of a EJB, that you call, for example the remote-home- and the remote-interface of a session bean and the classes of value-objects. This is the reason, because you need the adder.jar. The better way is, you include all necessary files in your war-file.

  • Best way to see changes done to jsps/servlets/ejb/xmls in EAR

    I am using iPlanet app server with iPlanet web server. Everytime i make any change jsp/servlet/ejb i have to redeploy whole ear application again. This takes a long time. Even when i use the "iasdeploy redployapp " command to deploy, it takes same amount of time as it takes for the orignal deployment.
    So Is there any way to decrease the amount of the time it needs for me to re-deploy the applications when slight changes are made to application. I would really be thankful to anybody who can help me.

    Hi,
    I am facing this problem with a simple EAR file also. It does not contain any EJBs.
    It has just JSPs, XML, and JAVA Classes.
    The file size is about 481Kb.
    Earlier this used to get deployed using the "iasdeploy" command within 1 minute.
    Now it is taking more than 5 minutes to deploy the EAR file.
    I am using the following command :
    iasdeploy deployapp -verbose XYZ.ear
    The same holds true for the "iasdeploy removeapp -verbose XYZ.ear" also.
    Please help.
    Thanks,
    Samar

  • Want to run servlets, jsp and ejb

    Hi there, I have just installed Oracle9iAS on my PC and want to check how to use OAS with servlets, JSPs and ejbs, so can any one tell me where can I find some worked examples and step by step deployment process, any help would be appreciated, regards, Shabbier

    If you have installed Oracle9iAS, you should be able to get to the welcome page at
    http://<machine_name>:7778/
    You can see J2EE demos off that page.
    Also, you can find info about oracle9iAS and documentation
    at http://otn.oracle.com/products/ias/content.html
    OC4J info can be found at
    http://otn.oracle.com/tech/java/oc4j
    -Prasad

Maybe you are looking for

  • ITunes wont run after update today says missing file msvcr80.dll

    iTunes wont run after update today says missing file msvcr80.dll tried to reinstall, nothing changed.

  • Transfer of SAP FICA summary records to SAP FI through FIDCCP02

    Hello, I am looking at transferring SAP FICA data to SAP FI. I am aware that a standard idoc FIDCCP02 should be triggered when FPG1 is used. I would like to know if there are any idoc specific settings that need to be carried out for the summary reco

  • Getting cfgrid (flash) to submit a row

    Hi all, I'm at about my wits end on this...I can submit a row from a query set in cfgrid if I set it to format=html and it works just fine.  However, with that format, I cannot sort columns which is necessary.  So, I set format=flash and the formatti

  • How to get PDF icons out of Word Toolbar??

    Hello all, I installed photoshop CS2, and now I cant seem to get the "make pdf" icons out of the toolbar. I went into the toolbar options in word and de-selected "Adobe acrobat PDF maker" which removes them for that session. But the next time I resta

  • E6 Back to Symbian Anna is a Popular Request

    Nokia Can we get an update back to Symbian Anna while Symbian Belle comes out without all the faults mention below? Try it for a week and see the customers demand, Please [-O< , We're loyal customers as an average this is the fifth device for each us