Creating new JSF2 pages from a running Servlet (3.0) or JSF2 page?

I'm new to JEE6 web apps with JSF 2.x frontends (GlassFish 3), and I still wasn't able to find a solution for this dynamic JSF 2.x problem:
*From inside a running JSF 2.x web app (Servlet 3.0), which possibilities (if any) do I have to dynamically add generated JSF pages (whole new .xhtml files) to specific folders of the (exploded) document root, so that these pages can be dispatched to the client like any traditional, statically-deployed one?*
Background: An app for "promoting" authors/editors (content providers) which has these few main requirements:
<ol>
<li>New providers will register under <tt>www.acme.com/app/register.xhtml</tt>.</li>
<li>The system will grant each provider "sub-domain" associated with web space under
<tt>www.acme.com/app/<b>providerX</b></tt> where providerX is an arbitrary sub-domain name chosen by the provider during the registration.</li>
<li>Each provider will initially have some pre-defined pages in their document context root, e.g.
<tt>www.acme.com/app/providerX/index.xhtml</tt>, <tt>about-me.xhtml</tt>, <tt>contact.xhtml</tt>, etc.</li>
<li>Each provider will have an administration console for managing 2 tasks:
<ul>
<li type="a"><tt>www.acme.com/app/providerX/admin/page-manager.xhtml</tt> </li>
<li type="a"><tt>www.acme.com/app/providerX/admin/customer-manager.xhtml</tt></li>
</ul>
to specify new pages with offers, publish these pages in their document context root, e.g. <tt>www.acme.com/app/<b>providerX</b>/<b>my-services</b>.xhtml</tt> (customized page name), and
to manage their readers/customers, respectively.
</li>
<li>Thus, each providerX will also have a pre-deployed customer registration page running, which creates standard customer accounts. E.g.:
<ul>
<li type="disc"><tt>www.acme.com/app/providerX/customers/registration.xhtml</tt></li>
<li type="disc"><tt>www.acme.com/app/providerX/customers/login.xhtml</tt></li>
<li type="disc"><tt>www.acme.com/app/providerX/customers/customer-account-dashboard.xhtml</tt></li>
</ul>
</li></ol>
Please note: I know that for such kind of systems a CMS would be more suitable, but is such a system -- here aiming at only basic functionality -- also realizable in pure JEE 6 technologies, i.e. w/o CMS???
<b>The unclear main aspect is stated in my initial question above. Basically, I hope to get these clarifications:</b>
<ol>
<li><b>Which app architecture designs can I use to deploy new generated JSF pages or servlets from within a running JSF page or servlet???</b></li>
<li><b>Supposing that all relevant page description data provided by a provider is stored in a db:
Where can I "cache" the new .xhtml pages generated from these data on-the-fly when (a) an exploded WAR, and (b) a packaged WAR is running???</b>
The pages shall be "hooked" to the scope (doc root) of the respective provider and dispatches by the <tt>FacesServlet</tt> as such.</li>
</ol>
Due to the crucial importance in a current project, I'd really appreciate any constructive help very much.
Natalia.

Natalia F. wrote:
Determining you as one of the experts in this forum, please, could I ask you how you'd solve this kind of web apps in JSF2 (one of the requirements stated at the beginning of this thread):I'm certainly an expert at having an opinion about everything.
>
Having a "page-manager.xhtml" JSF2 UI at "/page-manager" context that lets registered member X define a website (=a set of .jsf/.xhtml pages) in a new context "/websiteX" (where "websiteX" is freely chosen and associated with dedicated webspace to store the pages in the filesystem):
How to store these dynamically created website pages from within the PageManagerServlet?
<ol><li type="a">Could I create a new exploded WAR structure in the filesystem (or elsewhere) when a new context is defined, and then store new .jsf/.xhtml files therein when a new page is defined, all this with usual file operations? -- Would this be enough, or...</li>
<li type="a">...after storing a new page, would I need to explicitly tell the container to deploy the page (or re-deploy the WAR(?)) so that I can instantly test/run the page when it is new/modified, or will it be compiled automatically when pointing a browser to it???
I guess both is possible, but for performance reasons, a pre-compile would be better. How can I achieve this?</li>
</ol>
Thank you a million for your help, Natalia.I only see mention of xhtml files - that is the easy part. But XHTML files don't actually do anything at all. What about classes like JSF managed beans? jar libraries? database connections and ORM/JPA support which also adds the complexity of having to deal with all the configuration descriptor files? Even if you can automatically deploy all that, replacing existing classes and reloading them is a whole different matter.
My "expert" opinion: this cannot be done with JSF. In fact the only Java web framework which I can think of that has any chance of making something like this possible is Play framework. I'd really take the road that EJP took: make the content dynamic, not the webapp.

Similar Messages

  • FM FOR CREATING NEW CONDITION RECORDS FROM INPUT FILE

    Hello vikas,
    I need to develop a interface program FOR CREATING NEW CONDITION RECORDS FROM INPUT FILE.
    Is there ay function module to update or create the condtion records,
    if u have any example interface program to update conditions records please send me.
    regards
    ram.

    This must be your compiler output.
    Basically, it is telling you two things that are wrong - in syntax.
    1. On line number 11 of the file RationalCollection1.java, the compiler expects a type identifier - that would be the object or return type such as int, String, boolean, etc.
    The reason it is doing this is probably due to your not ending a previous statement - like the "expected ';'" error statement. Check your code, make sure that methods (brackets) are closed correctly and there are no open statements (i.e. missing the semi-colen at the end).
    2. On line number 33 of the file RationalCollection1.java, the compiler expected the closing bracket. Thus, you didn't put the bracket where the compiler wants it.
    It appears that you have skipped some lines of code. Those lines are the problem, post them - post lines 30-36 and 9-15 so we can see what is happening around those error lines.

  • I'm trying to remove pages from my menu by exluded them via the page properties.  When I do that Muse crashes with the following error, "menuItemBox U32584 has no associates page!"  Any help is appreciated.

    I'm trying to remove pages from my menu by excluding them via the page properties.  When I do that Muse crashes and displays the following error, "Adobe Muse CC has encountered an error and wil not exit...." "menuItemBox U32584 has no associates page!"
    Any help is appreciated.
    Thanks,
    Carole

    One or more menu widgets within your site have become out-of-sync with the structure of your site in Plan view. If you send us the file we can repair and return it. Or you could delete and recreate the menu widgets.
    Please send us the .muse file at [email protected] along with a link to this thread. If the file is larger than 20Mb you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (If you use a service, please include your return e-mail address in the body of the message, since not all services include it in the sharing invite they send.)
    Thanks.

  • Creating new graphics object from a existing one and sending it for print

    Hello,
    i have a graphics object which is big in size, I am creating a new graphics object from the existing one as given below
    //map is a graphic object
    Graphic g1 = (Graphic)map.create(x,y,width,height);
    Graphic g2 = (Graphic)map.create(x,y,width1,height1);
    Graphic g3 = (Graphic)map.create(x,y,width2,height2);
    arrayList.add(g1);
    arrayList.add(g2);
    arrayList.add(g3);
    Now I want to send the graphic object g1,g2,g3 for print in the method
    public int print (Graphics g, PageFormat pf, int idx) throws PrinterException {
    // Printable's method implementation
    if (curPageFormat != pf) {
    curPageFormat = pf;
    pages = repaginate (pf);
    if (idx >= 3)) {
    return Printable.NO_SUCH_PAGE;
    g = (Graphics) arrayList.get(idx);
    return Printable.PAGE_EXISTS;
    This is not working... what is wrong. can anybody suggest..
    I tried standardprint.java to print a object inside a scrollpane, it is not printing the entire diagram. so I am thinking of something like this.... Please let me know what to do....
    Thanks
    Serj

    The easy way to do this is create a copy using Windows Explorer.
    Open the project and go to File > Rename.
    Then you have your 2013 ready made project.
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Finder - Create new files directly from a folder using finder ?

    In Finder, is there a way to do a right-click in a folder and create a new file like: New Text File or New Document from that location?
    I used to do this oftenly in Windows (right click, New Word document) but I have not found it in Mac OS X, any work around ?
    Thanks

    Try the [Apple feedback page|http://www.apple.com/feedback>. However, note that this is unlikely to be added. It would be a very cumbersome feature.
    On Windows, you're almost guaranteed to be tied to a particular set of document creation tools. If you're using an office suite other than MS Office, you're so weird you might as well be using a Mac! This means that commands like "New Document" make sense there.
    On a Mac, a "document" could be created with MS Word, Pages, TextEdit, NeoOffice, OpenOffice, Mellel, Nisus Writer Marinter Write, or any of a host of other programs. (Mac users tend to put less emphasis on the popular tool and prefer to use the tool that "fits the hand" best.) Further complicating things is the fact that "document" is a very generic term, since every spreadsheet is a document, every Photoshop file is a document, etc. The contextual menu would rapidly become unmanageable if it had to fill up with "New Whatever Document" commands for every app on your hard drive!
    It is possible for you to add your own custom services to the contextual menu using AppleScript or Automator, and you should be able to create services to create new documents for the apps you use frequently. Check on the [AppleScript forum|http://discussions.apple.com/forum.jspa?forumID=724] for guidance on how to do this.

  • How to create new portal desktop from scratch

    Hi Experts,
    I want to create a brand new portal desktop from scratch. Could you please let me know how to go about it?
    Regards,
    EP

    Hi,
    Please check out this document it will help you in creating portal desktop from scratch:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/ep/_a-c/creating%20new%20portal%20display%20rules.pdf
    Hope it helps.
    Thanks
    Mona
    Assign points if helpful

  • HELP!? Remove 1 page from long document and shift all the rest pages

    Hello,
    I am facing to following problem:
    I have a long document with facing pages. Now I need to remove one left page in the middle of the document and shift all the rest pages one step forward. It means from all right pages do a left and vice versa (started from the page that was removed). There is a continous text int the whole document and left/right strip made from different photos.
    To clarify the situation I am attaching the preview. I have deleted page no.12 and I need to shift page 13 to left, 14 to right after 13, 15 to left, 16 to right after 15 and so on....
    Is there any simple way how to do it?
    Thank you very much for any tips.

    It looks to me as if you may something else going on here. Are you using right-to-left text here so the document binding would be onthe right when the book is closed? If not, your problem is not with page 13 so much as it is with the earlier pages.
    Unless you force it to do otherwise by disabling page shuffling someplace, in left-to-right documents using facing pages ID will always put odd numbered pages to the right of the spine and even to the left, the opposite for right-to-left documents. In either case, it seems like you have page shuffling disabled either for the whole file or for a selected spread. You can re-enable it from the menu in the Pages panel. When ID asks if you want to maintain the current number of pages on a spread you should probably say no. Either pages 1-12 will swtch sides, or 13 and following will, and your spreads will rearrange to put two pages together as they should be.
    If you  have overridden master page objects, a side effect of switching sides on the spread will be that the overridden objects will remain and the new master objects from the other side of the spread will appear behind them.

  • Automatically create new Excel file from template using data from a selected row in a separate Excel file

    I am fairly new to Macro and VBA in Excel. I am trying to reduce the amount of work involved in a task that is performed often in our office. Currently, the task involves using 2 separate Excel files. One file is a tracking sheet and the second is the document
    that gets sent out to the client. The second document has all the same information that is inserted into the tracking sheet. What I would like to do is have the information that is in one row on the tracking sheet populate into a new excel file that is created
    automatically from an existing template.
    I have been able to make this partially work. What I have been able to achieve is have the cell that is selected in the tracking sheet (the description field) copy into the new file that is created from the template that is on our server.
    Sub NewRFI()
    ' NewRFI Macro
        MsgBox Selection.Address(ReferenceStyle:=xlA1, _
                               RowAbsolute:=False, ColumnAbsolute:=False)
        Selection.Copy
        Workbooks.Add Template:= _
            "template file path goes here"
        Range("C14").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:= _
        False, Transpose:=False
        Range("C14").Select
        Application.CutCopyMode = False
    End Sub
    What I need to do is get the rest of the information from that same row in the tracking sheet to copy to the new file as well. The other information includes the document number (one cell to the left of the selected cell), who it is from (one cell to the
    right of the selected cell), and the date (two cells to the right of the selected cell). As stated, this information is all in the same row on the tracking sheet. Each piece of information needs to be copied to a certain cell in the new file and I do not want
    the source formatting to be copied to the new file.
    Ideally, I would like it to operate like so: select the first cell in the row (in this case would be the document number field). Then click a button to run the macro that will then copy the information from that row in the tracking sheet to specific cells
    in the new file that is created from the template.
    This process will save us from having to either manually copy and paste the information into the new file or re-type the same information that is already in the tracking sheet.
    This is probably a simple thing to do but it would be great if anybody had some insight on this issue. Thanks in advance!

    Try code like the following. You will have to change the target cells (D25, F1 and H4) to the ones you want, I just used some arbitrary cells as example.
    Sub NewRFI()
    Dim rngCell As Range
    Set rngCell = ActiveCell
    MsgBox Selection.Address(ReferenceStyle:=xlA1, _
    RowAbsolute:=False, ColumnAbsolute:=False)
    Workbooks.Add Template:="template file path goes here"
    Range("C14").Value = rngCell.Value
    ' Change the target cells as needed
    Range("D25").Value = rngCell.Offset(0, -1).Value
    Range("F1").Value = rngCell.Offset(0, 1).Value
    Range("H4").Value = rngCell.Offset(0, 2).Value
    End Sub
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

  • Error While creating new database connection from HFM workspace

    Hi,
    We have recently installed HFM and was trying to create database connection from database connection manager in HFM workspace.
    I am getting below error:
    "Error connecting to database connection : no HssJNIDriver950 in java.library.path" initially and later
    "Error connecting to database connection : com/hyperion/ap/adm/HssConn".
    Any information in this direction would helpful.
    Thanks,
    Bhargav
    Edited by: bhargavr on Jan 24, 2011 6:55 PM

    Hi bhargavr,
    We came accross the same issue. Try the following solution below for this 'KNOWN ISSUE' and let me know how you get on. Drop me a note if you have any questions regarding this post.
    Error: *"Error connecting to database connection: com/hyperion/ap/adm/HssConn" While Creating a Financial Management Database Connection* [ID 1102697.1]
    Modified 04-JAN-2011 Type PROBLEM Status PUBLISHED
    Applies to:
    Hyperion BI+ - Version: 11.1.2.0.00 and later [Release: 11.1 and later ]
    Microsoft Windows x64 (64-bit)
    Symptoms:
    You are running the Financial Reporting Web Server on a 64-bit server.
    When you try to create a new Financial Management (HFM) database connection using the Database Connection Manager in Workspace you receive the following message:
    “Error connecting to database connection <connection_name>: com/hyperion/ap/adm/HssConn”
    You can create a database connection in Financial Reporting Studio. When you refresh a report with a Financial Management database connection, you receive one of the following messages:
    “1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: com/hyperion/ap/adm/HssConn”
    or
    “1001: Error connecting to database connection <DATABASE_CONNECTION_NAME>: no HssJNIDriver950 in java.library.path”
    Cause:
    The issue is documented in unpublished bug 9537050, and in Known Issues in the 11.1.2 Reporting and Analysis Readme. Cross-reference unpublished bug 9707353.
    Solution:
    In the Windows registry, take the following steps:
    Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\HyperionSolutions\FinancialReporting0\HyS9FRReports.
    For each of the following entries, prefix the contents with text in the blue box: Env2, JVMOption13, and JVMOption17 (note that the JVMOption numbers might be slightly different in your environment).
    C:\Oracle\Middleware\EPMSystem11R1\common\ADM\11.1.2.0\bin-64
    If your EPM_ORACLE_HOME is not located at C:\Oracle\Middleware\EPMSystem11R1, replace that location with your location.
    Restart the server.
    G'Luck,
    -David

  • How to create new genius playlists from existing music in library?

    I tried the genius button for creating lists from existing music in my library. The problem is that it continues to show the first list created no matter what song I highlight then hit the genius button. Genius works fine for creating lists I can purchase online, but not new ones from my own music.

    This is the iTunes for Mac forum.
    As you are running Windows you will probably get a better response from posting in the iTunes for Windows forum:
    http://discussions.apple.com/category.jspa?categoryID=150

  • Create new iCal event from contents of mail uses wrong date

    I received an email today with an appointment using the date "6/3/2010 at 4PM". Being from the US, it is obvious to me that this meeting should occur on June 3, 2010, but when I attempt to create a new iCal event with this date it creates the event on March 6, 2010. Even more confusing is that when I choose "Show this date in iCal" it highlights March 7, 2010!
    My question is:
    Shouldn't the system default to a month/day/year date preference everywhere when I've selected US English in the internationalization preferences pane?

    have a very similar question: is there somewhere an application where I can, when receiving an email, put it into iCal so that I am reminded about it in a week or something?

  • Creating new PDF's from the input of a form

    I posted a similar message to this one about 3 months ago. I had to work on other projects and also learn more about the process to make this happen. In a nutshell, here's what I'm trying to accomplish:
    User downloads form from our website and fills it in. (dynamic form is complete)
    User clicks "Submit Form" button on form and XML data is sent to our server. (I'm currently learning about MySQL and PHP, not my forte)
    PHP script on server receives XML and adds input (field data) to database.
    Once that data has been input, another (or the same) PHP script will pull that data from the database and populate a pre-formatted PDF with it.
    Finally, the new PDF will be sent back to the user as an attachment to an email.
    Does this sound like the way it should be done? If so, could someone with experience in doing this provide me with a rough sketch of the sorts of necessary components that will come into play so that I can create a list of things to learn? At this point, what I DO know is that the form will submit its information in XML format and be read by a PHP script. That's about it.
    Thanks!
    Graham

    If it satisfies the requirements then it makes sense.  ;^)
    I have not done PHP development but I am guessing you will need at least:
    1) a PDF library for PHP to do data import/export
    2) an XML library for parsing http://www.php.net/manual/en/refs.xml.php
    3) and a MySQL database driver http://dev.mysql.com/downloads/connector/php-mysqlnd/
    Steve

  • Create new BPS documents from "COPY DOCUMENTS" user exit.

    Hi Gerd,
    thank you so much for your reply.
    I'm continuing other thread here. (Copy "document icon" to new sheet from "SEM-BPS 1" sheet)
    <b> We've a layout that doesn't use macros. </b>
    We'd like to attach a document for each line that is entered on this layout. All the document attribute characteristics are included in this layout.
    Document contents & technical name can be any thing.
    Should I be able to do this?
    This ensures that users be able to edit documents on other layouts which is crucial.
    I tested this For couple of lines and I was successful.
    Before I'd like to start implementing this, I appreciate your inputs on the prcoess that I follow if this is an effective way of doing?
    Any concerns from the performance side?
    any other hidden issues/concerns that you might be familiar with?
    1) I'm reading all document attribute characteristic values of the layout new lines from the user exit.
    2) I've created one variable for each "document attribute characteristic"
    3) I've created "COPY DOCUMENTS planning function" and included variables in the parameter group
    4) user exit in step 1 fills all variables (fills only 1 value at a time) & passes to "COPY DOCUMENTS parameter group"
    4) due to restriction of only single entry variables usage in
    "COPY plannig funciton", I'm using "API_SEMBPS_FUNCTION_EXECUTE" and executing "COPY DOCUMENTS planning funciton" as many times as number of new lines
    5) if there are 6 new lines, user exit in step 1 loops 6 times & calls "API_SEMBPS_FUNCTION_EXECUTE" 6 times which inturn executes "COPY DOCUMENTS planning funciton" 6 times
    Am I on the right & effective path?
    Is there any better approach?
    Appreciate your inputs

    Hi,
    This is one way you can do that. The bad side of your implementation is that the planning function is called 6 times. It would be better to copy the coding of the planning function and modify it in such a way that you can do all of the steps in one go. If the performance is all right I would still leave it the way it is as then you do not have to change to coding.
    Best regards,
    Gerd

  • Creating new business area from external database over dblink

    Hi all,
    I have the following configuration,
    ORCL - Database containing the EUL
    The EUL owner is BI_ADMIN.
    ADG - Database containing the objects and data
    There is a database link from ORCL to ADG using the username BI_ADMIN.
    Steps to recreate problem
    1. I connect to the EUL in ORCL
    2. click on the "Create a new Business area" button
    3. ensure that "on-line dictionary" is selected, then click on next.
    4. select the appropriate db_link from drop-down list.
    5. select user scott from list of users
    6. click on optionss button, and "tick" public tables option. Then click OK button.
    7. click next button
    8. click on user scott in available box.
    It is at this point that i have a problem, no objects in the scott schema are displayed for selection.
    If i create a new user in database ADG ,along with a new object in newly created schema and i follow the steps 1 - 9 detailed above, substituting scott with
    the new user i created, the object i created appears in the available box.
    I would appreciate it if anybody can tell me what i'm doing wrong.
    thanks
    Mel

    Hello
    I'm wondering whether you might have a schema in the local database with the same name as the one you are trying to pull from across the database link. You will need to do a little workaround to get around this if this is your scenario.
    I have a paper in my downloads area on my website: http://ascbi.com/downloads.htm that describes how to pull data definitions in across a database link. Take a look and let me know if this helps.
    Best wishes
    Michael

  • How do you invoke an asp page from a java servlet ?

    How do you do the above. I am very new in java and needs to do something like this. Please provide code snippets on how to do this. Any help will be highly appreciated.

    RequestDispatcher d = getServletContext().getRequestDispatcher("the asp-url")
    d.forward(request, response);request and response are the arguments of the servlets doPost or doGet method

Maybe you are looking for

  • Not able to install Flash

    Hello - I am unable to view movies in FLASHPLAYER. I called the Adobe 800 cusomer support number and was guided through uninstalling and reinstalling FLASH PLAYER and also confirming that the latest version of JAVA installed. However, the person I sp

  • Problems in creating Profit Center : Message KM019

    Hi All, Please suggest the tcode for viewing the sap messages. I am creating profit center but system shows an error while assigning it profit center group. System shows an error that this profit center group cannot be assigned. I tried to assign ano

  • Adobe Edge installation problem

    I downloaded Adobe Edge Animation installer in my PC with Windows 7 and, three times I tried install it, without success. All time this message appears: "Founded following problem: fail error on installation of creative cloud desktop. (Error 1)" Some

  • Sales Order released even though Credit limit exceeded

    Hi experts, We have here a question about credit management. Our credit management functions very normal( That means customizing should be no problem ). But when we run background job with program 'RVKRED06'( in Saturday, it's Non-working day) . The

  • SAP Business one 9.0 AddOn installer error

    Hi Experts, I have upgrade my SAP B1 from 8.82 to 9.0 PL 5. I have an addon also which is I compile with 9.0 DLLs. it is working fine if I direct connect by visual studio 2010 to any client 32-bit or 64 bit. But When I make an .ard file using B1DE 2.