cancel
Showing results for 
Search instead for 
Did you mean: 

Simple JSP will not work as Dashlet

mohammed_amr
Champ in-the-making
Champ in-the-making
Dears,

I know that you can expose an ftl via jsp page by using <r:webscript> tag but when i try to write simple jsp page

<%@ page contentType="text/html;charset=UTF-8" %>
<html>
  <body>
    <div>Hi</div>
  </body>
</html>

As simple as that, and then the jsp page added to the dashlet web-client-config file and when i expose it by configure the page; the html is not worked and there is no Hi message.

i don't want to write ftl and then embedded it with a jsp page, i need a direct jsp exposed  :!:

Any feedback about that !

Thanks
Mohammed Amr.
4 REPLIES 4

smicyk
Champ in-the-making
Champ in-the-making
Hi,

could you show us your configuration file?

Thanks,
smicyk

mohammed_amr
Champ in-the-making
Champ in-the-making
This is a web-client-config-custom.xml file

<alfresco-config>
   <config>
      <client>
         <!– the login page the client will use –>
         <login-page>/jsp/extension/login.jsp</login-page>
      </client>
   </config>

   <!–  add statusable properties to property sheet –>
   <config evaluator="aspect-name" condition="sc:statusable">
      <property-sheet>
         <show-property name="sc:statusIndicator" display-label-id="statusIndicator" component-generator="StoplightGenerator" />
         <show-property name="sc:statusSummary" display-label-id="statusSummary" component-generator="SummaryTextAreaGenerator" />
      </property-sheet>
   </config>

   <!–  add webable aspect properties to property sheet –>
   <config evaluator="aspect-name" condition="sc:webable">
      <property-sheet>
         <show-property name="scSmiley Tongueublished" display-label-id="published" />
         <show-property name="sc:isActive" display-label-id="isActive" read-only="true" />
      </property-sheet>
   </config>

   <!–  add client related aspect properties to property sheet –>
   <config evaluator="aspect-name" condition="sc:clientRelated">
      <property-sheet>
         <show-property name="sc:clientName" display-label-id="client" />
         <show-property name="scSmiley TonguerojectName" display-label-id="project" />
      </property-sheet>
   </config>

   <!– show related documents association on doc property sheet –>
   <config evaluator="node-type" condition="sc:doc">
      <property-sheet>
         <show-association name="sc:relatedDocuments" />
      </property-sheet>
   </config>

   <!– show campaign on marketingDoc property sheet –>
   <config evaluator="node-type" condition="sc:marketingDoc">
      <property-sheet>
         <show-property name="sc:campaign" display-label-id="campaign" />
      </property-sheet>
   </config>

   <!– show related documents association on whitepaper property sheet –>
   <config evaluator="node-type" condition="sc:whitepaper">
      <property-sheet>
         <show-association name="sc:relatedDocuments" />
      </property-sheet>
   </config>

   <!–  add rateable aspect properties to property sheet –>
   <config evaluator="aspect-name" condition="sc:rateable">
      <property-sheet>
         <show-property name="sc:averageRating" display-label-id="average" read-only="true" />
         <show-child-association name="sc:ratings" display-label-id="ratings" read-only="false" />
      </property-sheet>
   </config>
   
   <!– show replaces association on docs with cm:replaceable –>
   <config evaluator="aspect-name" condition="cm:replaceable">
      <property-sheet>
         <show-association name="cm:replaces" />
      </property-sheet>
   </config>
   
   <!– show props on rating property sheet –>
   <config evaluator="node-type" condition="sc:rating">
      <property-sheet>
         <show-property name="sc:rating" />
         <show-property name="sc:rater" />
      </property-sheet>
   </config>

   <!– show props on resume property sheet, set type-specific action list –>
   <config evaluator="node-type" condition="sc:resume">
      <property-sheet>
         <show-property name="sc:candidateName" display-label-id="candidateName" />
         <show-property name="sc:candidateRole" display-label-id="candidateRole" />
      </property-sheet>
      <actions>
         <!– Override the actions menu for a document in the Browse screen for this type –>
         
         <action-group id="document_browse_menu">
            <action idref="interview_setup" />
         </action-group>

         <!– Override the actions menu for Document Details screen for this type –>
         <action-group id="doc_details_actions">
            <action idref="web_enable" hide="true" />
            <action idref="web_disable" hide="true" />
            <action idref="interview_setup" />
         </action-group>
         
         <action-group id="add_content_menu">
            <action idref="web_enable" hide="true" />
            <action idref="web_disable" hide="true" />
            <action idref="interview_setup" />            
         </action-group>
         
         <action-group id="browse_actions_menu">
            <action idref="web_enable" hide="true" />
            <action idref="web_disable" hide="true" />
            <action idref="interview_setup" />            
         </action-group>   
         
         <action-group id="browse_create_menu">
            <action idref="web_enable" hide="true" />
            <action idref="web_disable" hide="true" />
            <action idref="interview_setup" />            
         </action-group>   
      
      </actions>
   </config>
      
   <!–  add someco types to add content list –>
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
         <type name="sc:legalDoc" />
         <type name="sc:marketingDoc" />
         <type name="sc:hrDoc" />
         <type name="sc:hrPolicy" />         
         <type name="sc:salesDoc" />
         <type name="scSmiley SurprisedpsDoc" />
         <type name="sc:resume" />
      </content-types>
   </config>

   <config evaluator="string-compare" condition="Action Wizards">
       <!– The list of aspects to show in the add/remove features action –>
       <!– and the has-aspect condition –>   
      <aspects>
         <aspect name="sc:webable"/>
         <aspect name="sc:clientRelated"/>
         <aspect name="sc:rateable"/>
         <aspect name="sc:statusable" />
      </aspects>

      <!– The list of types shown in the is-subtype condition –>
      <subtypes>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
         <type name="sc:legalDoc" />
         <type name="sc:marketingDoc" />
         <type name="sc:hrDoc" />
         <type name="sc:hrPolicy" />                  
         <type name="sc:salesDoc" />
         <type name="scSmiley SurprisedpsDoc" />
         <type name="sc:resume" />
      </subtypes>      

      <!– The list of content and/or folder types shown in the specialise-type action –>
      <specialise-types>
         <type name="sc:doc" />
         <type name="sc:whitepaper" />
         <type name="sc:legalDoc" />
         <type name="sc:marketingDoc" />
         <type name="sc:hrDoc" />
         <type name="sc:hrPolicy" />                  
         <type name="sc:salesDoc" />
         <type name="scSmiley SurprisedpsDoc" />
         <type name="sc:resume" />         
      </specialise-types>      
   </config>   
   
   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="sc:doc" />
            <type name="sc:whitepaper" />
            <type name="sc:legalDoc" />
            <type name="sc:marketingDoc" />
            <type name="sc:hrDoc" />
            <type name="sc:hrPolicy" />                     
            <type name="sc:salesDoc" />
            <type name="scSmiley SurprisedpsDoc" />
            <type name="sc:resume" />            
         </content-types>
         <custom-properties>
            <meta-data aspect="sc:webable" property="scSmiley Tongueublished" display-label-id="published" />
            <meta-data aspect="sc:webable" property="sc:isActive" display-label-id="isActive" />
            <meta-data aspect="sc:clientRelated" property="sc:clientName" display-label-id="client" />
            <meta-data aspect="sc:clientRelated" property="scSmiley TonguerojectName" display-label-id="project" />            
            <meta-data aspect="sc:statusable" property="sc:statusIndicator" display-label-id="statusIndicator" />
         </custom-properties>
      </advanced-search>
   </config>
   
   <!– action handlers –>
   
   <config evaluator="string-compare" condition="Action Wizards">
      <!–  add custom action handler for "Move Replaced" action –>
      <action-handlers>
         <handler name="move-replaced" class="com.someco.action.handler.MoveReplacedHandler" />
      </action-handlers>
   </config>
   
   <!– UI Actions –>
   <config>
      <actions>
         <action-group id="document_browse">
            <action idref="web_site" />
         </action-group>
      
         <!– Actions Menu for a document in the Browse screen –>
         <action-group id="document_browse_menu">
            <action idref="web_site" />
            <action idref="execute_script" />
            <action idref="execute_script_ii"/>            
         </action-group>

         <!– Actions Menu for Document Details screen –>
         <action-group id="doc_details_actions">
            <action idref="web_enable" />
            <action idref="web_disable" />
            <action idref="web_site" />
            <action idref="execute_script" />
            <action idref="execute_script_ii"/>            
         </action-group>

         <!– Add action to more actions menu for each space –>
         <action-group id="space_browse_menu">
            <action idref="execute_script" />
            <action idref="execute_script_ii"/>
         </action-group>
         
         <!– Actions Menu for Space Details screen –>
         <action-group id="space_details_actions">
            <action idref="execute_script" />
         </action-group>
         
         <action id="execute_script_ii">
            <label>Run Script II</label>
            <image>/someco/images/icons/execute_script.gif</image>
            <action>dialog:executeScript</action>
            <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>

            <!–  Link to SomeCo's web site –>
            <action id="web_site">
            <label>SomeCo</label>
            <href>http://www.optaros.com</href>
            <image>/someco/images/icons/website.gif</image>
            <target>new</target>
         </action>

            <!–  set sc:isActive to true –>
            <action id="web_enable">
            <permissions>
               <!– each permission can be an Allow or Deny check –>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>com.someco.action.evaluator.WebEnableEvaluator</evaluator>
            <label-id>enableWeb</label-id>
            <image>/someco/images/icons/create_website.gif</image>
            <action-listener>#{WebSettingsBean.setActive}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
               <param name="active">true</param>  
            </params>
         </action>

         <!–  set sc:isActive to false –>
         <action id="web_disable">
            <permissions>
               <!– each permission can be an Allow or Deny check –>
               <permission allow="true">Write</permission>
            </permissions>
            <evaluator>com.someco.action.evaluator.WebDisableEvaluator</evaluator>
            <label-id>disableWeb</label-id>
            <image>/someco/images/icons/delete_website.gif</image>
            <action-listener>#{WebSettingsBean.setActive}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
               <param name="active">false</param>      
            </params>
         </action>

         <!– Execute Script Dialog –>
         <action id="execute_script">
            <label>Run Script</label>
            <image>/someco/images/icons/execute_script.gif</image>
            <action>dialog:executeScript</action>
            <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>

         <!– Launch interview setup wizard –>
         <action id="interview_setup">
            <label-id>interviewSetup</label-id>
            <image>/someco/images/icons/interview_setup.gif</image>
            <action>wizard:interviewSetup</action>
            <action-listener>#{BrowseBean.setupSpaceAction}</action-listener>
            <params>
               <param name="id">#{actionContext.id}</param>
            </params>
         </action>
        
      </actions>     

   </config>
   
   <!– Dialogs –>
   <config>
      <dialog-container>/jsp/extension/dialogs/container.jsp</dialog-container>
      <plain-dialog-container>/jsp/extension/dialogs/container.jsp</plain-dialog-container>
      <dialogs>
         <dialog name="executeScript" page="/jsp/extension/dialogs/execute-script.jsp" managed-bean="ExecuteScriptDialog"
                 icon="/someco/images/icons/execute_script_large.gif" title="Execute Script"
                 description="Executes a script against the selected node" />
         <dialog name="manageTask" page="/jsp/extension/workflow/manage-task-dialog.jsp"
                 managed-bean="ManageTaskDialog" icon="/images/icons/manage_workflow_task_large.gif"
                 description-id="manage_task_desc" />                
      </dialogs>
   </config>
   
   <!– Wizards –>
   <config>
      <wizards>
         <!– Definition of the Interview Setup wizard –>
         <wizard name="interviewSetup" managed-bean="InterviewSetupWizard"
                 title-id="interview_setup_title" description-id="interview_setup_desc"
                 icon="/someco/images/icons/interview_setup_large.gif">
            <step name="assignment" title-id="assignment" description-id="interview_setup_step1_desc">
               <page path="/jsp/extension/wizards/interview-setup-wizard/assignment.jsp"
                     title-id="interview_setup_step1_title"
                     description-id="interview_setup_step1_desc"
                     instruction-id="default_instruction" />
            </step>
            <step name="options" title-id="options" description-id="interview_setup_step2_desc">
               <page path="/jsp/extension/wizards/interview-setup-wizard/options.jsp"
                     title-id="interview_setup_step2_title"
                     description-id="interview_setup_step2_desc"
                     instruction-id="default_instruction" />
            </step>
            <step name="notify" title-id="notify" description-id="interview_setup_step3_desc">
               <page path="/jsp/extension/wizards/interview-setup-wizard/notify.jsp"
                     title-id="interview_setup_step3_title"
                     description-id="interview_setup_step3_desc"
                     instruction-id="default_instruction" />
            </step>            
               <step name="summary" title-id="summary" description-id="summary_step_description">
               <page path="/jsp/wizard/summary.jsp"
                     title-id="summary"
                     description-id="summary_desc"
                     instruction-id="interview_setup_finish_instruction" />
            </step>
         </wizard>      
      </wizards>
   </config>
   
   <!– Alfresco dashboard config –>
   <config evaluator="string-compare" condition="Dashboards">
      <dashboards>
         <dashlets>
            <dashlet id="someco-helloworld-webscript" label="Start Workflow Dashlet"
                   description="Hello World WebScript"
                   jsp="/jsp/extension/dashlets/hello.jsp" />
            <dashlet id="someco-whitepapers-webscript" label="SomeCo Whitepapers"
                   description="SomeCo Whitepapers WebScript"
                   jsp="/jsp/extension/dashlets/whitepapers.jsp" />
            <dashlet id="executeScriptII" label="Exceute Script" description="Execute Script"
                  jsp="/jsp/extension/dashlets/executeScriptHome.jsp"/>                  
            <dashlet id="InitiationWorkflow" label="Initiation Workflow" description="Initiation Workflow"
                  jsp="/jsp/extension/dashlets/InitiationWorkflowDashlet.jsp"/>      
            <dashlet id="IssueDashlet" label="Issue Dashlet" description="Issue Dashlet"
                  jsp="/jsp/extension/dashlets/IssueDashlet.jsp"/>
         </dashlets>
      </dashboards>
    </config>
   
   <!–  workflow property sheets –>
   <config evaluator="node-type" condition="scwf:submitHelloWorldTask" replace="true">
      <property-sheet>
         <show-property name="scwf:helloName" />
         <show-property name="scwf:helloDate" />
         <shoe-property name="scwf:helloBoolean"/>
      </property-sheet>
   </config>
   
   <config evaluator="node-type" condition="scwf:submitIssuePublish" replace="true">
      <property-sheet>
         <show-property name="scwf:issueId" read-only="true"/>
         <show-property name="scwf:issueTitle" />
         <show-property name="scwf:applicantType" />
         <show-property name="scwf:submitIssueConfidentially" />
         <show-property name="scwf:applicantNature" />
         <show-property name="scwf:applicantDirection" />
         <show-association name="scwf:attachments"/>
      </property-sheet>   
   </config>
   
   <config evaluator="node-type" condition="scwf:submitReviewTask" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:workflowDescription" component-generator="TextAreaGenerator" />
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="scwf:marketingReview" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" />      
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="scwf:engineeringReview" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" />      
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="scwf:revise" replace="true">
      <property-sheet>
         <separator name="sep1" display-label-id="general" component-generator="HeaderSeparatorGenerator" />
         <show-property name="bpm:description" component-generator="TextAreaGenerator" read-only="true"/>
         <show-property name="bpm:comment" component-generator="TextAreaGenerator" />      
      </property-sheet>
   </config>
  
   <!–  add third-party reviewable related aspect properties to property sheet –>
   <config evaluator="aspect-name" condition="scwf:thirdPartyReviewable">
      <property-sheet>
         <show-property name="scwf:reviewerEmail" display-label-id="email" />
      </property-sheet>
   </config>

   <config evaluator="aspect-name" condition="dswf:relateable">
      <property-sheet>
         <show-association name="dswf:relatedTo"/>
      </property-sheet>
   </config>
   
   <config evaluator="aspect-name" condition="dswf:sendable">
      <property-sheet>
         <show-association name="dswf:sendTo"/>
      </property-sheet>
   </config>
   
   <config evaluator="aspect-name" condition="dswf:attachable">
      <property-sheet>
         <show-child-association name="dswf:attachments"/>
      </property-sheet>
   </config>
      
   <config evaluator="node-type"
      condition="dswf:reviewTask" replace="true">
      <property-sheet>
         <show-property name="dswf:issueId" read-only="true" display-label-id="issueId"/>
         <show-property name="dswf:applicationType" display-label-id="applicationType"/>
         <show-property name="dswf:issueTitle" display-label-id="issueTitle"/>         
         <show-property name="dswf:isConfidential" display-label-id="isConfidential"/>         
         <show-property name="dswf:applicationNature" display-label-id="applicationNature"/>
         <show-property name="dswf:applicationDirection" display-label-id="applicationDirection"/>
         <show-property name="dswf:applicationSubject" component-generator="TextAreaGenerator" display-label-id="applicationSubject"/>         
         <show-association name="dswf:attachments" display-label-id="attachments"/>
         <show-association name="dswf:relatedTo" display-label-id="relatedTo" />
         <show-association name="dswf:sendTo" display-label-id="sendTo"/>
         <show-property name="dswf:reporterName" display-label-id="reporterName"/>
         <show-property name="dswf:creationDate" read-only="true" display-label-id="creationDate"/>
         <show-property name="dswf:handingOverDate" component-generator="DatePickerGenerator" display-label-id="handingOverDate"/>
         <show-property name="dswf:updateDate" read-only="true" display-label-id="updateDate"/>
         <show-property name="dswf:isPaid"/>
         <show-property name="dswf:comment" component-generator="TinyMCETextAreaGenerator" display-label-id="comment"/>      
      </property-sheet>
   </config>

    <config evaluator="node-type" condition="dswf:submitReviewTask"
      replace="true">
      <property-sheet>
         <show-property name="dswf:issueId" read-only="true" display-label-id="issueId"/>
         <show-property name="dswf:applicationType" display-label-id="applicationType"/>
         <show-property name="dswf:issueTitle" display-label-id="issueTitle"/>         
         <show-property name="dswf:isConfidential" display-label-id="isConfidential"/>
         <show-property name="dswf:applicationNature" display-label-id="applicationNature"/>
         <show-property name="dswf:applicationDirection" display-label-id="applicationDirection"/>
         <show-property name="dswf:applicationSubject" component-generator="TextAreaGenerator" display-label-id="applicationSubject"/>
         <show-association name="dswf:attachments" display-label-id="attachments"/>
         <show-association name="dswf:relatedTo" display-label-id="relatedTo" />
         <show-association name="dswf:sendTo" display-label-id="sendTo"/>   
         <show-property name="dswf:reporterName" display-label-id="reporterName"/>
         <show-property name="dswf:creationDate" read-only="true" display-label-id="creationDate"/>
         <show-property name="dswf:handingOverDate" component-generator="DatePickerGenerator" display-label-id="handingOverDate"/>
         <show-property name="dswf:updateDate" read-only="true" display-label-id="updateDate"/>
         <show-property name="dswf:isPaid" display-label-id="isPaid"/>   
         <show-property name="dswf:comment" component-generator="TinyMCETextAreaGenerator" display-label-id="comment"/>
      </property-sheet>
   </config>   
   
</alfresco-config>

amitabhandari1
Champ in-the-making
Champ in-the-making
Your configuration details are fine . Please check the path on which jsp is placed.
Thanks,

mohammed_amr
Champ in-the-making
Champ in-the-making
Thanks AmitaBhandari,

JSP page it is not work cause alfresco explorer built upon JSF and there is no free html can be written in a jsf page.

Simple you need to put your html code inside <f:verbatim> tag.

Thanks.
Mohammed Amr