Hi,

Indeed you need stuts-portlet-config.xml.

Did you redeploy your portlet after adding stuts-portlet-config.xml ? If you just add this file in the deployed directory, It's not enough.

In general, each modification need a redeployement.

You can find a struts portlet (jpetstore) here:
http://portals.apache.org/bridges/download.html

For more informations about struts portlet brige:
http://portals.apache.org/bridges/multiproject/portals-bridges-struts/features.html

Be careful, portlet-api.jar has not to be in WEB-INF/lib directory. (it is inherited from tomcat\shared\lib)

Regards
KT.

CHALASANI, Aruna a écrit :
Hi,
After adding struts-portlet-config.xml file and few dependent libraries, now I don't get the NullPointerException.When I try to add the portlet in the "Add content object" page, I dont see the newly added struts portlet in the list of portlets available. I restarted the server but still don't see the portlet in the list. Any idea what could be the problem?

Regards,
*Aruna Chalasani*

    -----Original Message-----
    *From:* CHALASANI, Aruna [mailto:[EMAIL PROTECTED]
    *Sent:* 09 May 2007 10:38
    *To:* '[email protected]'
    *Subject:* RE: Deploying a web application

    Hi Khaled,

    I am trying to deploy a simple struts application in jahia. I am
    using struts-portlet bridge for this. The issue is I see a clean
    deployment of the struts application as a portlet. I set all the
    permissions required. When I try to add the portlet in the "Add
    content object" page, I dont see the list of portlets available
    but a NullPointerException at the server. At the same time this
    struts application works fine with the normal application context.

    I have modified the web.xml, stuts-config.xml, and added
    portlet.xml and the required libraries. Did I miss something here?

    The details of the exception :
    535648
    [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/jahia].[

    org.jahia.jsp.jahia.war.jsp.jahia.engines.shared.application_005ffield_jsp]]
    ERR
    OR - Servlet.service() for servlet
    org.jahia.jsp.jahia.war.jsp.jahia.engines.sha
    red.application_005ffield_jsp threw exception
    java.lang.NullPointerException
            at
    org.jahia.jsp.jahia.war.jsp.jahia.engines.shared.application_005ffiel
    d_jsp._jspService(application_005ffield_jsp.java:202)
            at
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
            at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
            at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at
    org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
    atcher.java:672)
            at
    org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD
    ispatcher.java:574)
            at
    org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis
    patcher.java:499)
            at
    org.jahia.services.fetchers.JahiaFetcherBaseService.fetchServlet(Jahi
    aFetcherBaseService.java:113)
            at
    org.jahia.services.fetchers.JahiaFetcherBaseService$$FastClassByCGLIB
    $$f46e2225.invoke(<generated>)
            at
    net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
            at
    org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocatio
    n.invokeJoinpoint(Cglib2AopProxy.java:661)
            at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:122)
            at
    org.springframework.aop.interceptor.AbstractTraceInterceptor.invoke(A
    bstractTraceInterceptor.java:80)
            at
    org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
    ReflectiveMethodInvocation.java:144)
            at
    org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterc
    eptor.intercept(Cglib2AopProxy.java:606)
            at
    org.jahia.services.fetchers.JahiaFetcherBaseService$$EnhancerByCGLIB$
    $ba67c6b0.fetchServlet(<generated>)
            at
    org.jahia.engines.shared.Application_Field.composeEngineMap(Applicati
    on_Field.java:509)
            at
    org.jahia.engines.shared.Application_Field.handleField(Application_Fi
    eld.java:96)
            at
    org.jahia.engines.EngineToolBox.processFieldTypes(EngineToolBox.java:
    132)
            at
    org.jahia.data.fields.FieldsEditHelperAbstract.processCurrentFields(F
    ieldsEditHelperAbstract.java:405)
            at
    org.jahia.engines.addcontainer.AddContainer_Engine.processCurrentScre
    en(AddContainer_Engine.java:479)
            at
    org.jahia.engines.addcontainer.AddContainer_Engine.handleActions(AddC
    ontainer_Engine.java:277)
            at
    org.jahia.operations.valves.EngineValve.invoke(EngineValve.java:111)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.J2ProcessActionValve.invoke(J2ProcessActi
    onValve.java:144)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.CacheReadValve.invoke(CacheReadValve.java
    :65)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.PageAccessCheckValve.invoke(PageAccessChe
    ckValve.java:64)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.OperationModeCheckValve.invoke(OperationM
    odeCheckValve.java:83)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.SiteCheckValve.invoke(SiteCheckValve.java
    :78)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.EsiFragmentCacheReadValve.invoke(EsiFragm
    entCacheReadValve.java:326)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.operations.valves.EsiUrlCookieCheckValve.invoke(EsiUrlCooki
    eCheckValve.java:313)
            at
    org.jahia.pipelines.impl.GenericPipeline.invokeNext(GenericPipeline.j
    ava:208)
            at
    org.jahia.pipelines.impl.GenericPipeline.invoke(GenericPipeline.java:
    195)
            at
    org.jahia.operations.OperationManager.handleOperations(OperationManag
    er.java:100)
            at org.jahia.bin.JahiaAction.execute(JahiaAction.java:72)
            at
    org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:421)
            at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:226)
            at
    org.jahia.bin.JahiaRequestProcessor.process(JahiaRequestProcessor.jav
    a:82)
            at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:116
    4)
            at org.jahia.bin.Jahia.process(Jahia.java:1661)
            at org.jahia.bin.Jahia.service(Jahia.java:862)
            at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
            at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:252)
            at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at
    org.jahia.bin.filters.esi.ESIFilter.doFilter(ESIFilter.java:110)
            at
    org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
    icationFilterChain.java:202)
            at
    org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
    ilterChain.java:173)
            at
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
    alve.java:213)
            at
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
    alve.java:178)
            at
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
    torBase.java:432)
            at
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
    ava:126)
            at
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
    ava:105)
            at
    org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
    ve.java:107)
            at
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
    a:148)
            at
    org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
    :869)
            at
    org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
    rocessConnection(Http11BaseProtocol.java:664)
            at
    org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
    int.java:527)
            at
    org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFol
    lowerWorkerThread.java:80)
            at
    org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
    ool.java:684)
            at java.lang.Thread.run(Thread.java:595)
    535882 [jsp.jahia.engines.engine] DEBUG - LastScreen: edit,
    JspSource: add_conta
    iner, EngineName: addcontainer
    535882 [jsp.jahia.engines.engine] DEBUG - JSP:
    /jsp/jahia/engines/addcontainer/a
    ddcontainer.jsp
    535913 [org.jahia.bin.Jahia]  INFO - Processed
    [/jahia/Jahia/engineName/addconta
    iner/op/edit/pid/11] user=[root] ip=[127.0.0.1] in [4156ms]
    562959
[org.jahia.services.search.lucene.AbstractLuceneSearchIndexer] INFO - Fi
    nished processing 2 indexing orders in 500ms.

    Regards,
    Aruna Chalasani

    -----Original Message-----
    From: Khaled TLILI [mailto:[EMAIL PROTECTED]
    Sent: 03 May 2007 13:18
    To: [email protected]
    Subject: Re: Deploying a web application


    Hi,

    If you develop a new portlet, I advise you to develop a Portlet
    JSR168.
    In this case, you don't need to add jahia.xml file. In order to
    deploy a
    portlet, you have to put it in ${tomcat}/webapps/jahia/WEB-INF
    /var/new_webapps.

    About null pointer exception, have you got mare details? Perhaps it's
    not linked with the deployment process but due to another exception,
    from the portlet.

    Regards,

    Khaled.



    CHALASANI, Aruna a écrit :
    >
    > Hi All,
    > I am using jahia 5.0.1_03 (Jahia 5.0.1 r16926). I am trying to
    deploy
    > a web application and it looks like we have to deploy a webapp as a
    > portlet only. Is there any other option which I am missing here?
    >
    > I managed to deploy my sample web application as a portlet but it
    > gives a NullPointerException when I try to use it. I added
    jahia.xml
    > file to my sample web application to be able to deploy in jahia
    as a
    > portlet. Please suggest me if any other changes are required.
    Thanks.
    >
    > Regards,
    > *Aruna*
    >
    >
    >
    >
    > Feel better with BUPA
    >
    > To find out what BUPA can do for you, visit http://www.bupa.com
    >
    > BUPA House 15-19 Bloomsbury Way London WC1A 2BA
    >
    > Internet communications are not secure and therefore BUPA does not
    > accept legal responsibility for the contents of this message. Any
    > views or opinions presented are solely those of the author and
    do not
    > necessarily represent those of BUPA.
    >
    > BUPA Insurance Limited, BUPA Health Assurance Limited, BUPA
    Insurance
    > Services Limited and Goldsborough Estates Limited are authorised
    and
    > regulated by the Financial Services Authority.
    >
    > For a list of BUPA's main UK trading companies visit
    > http://www.bupa.co.uk/html/statements/legal_notices.html#10
    >
    >
    ------------------------------------------------------------------------

    >
    > No virus found in this incoming message.
    > Checked by AVG Free Edition.
    > Version: 7.5.467 / Virus Database: 269.6.2/785 - Release Date:
    5/2/2007 14:16
>
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: 269.6.6/794 - Release Date: 5/8/2007 14:23

Reply via email to