in Education by
I'm new to Web java programming. I want to create a simple JSF modular application. I found a simple tutorial link but unfortunately I still have some questions how to use OSGI: Can I create a simple OGI bundle and place in it some JSF pages? If not how usually web applications are developed. Can you give me link with example how I can call functions and pass arguments form a WAR file to OSGI module. Regards JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Not an answer specifically for JSF (this might be), but for OSGi web-apps in general take a look at Pax-Web if you're using maven. The easiest way to get started with Pax-Web is probably to use Karaf and then run the command features:install war Once a WAR (or WAB - Web App Bundle) is deployed you'll be able to use the osgi-bundlecontext attribute in Servlet initialization, eg: extends HttpServlet { BundleContext bundleContext; @Override public void init() throws ServletException { bundleContext = (BundleContext) getServletContext().getAttribute("osgi-bundlecontext"); } Using this you can look up services in the OSGi registry. You'll need to pay attention to the bundle's MANIFEST.MF entries, two in particular: Bundle-ClassPath: ./,WEB-INF/classes Webapp-Context: context-root-name-here Or in an OSGi compliant WebApp container you'll need to add: Web-ContextPath: context-root-name-here There's more info in the specifications, see the enterprise or compendium PDFs for v4.2 EDIT: For deploying in JBoss you'll most likely want to use the WAB support, see section 128 of the enterprise 4.2 spec. Also this may help: http://community.jboss.org/message/619443 Interestingly JBoss AS7 is using pax-web, so the documentation for this should largely apply too.

Related questions

0 votes
    I'm new to Web java programming. I want to create a simple JSF modular application. I found a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 7, 2022 in Education by JackTerrance
0 votes
    Which module will you use to create a directory? (i)file (ii)fetch (iii)copy (iv)template...
asked Jan 24, 2023 in Technology by JackTerrance
0 votes
    I am trying to create a table using Happybase. To start I enter the following commands get Hbase and ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 6, 2022 in Education by JackTerrance
0 votes
    I have some wizard-like pages in my application, its keeping state while navigating between small steps, the ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 19, 2022 in Education by JackTerrance
0 votes
    Mention the command used to create simple axis in d3.js?...
asked Nov 14, 2020 in Technology by JackTerrance
0 votes
    I am able to create and run a simple GWT application by creating all the files myself. It works ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 20, 2022 in Education by JackTerrance
0 votes
    _______________ module copies a dynamically generated file from control machine to target hosts. (1)fetch (2)copy (3)template (4)file...
asked Jul 5, 2021 in Technology by JackTerrance
0 votes
    My git workspace is dirty, there are some local modifications. When I use the command git pull origin master it ... Ansible git module? Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    The Cold War ended with the event, ......... (a) Establishment of the United Nations (b) Disintegration ... Organisations (d) Cuban Missile Crisis Please answer the above question....
asked Aug 20, 2022 in Education by JackTerrance
0 votes
    Compare the First World War and the Second World War with the help of the following points. Points First ... established after the War Please answer the above question....
asked Aug 20, 2022 in Education by JackTerrance
0 votes
    In an application currently in production, one module of code is being modified. Is it necessary to re-test ... it enough to just test functionality associated with that module?...
asked Oct 17, 2020 in Technology by anonymous
0 votes
    DROP TYPE Position; CREATE OR REPLACE TYPE Position AS OBJECT (longitude NUMBER(11,7), lattitude NUMBER(11, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I'm teaching a kid programming, and am introducing some basic artificial intelligence concepts at the moment. To begin ... and boxes)? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    write a Java program for the following : write a program in java to calculate simple interest (SI) for principal ... (T) as 3years Select the correct answer from above options...
asked Dec 13, 2021 in Education by JackTerrance
...