Using CQ to generate HTML

Hi,
Our current implementation invloves passing a serialised object via a GET request to a Sling servlet, it is deserialsed, the object is added as a request attribute and forwarded  to a relavent JSP page depending on a property in the object.
This implementation will not work for large amounts of data due to the limitations of HTTP GET. HTTP POST requests do not work in Adobe CQ as it thinks that we are modifing the resource.
We need another way to pass in our object to the Servlet and return HTML. How is this possible/feesable in Adobe CQ?
Thanks,
Ryan

Have you had a look at how the CQ5 form components are developed?  see [1]
Basic steps are:
1. Make a form component which has method="POST" and action="<%=currentPage.getPath()%>
2. Make an action component where the sling:resourceType property is set to foundation/components/form/action
3. In the form component, set an input field (type hidden) with name :formstart (notice the : before the name) and set the value to a content node (somewhere accessible).  Create that node, set sling:resourceType to foundation/components/form/start and actionType to the resourceType of the action you made in 2 (e.g. myapp/components/actions/myaction)
4. In the action component, put a post.POST.jsp in there.  This will be your POST handler.  In here, call any java logic or send your data form post data to an OSGi service to do whatever processing is required.  Then at the end of the forward.jsp you have a choice or where to redirect.  Or you can choose to display something here.  Your choice. 
Or the alternative in step 4 is instead of post.POST.jsp, put a forward.jsp and put in a FormHelper.setForwardPath(request, path) where path is a URL which is backed by another script (servlet or component jsp) that does the processing.  It will be a GET request though I believe.
Have a look at the /libs/foundation/components/forms folder and a few others which shows examples of these. 
Hope this helps.
1. http://dev.day.com/docs/en/cq/current/developing/developing-forms.html

Similar Messages

  • Using taglibs to generate html select tag

    Hello,
    I'm using taglibs to generate html select statements like this:
    <input:select ... options="<%= optionsMap %> </input:select>
    However I would like each option element to be assigned a
    "onclick" attribute. Is that possible?
    Thanks!

    >
    <input:select ... options="<%= optionsMap %> </input:select>
    Probably u meant ...
    <html:select ..>
    <html:option value="all">All</html:option>
    </html:select>
    You cannot add an onclick event on the "option" element. Its an incorrect tag.
    However you may add an onClick or rather onChange event of html:select
    Cheers
    -Rohit

  • Error in generating HTML output using Central Output Pro Server 5.5

    I am getting the following error while generating HTML output using the Output Pro Server. A new printer was created with the Physical Device as "HTML Template Generation - [html]" and added to the Job.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](1801) The printer name is invalid.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3015]Error, unable to open printer.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3008]Error, unable to get info about device 'PAYMENTADVICEHTM.html' attached to port '<nil>'.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](183) Cannot create a file when that file already exists.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [2]Error opening output device/file 'PAYMENTADVICEHTM.html'.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [400](6) The handle is invalid.<br /><br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [3018]Error ending page on printer.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfmerge: [210]Nothing was printed.<br />2004/05/07 20:09:53 D:\Program Files\Adobe\Central\Bin\jfserver.exe: [314]Agent exit message: [3018]Error ending page on printer.

    If I were to guess, I'd guess that your filename is invalid. How about removing all special characters (spaces, brackets, etc.) from the device name. Also, make sure your form was compiled for HTML.
    I haven't actually used the HTML driver, but these are general things you should do if you have trouble with any Central driver.
    Regards,
    Rob McDougall
    Indigo Pacific

  • How to generate html-code using csv input with JSP or JAVA???

    Hello,
    I want to read out a .csv-file and generate html-code dynmically with JSP in an EP6 Application. The problem is, that the csv-file can’t be located or openend.
    BTW if every knows a good tutorial or weblog for this, please post the link.
    It’s located in a par-archive under:
    />dist>files
    I tried various methods, in the doContent mehtod or with JSP. Everytime same result.
    Here part of the code I tried in the doContent():
    public class CSV extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
            String strWRoot = request.getWebResourcePath();
            String contentCSV="", line="";
            String linesep = System.getProperty("line.separator");
            File fileLoadCSV = new File(strWRoot+"/files/ma_infosysteme.csv");
            boolean exCSV = fileLoadCSV.exists();
            boolean reCSV = fileLoadCSV.canRead();
            int a=0;
            if(exCSV&&reCSV){
                response.write("ok");
                try {
                  BufferedReader inputCSV = new BufferedReader(new FileReader(fileLoadCSV));
                  while((line=inputCSV.readLine())!=null){
                    contentCSV=contentCSVlinelinesep;
                    a++;
                  inputCSV.close(); 
                catch(IOException ioex){
                    System.out.println("Fehler");  
            else {
                response.write("not ok");
            response.write("<br>Wroot: "+strWRoot);
            response.write("<br>File: "+fileLoadCSV);
            response.write("<br>exists: "+exCSV);
            response.write("<br>read: "+reCSV);
            response.write("<br>Input: "+contentCSV);
    The Output is:
    not ok
    Wroot: /irj/portalapps/DHTML
    File: \irj\portalapps\DHTML\files\ma_infosysteme.csv
    exists: false
    read: false
    Input:
    So thanks to everyone who can give me a good hint.
    Bye.

    Without really looking too much into this it looks like the problem is with the way in which you are trying to open the file. I believe that when creating a File object you need to use a physical path. By using the getWebResourcePath() method you are retrieving the URL to this file and not the physical path name. There is another method (can't remember the exact name) called getPublicResourcePath() (or something similar) which will return the physical path to this file, i.e. c:\usr\sap\.....etc. If you try it this way it may well work
    I hope this helps
    D

  • Generate HTML format report using  DBMS_SQLTUNE.REPORT_TUNING_TASK function

    How could i generate HTML format report using DBMS_SQLTUNE.REPORT_TUNING_TASK function in oracle 11g

    See [url http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_sqltun.htm#CHDGEIHJ]documentation for DBMS_SQLTUNE.
    The TYPE parameter suggests that it would determine the format and whilst the nline documentation in the code (desc DBMS_SQLTUNE) suggests that valid values are TEXT, HTML and XML, it seems that this is not yet implemented. Whilst valid values of TEXT, HTML and XML are validated, only a TEXT report is produced.

  • How do I generate HTML from XML & XSL using XSL Processor ?

    I want to generate a HTML from XML & XSL using XDK for C on
    linux-8i.
    I run the XSLSample well.
    But it only generate a XML from a XML & a XSL.
    Can any one give me some advise or sample code?

    Just use HTML tags instead of xml tags in your stylesheet, and
    you'll generate HTML instead.
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <html>
          <body>
            <xsl:for-each select="ROWSET">
              <table border="1" cellspacing="0">
                <xsl:for-each select="ROW">
                  <tr>
                    <td><xsl:value-of select="EMPNO"/></td>
                    <td><xsl:value-of select="ENAME"/></td>
                  </tr>
                </xsl:for-each>
              </table>
            </xsl:for-each>
          </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>

  • Need to generate html report on deprecated api

    Hi All,
    How do I write a generic tool that can print a report in html format of all the deprecated methods of a class and their count. Are there any freely downloadble tools that does this. What is the best way to do this if I have to write on my own.
    Thanks & Regards,
    Kumar.

    Yep:
    1) Get hold of the source code for x-doclet tags and tinker around with them so that you can find all the deprecated tags in your system.
    2) Write some code yourself that picks up all your files and searches for instance of the deprecated tag
    3) Use javadoc to generate javadoc. Parse the output HTML using DOM/SAX parsers to find deprecated methods
    Unfortunately, a class file never knows that a method is deprecated - so you cant use reflection to find deprecated methods (nor can you use BECL)

  • Generate HTML report with ANT

    Hello,
    I'm  new to FlexPMD. I have just generated my firsts reports. I try to generate HTML reports.
    I browse the documentation, this forum and the web and I find informations to :
    - generate documentation with Hudson
    - generate documentation with Maven
    - generate documentation with XSLT pmd.xml -> html
    Ok, I try to keep it simple. So I don't want to use Hudson.
    I'm using ANT, and I currently don't want to install/learn Maven.
    I'm using FlexUnit with ANT. And It's really simple to generate reports :
    <junitreport todir="${report.flexunit.loc}">
                <fileset dir="${report.flexunit.loc}">
                    <include name="TEST-*.xml" />
                </fileset>
                <report format="frames" todir="${report.flexunit.loc}/html" />
    </junitreport>
    I'm really new to FlexPMD, so I don't have currently a big knowledge, but it seems impossible to generate a HTML report just like junitreport. (1 line in an ANT task)
    I test the XSLT transformation found on this forum (thread "XSLT pmd.xml -> html"). It's really cool. But it's seems difficult, for example, to extract the wrong code part and add it to the HTML page.
    So, what is the simpler solution to generate HTML report just with FlexPMD/ANT ?
    Thanks !

    Hello,
    Currently you generate a PMD report with ANT  like this :
    <! -- define taskdef  -->
    < taskdef name="pmd"  classname="com.adobe.ac.pmd.ant.FlexPmdAntTask"  classpath="${build.pmd.loc}/flex-pmd-ant-task-${flexpmd.version}.jar">
             < classpath>
                 < path refid="flexpmd.base" />
                 < pathelement  location="${build.pmd.loc}/commons-lang-2.4.jar" />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-core-${flexpmd.version}.jar" />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-ruleset-api-${flexpmd.version}.jar"  />
                 < pathelement  location="${build.pmd.loc}/flex-pmd-ruleset-${flexpmd.version}.jar"  />
                 < pathelement  location="${build.pmd.loc}/plexus-utils-1.0.2.jar" />
             < /classpath>
    < /taskdef>
    then generate XML  report like this :
    < pmd  sourceDirectory="${src.loc}" outputDirectory="${report.loc}"  ruleSet="${build.pmd.loc}/rules.xml"/>
    The  XML contains some file nodes :
    < file  name="/Users/user/workspace/AS3_UTILS/src/utils/align/gridAlignSpaceNumber.as">
           < violation beginline="22" endline="22" begincolumn="0"  endcolumn="27" rule="adobe.ac.pmd.rules.naming.TooShortVariable"  ruleset="All Flex Rules" package="utils.align"  class="gridAlignSpaceNumber.as" externalInfoUrl="" priority="5">This  variable name is too short (3 characters minimum, but 1 actually).  Detects when a field, local, or parameter has a very short name<  /violation>
    < /file>
    The  message is in the text node  < violation>TEXT< /violation>
    For  me, we miss an important part of the message : the portion of the "bad"  code.
    It could be very usefull if PMD can generate  something like this :
    < file  name="">
           < violation beginline="" endline="" begincolumn=""  endcolumn="" rule=""  ruleset="" package=""  class="gridAlignSpaceNumber.as" externalInfoUrl="" priority="">
            < description>TEXT< /description>
            < code><CDATA[MY CODE
    MY CODE
    MY CODE]>< /code>
        <  /violation>
    < /file>
    With this, we can  generate "full" HTML report with XSLT transform easily.
    I  understand that it modify the standard XML schema of the output.
    So,  perharps it could be an option like this :
    < pmd fullDescription="true"  sourceDirectory="${src.loc}"  outputDirectory="${report.loc}"  ruleSet="${build.pmd.loc}/rules.xml"/>
    What do you think ?
    Thanks !

  • Error in generating HTML, PDF format

    Hi guys
    I am using Oracle Reports 6i with ORACLE 9i Database.
    After generating my report when i tried to generated report output in HTML or PDF format then system return following error message.
    PDE-PER001 Internal error (REP-3335. Unhandled Internal CA Error. depep 2).
    Remember when i tried to generate HTML or PDF format on other PC file generated successfully.
    Best Regards.
    Hassan Raza

    hello,
    you might want to contact oracle support services. maybe you need a patchset or so.
    thanks,
    ph.

  • "Error while generating HTML" encounterred while running prefilling cache

    Hi,
    We are using BI7, prefilling cache function by using Broadcaster. The prefilng cache is created OK in BEx broadcaser based on Java web and was scheduled. When we run the process chain to trigger the prefilling cache, we got the following error message "Error while generating HTML". But sometimes it is complete successfully.
    Is there anyone know the reason?
    Many Thanks
    Jonathan

    Hi,
    we don't have a separate precalc server. when i run RSPRECADMIN, it show nothing.
    the broadcaster is running on the java web.

  • Swf2html.exe and infinite generated html files

    Dear,
    I use the tool swf2html.exe from Adobe for extracting textual content on .swf files.
    Is there a way to avoid infinite iteration on such swf files : i.e. http://www.cartoondollemporium.com/superdollz/dollz/1012/doll.swf ?
    The problem is that when I try to generate html file with that file in PHP, swf2html.exe made an infinite iterate and there is no way (except manualy cut the process) to stop for example on a max output file size generated.
    Thanks of you have some tips to avoid or solve that extracting problem,
    For test :
    http://www.se-flash.com/cgi-bin/flash.pl?etape2=1
    with http://www.jeuxclic.com/jeux/bubble_shooter.swf work.
    http://www.se-flash.com/cgi-bin/flash.pl?etape2=1
    with http://www.cartoondollemporium.com/superdollz/dollz/1012/doll.swf made infinite loop....
    Stephane.

    1) All you do is specify a directory with the -d option and Javadoc creates the directory structure below that. We often use either "-d docs" or "-d html" to create a directory named "docs" or "html" in the current directory.
    2) Preferably they should be stored on a server that has a web server running so people can access them. We build the docs nightly on the development server where people can access the latest version using a file: URL (not with a web server). Then before each release we stage them on our intranet before we push them out to the intranet. We also run the DocCheck doclet and a link checker nightly so developers and writers can find errors in their documentation.
    3) If you want a top-level page that links to separate javadoc documents, you need to do this manually. However, keep in mind that you can also inter-link all those separate documents by using the -link or -linkoffline option.
    Let us know if you have more questions or comments.
    -Doug Kramer
    Javadoc team

  • JavaScript error using UIXML to generate frames

    Hello all,
    I am trying to use the uix:frameBoderLayout and uix:frame elements to generate an HTML page with frames. I get a Javascript error when running the testFrame.uix in JDeveloper 9.0.3. Both MSIE and Netscape yield the same error.
    The JavaScript error is:
    JavaScript Error:
    http://20.19.205.86:8988/pssWeb-pss-context-root/testFrame.uix,
    line 1:
    _checkLoad is not defined.
    The HTML generated is:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html dir="ltr" lang="en-US">
    <head>
    <title>Property Security System Application</title>
    <link rel="stylesheet" charset="UTF-8" type="text/css" href="/pssWeb-pss-context-root/cabo/styles/cache/blaf-en-netscape.css">
    </head>
    <body class="xc" style="background-color:#FFFFE1" onload="_checkLoad(event)" onunload="_checkUnload(event)">
    <script src="/pssWeb-pss-context-root/cabo/jsLibs/MarlinCore.js">
    </script>
    <frameset border="0" rows="100%,*">
    <frameset rows="*,0" onresize="if(!frames['_uixJS'].cached){location.reload();}">
    <frameset rows="null,*,null">
    <frame name="top" marginwidth="5" frameborder="0" marginheight="0" noresize src="topFrame.uix">
    <frame name="center" marginwidth="5" frameborder="0" marginheight="0" noresize src="centerFrame.uix">
    <frame name="bottom" marginwidth="5" frameborder="0" marginheight="0" noresize src="bottomFrame.uix">
    </frameset>
    <frame frameborder="0" marginwidth="0" marginheight="0" title="" name="_uixJS" noresize src="/pssWeb-pss-context-root/cabo/jsps/a.jsp?_t=jsCache">
    </frameset>
    <noframes>
    </noframes>
    </frameset>
    </body>
    </html>
    <!-- Created by Oracle UIX 2.1.7 -->
    _checkLoad is contained in the MarlinCore.js file.  That file should be in cabo/jslib/ directory.
    Two things strike me odd about the generated HTML code with relation to JavaScript. First, I expect to see JavaScript source files declared in the head portion. Second, the source files is declared after the onload call is made to the _checkLoad function.
    The third thing that I can see possibly causing the error is that the MarlinCore.js file is not visible to the server and therefore not delivered to the browser. But I am not certain where to find the files used by the embedded OC4J server.
    Is this a bug in 9.0.3?
    The uix files follow. All three framed pages (topFrame.uix, centerFrame.uix and bottomFrame.uix) display nicely in the uix preview and run nicely in the embedded OC4J.
    testFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title="Property Security System Application"/>
    </metaContainer>
    <contents>
    <body>
    <inlineStyle>
    <property name="background-color">#FFFFE1</property>
    </inlineStyle>
    <contents>
    <frameBorderLayout xmlns="http://xmlns.oracle.com/uix/ui">
    <top>
    <frame name="top" source="topFrame.uix">
    </frame>
    </top>
    <center>
    <frame name="center" source="centerFrame.uix">
    </frame>
    </center>
    <bottom>
    <frame name="bottom" source="bottomFrame.uix">
    </frame>
    </bottom>
    </frameBorderLayout>
    </contents>
    </body>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    </page>
    topFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text ="Top frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    center Frame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text="center frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    bottomFrame.uix
    <?xml version="1.0" encoding="windows-1252"?>
    <page xmlns="http://xmlns.oracle.com/uix/controller"
    xmlns:ctrl="http://xmlns.oracle.com/uix/controller"
    xmlns:html="http://www.w3.org/TR/REC-html40">
    <content>
    <dataScope xmlns="http://xmlns.oracle.com/uix/ui"
    xmlns:data="http://xmlns.oracle.com/uix/ui">
    <provider>
    <!-- Add DataProviders (<data> elements) here -->
    </provider>
    <contents>
    <document>
    <metaContainer>
    <!-- Set the page title -->
    <head title=""/>
    </metaContainer>
    <contents>
    <pageLayout>
    <contents>
    <text text="bottom frame"></text>
    </contents>
    </pageLayout>
    </contents>
    </document>
    </contents>
    </dataScope>
    </content>
    <handlers>
    <!-- Add EventHandlers (<event> elements) here -->
    </handlers>
    </page>
    Your assistance is appreciated,
    Bill

    Did you create the files with JDev 903 preview or JDEV 902? If you created with JDEV 902 and upgraded your project to
    903 you need to delete all the files in the cabo directory in your public_html directory. That should get rid of your
    javascript errors.

  • In Flash CS4 a generated html with swf file won't play swf

    Using Flash CS4 and having the Flash plug-in ver 10 on my PC, the generated html file will not play the swf in the browser.
    I noticed that the active-x javascript is now included in the header as well as the javascript portion in the body tag.
    But it won't play.  I get the typical blank window in IE with the "X" in the upper left corner.
    I don't have this problem with Flash CS3.
    Any ideas what may be going on?
    Thank you.

    I am having similar difficulty; mostly I am confused.
    I want to open a flash video file in a frame within a webpage.
    I have generated a Flash CS4 html and swf file. When loaded they play, but they play on a separate, full size web page, not in the frame where I want it.
    I then generated FLV and F4V files but that doesn't work.
    It appears that I need to insert the object and embed tags "for Flash Movies" in the html file.
    Once I do that, do I go back to only putting in the html and swf files and create a link to the html file to bring up the video in the target frame?
    What are the FLV files for?

  • Dynamic text box generation in jsp page by using net-ui jsp html tags

    Hi All,
    I Need to generate the "TextBoxes" Dynamically by using the "Net-UI HTML Tags".How can i do this ?
    I am using
    1. WebLogic portal server 8.1 sp4 (Workshop dev environment)
    2. JavaPageFlow Applications
    3. Net-UI tags html jsp
    I need to generate the textboxes dynamically and i have to
    get those values in the page flow .
    How it is possible by using the "Net-UI Tags".
    Thanks In Advance,
    KiranBabu.Karusala

    how we create dynemic text box in jsp based one value which we give at runtime

  • Cannot view topics in generated HTML help

    I am using RoboHelp HTML Version 11 with Windows 7 Enterprise/Service Pack 1. My problem is with generating HTML help files. It appears to generate and I get the message that it ran successfully. It even generates the CHM file, but when I click on a topic, nothing happens. The topics don’t open at all. The TOC books do, but not topics. I do get a compiling warning  “The size of the stop file has to be limited in 512 bytes.” I have no clue what the stop file is. Did a quick search but didn’t find anything useful other than another user a few years ago who had the same issue and same warning. Unfortunately, I did not see resolution posted. Any help would be greatly appreciated! Thank you.

    Hi there
    Ummm, where exactly is the CHM file that you are trying to open?
    Perhaps the link below will explain some things?
    Click here to view
    Cheers... Rick

Maybe you are looking for