Struts-Portlet

Hello,
I have created a very simple login form that uses the struts framework. It validates that there is a userid and password in the textfields before it submits through the action. The problem is, the only way I can get the portlet to recognize that I pushed the submit button, is to add "/login.do" (which is my action) for the <showpage> tag in the provider.xml. So now everytime I navigate to my page with this form on it, it acts like i just pressed the submit button and spits the error messages back to me saying i need to enter a userid and password. I've tried making an initialize action with no validation at all and just forward to my login.jsp, so i put that in the <showpage> tag, but doing this makes it so it doesn't recognize my /login.do action.
Any suggestions maybe as to what I am doing wrong or missing.
Here is my provider.xml:
<?xml version = '1.0' encoding = 'UTF-8'?>
<?providerDefinition version="3.1"?>
<provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
<session>true</session>
<passAllUrlParams>true</passAllUrlParams>
<!--
<preferenceStore class="oracle.portal.provider.v2.preference.FilePreferenceStore">
<name>ProviderPrefStore</name>
<useHashing>true</useHashing>
</preferenceStore>
-->
<preferenceStore class="oracle.portal.provider.v2.preference.DBPreferenceStore">
<name>prefStore1</name>
<connection>jdbc/DBPreferencesDS</connection>
</preferenceStore>
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>1</id>
<name>modeChanges</name>
<title>Mode Changes</title>
<description>Mode Changes Description</description>
<timeout>360</timeout>
<showEditToPublic>false</showEditToPublic>
<hasAbout>true</hasAbout>
<showEdit>true</showEdit>
<hasHelp>true</hasHelp>
<showEditDefault>true</showEditDefault>
<showDetails>true</showDetails>
<showPreview>true</showPreview>
<renderer class="oracle.portal.provider.v2.render.RenderManager">
<renderContainer>true</renderContainer>
<renderCustomize>true</renderCustomize>
<autoRedirect>true</autoRedirect>
<contentType>text/html</contentType>
<showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">/login.do</showPage>
<editPage>/edit.jsp</editPage>
<helpPage>/help.jsp</helpPage>
<previewPage>/preview.jsp</previewPage>
<aboutPage>/about.jsp</aboutPage>
<editDefaultsPage>/edit_defaults.jsp</editDefaultsPage>
</renderer>
<personalizationManager class="oracle.portal.provider.v2.personalize.PrefStorePersonalizationManager">
<dataClass>com.ahrs.portal.prototype.modes.CustomPersonalization</dataClass>
</personalizationManager>
</portlet>
</provider>

Thank you so much.
I did try that before when I was looking through some examples but it kept giving me a 500 server error. So I looked into it some more and it was saying there was no provider session. So i changed the settings on my provider in the portal under the 'user login frequency' that was set at 'Once per session' so i changed it to 'always' and it works fine. Now I have one more issue, if I add another portlet to the same page, this portlet gives me that 500 error again about no provider session. It works fine if it is all by itself but not if there is more than one portlet on the same page.

Similar Messages

  • Error after creating a struts portlet in weblogic 8.1 SP 5

    Hi,
    I am using weblogic 8.1 SP 5, to develop an struts-portlet.
    I tested my struts application and it is working fine.
    I have one action i.e firstAction and 2 jsp's in my struts application.
    The action just forwards to the one jsp through struts-config.
    However, when i try to start the server after creating the struts-portlet i get the following error:
    The source of this error is com.bea.netuix.nf.UIControlException: For portlet [portlet_1_1], could not retrieve a result for the given action [firstAction] in the given PageFlow: [null]. at com.bea.netuix.servlets.controls.content.NetuiContent.preRender(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:443) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:718) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender
    Please Help !!!

    Hi,
    Even I am facing the same issue could any body help me out to solve this issue.

  • Trouble with console-extension using struts portlet

    hello everyone,
    I'm developing a console-extension for wls9.2 but couldn't get is to work despite all the documentation available. The console-ext is a struts portlet which gathers data from custom mbeans via jmx and renders the result with a jsp. What already works is fetching the data from the MBeans in the struts action. What does not work is the display of the results in the admin console. So I removed all the stuff from the jsp to just display "Hello World" which should be displayed on the desktop in the admin console, but even this didn't work (it's just a blank spot). Having a look at the log file I get the following:
    e.netui.pageflow.internal.AdapterManager ERROR ServletContainerAdapter manager not initialized correctly.
    e.netui.pageflow.internal.AdapterManager INFO No ServletContainerAdapter specified or discovered; using class org.apache.beehive.netui.pageflow.DefaultServletContainerAdapter
    tui.util.config.parser.NetUIConfigParser INFO NetUIConfigParser -- load config: /WEB-INF/beehive-netui-config.xml
    e.netui.pageflow.internal.AdapterManager INFO No ServletContainerAdapter specified or discovered; using class org.apache.beehive.netui.pageflow.DefaultServletContainerAdapter
    netui.pageflow.AutoRegisterActionServlet INFO Dynamically registering module /loggingController, config XML /WEB-INF/struts-auto-config-loggingController.xml
    netui.pageflow.AutoRegisterActionServlet INFO Dynamically registering module /loggingController, config XML /WEB-INF/struts-auto-config-loggingController.xml
    (...other debug output from my struts action...)
    .wls.web.actions.LoggingControllerAction DEBUG Going to /ext_jsp/helloWorld.jsp using module null
    flow.scoping.internal.ScopedResponseImpl INFO ScopedResponse error 404:
    .netui.pageflow.PageFlowRequestProcessor WARN Struts module is configured to use com.bea.console.internal.ConsolePageFlowRequestProcessor as the request processor, but the <controller> element does not contain a <set-property> for "controllerClass". Page Flow actions in this module may not be handled correctly.
    .netui.pageflow.PageFlowRequestProcessor INFO Attempting to instantiate SharedFlowControllers for request /console/ChangeManagerAction.do
    ive.netui.pageflow.FlowControllerFactory INFO No Global.app was found in /console
    Despite the errors it seems to find my struts config (struts-auto-config-loggingController.xm) and execute the action, but then it seems to have trouble findingd/displaying the jsp (helloWorld.jsp). I tried to set various controller-elements in the struts config, like this ([url http://edocs.bea.com/wlp/docs92/portals/integrate.html#wp1005659]source):
    <controller inputForward="true" processorClass="com.bea.struts.adapter.action.AdapterRequestProcessor" />
    but this didn't work either (and results in other errors). The log from above was created with a config without any controller element (since this is never mentioned in the eDocs for console extensions).
    Despite spending several hours trying to figure out what goes wrong here I wasn't able to get one step closer to a solution. Does anyone have a clue what I did wrong (please ask if you need further information)? Thanks a lot!
    Btw. Sorry if this is the wrong forum, I could't find another one which matches better. Feel free to move the topic to a more appropriate place. thx.
    ====================================
    Struts config:
    <struts-config>
         <form-beans>
              <form-bean name="loggingForm" type="...web.forms.LoggingControllerForm" />
         </form-beans>
         <action-mappings>
              <action path="/LoggingControllerAction"
                   type="...web.actions.LoggingControllerAction"
                   name="loggingForm"
                   scope="request"
                   validate="false"
                   input="/ext_jsp/helloWorld.jsp">
                   <forward name="success" contextRelative="true"
                        path="/ext_jsp/helloWorld.jsp" />
              </action>
         </action-mappings>
    </struts-config>

    The problem could be solved by adding the "handle" property (of type com.bea.console.handles.Handle) to the form bean.
    This is stated on page 7-4 in the "Extending the admin console" guide or [url http://e-docs.bea.com/wls/docs92/console_ext/simpleext.html#wp1083856]here
    In addition the following controller element must be used in the struts config: <controller inputForward="true" processorClass="com.bea.struts.adapter.action.AdapterRequestProcessor" />
    This is not mentioned anywhere and should definitely be added to the guide.
    Hope this helps someone encountering the same problem.

  • Struts Portlet With Input Parameters

    Hi Everyone,
    Am I able to write a struts portlet that has input parameters? Right now, I have a struts portlet with a provider.xml that looks like this:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <?providerDefinition version="3.1"?>
    <provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
    <session>true</session>
    <passAllUrlParams>true</passAllUrlParams>
    <portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
    <id>1</id>
    <name>ManageQuotes</name>
    <title>Manage Quotes Portlet</title>
    <description>Manage Quotes Portlet</description>
    <timeout>40</timeout>
    <showEditToPublic>false</showEditToPublic>
    <hasAbout>false</hasAbout>
    <showEdit>false</showEdit>
    <hasHelp>false</hasHelp>
    <showEditDefault>false</showEditDefault>
    <showDetails>false</showDetails>
    <inputParameter class="oracle.portal.provider.v2.DefaultParameterDefinition">
    <name>encryptedDealerNumber</name>
    <displayName>encryptedDealerNumber</displayName>
    </inputParameter>
    <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <renderContainer>true</renderContainer>
    <renderCustomize>true</renderCustomize>
    <autoRedirect>true</autoRedirect>
    <contentType>text/html</contentType>
    <showPage class="oracle.portal.provider.v2.render.http.StrutsRenderer">
    <defaultAction>/viewquotes.do</defaultAction>
    </showPage>
    </renderer>
    </portlet>
    </provider>
    The <session>true</session> and <passAllUrlParams>true</passAllUrlParams> need to be there to have a struts portlet. The problem is when I put my portlet on a page and then check out 'Page Properties', 'Portlet Parameters', there are no parameters that show up for my portlet. Can anyone help me?
    Thanks
    Cory

    I just went through this two days ago. I ended up logging a TAR/SR with Oracle and it turns out Struts portlets do not support input parameters. Instead you have to set the passAllUrlParams tag to true and then just use portletRequest.getParameter("parameterName") to retrieve page parameters. You have to be careful here because in this older style of doing parameters you have to manage all the uniqueness in naming parameters in case you have more than one portlet on the same page. However, it seems that if all you want to do is read the portal page parameters that unique naming doesn't come into play.
    In my case I have an OmniPortlet setting some Page Parameters via an Event. Then in my struts portlet I just do:
    String foo = "";
    String bar = "";
    PortletRenderRequest portletRequest = (PortletRenderRequest)
    request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
    if ( portletRequest != null ) {  
    foo = portletRequest.getParameter("Foo"));
    bar = portletRequest.getParameter("Bar"));
    That seems to work just fine for me, but in my case I will only ever use my portlet once per page so this fine. If you wanted the same portlet to have different page parameters fed to it for different instances on the same page this style won't work since all the portlets would just read the same page parameters since those page parameters names are coded in the implementation code.
    Hope that helps,
    David

  • Strut-Portlets errors in Weblogic 8.1 SP5

    I am getting the below mentioned error when running a portal containing Struts-Portlet in Webloigc 8.1Sp5.
    I have tried everything but not able to resolve it, does anyone know how to resolve and how to successfully run a Struts-Portlet application?
    Thanks in advance.
    -Raj
    The source of this error is com.bea.netuix.nf.UIControlException: For portlet [portlet_1_3], could not retrieve a result for the given action [strutsAction2] in the given PageFlow: [null]. at com.bea.netuix.servlets.controls.content.NetuiContent.preRender()V(NetuiContent.java:365) at com.bea.netuix.nf.ControlLifecycle$7.visit(Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;)Z(ControlLifecycle.java:443) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:718) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Ljava/lang/Object;ZZZ)V(ControlTreeWalker.java:730) at com.bea.netuix.nf.ControlTreeWalker.walk(Lcom/bea/netuix/nf/VisitorType;Lcom/bea/netuix/nf/UIControl;Lcom/bea/netuix/nf/concurrency/ControlTreeWalkerPool;)V(ControlTreeWalker.java:181) at com.bea.netuix.nf.Lifecycle.runOutbound(Lcom/bea/netuix/nf/UIContext;Lcom/bea/netuix/nf/concurrency/ControlTreeWalkerPool;)V(Lifecycle.java:204) at com.bea.netuix.nf.Lifecycle.run(Lcom/bea/netuix/nf/UIContext;Lcom/bea/netuix/nf/concurrency/ControlTreeWalkerPool;)V(Lifecycle.java:153) at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(Lcom/bea/netuix/nf/UIContext;Ljavax/servlet/http/HttpServletRequest;)V(UIServlet.java:333) at com.bea.netuix.servlets.manager.UIServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(UIServlet.java:196) at com.bea.netuix.servlets.manager.PortalServlet.doPost(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(PortalServlet.java:772) at com.bea.netuix.servlets.manager.PortalServlet.doGet(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(PortalServlet.java:671) at com.bea.netuix.servlets.manager.UIServlet.service(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V(UIServlet.java:147) at javax.servlet.http.HttpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run()Ljava/lang/Object;(ServletStubImpl.java:1072) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Lweblogic/servlet/internal/FilterChainImpl;)V(ServletStubImpl.java:465) at weblogic.servlet.internal.TailFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27) at com.bea.p13n.servlets.PortalServletFilter.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V(PortalServletFilter.java:293) at weblogic.servlet.internal.FilterChainImpl.doFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;)V(FilterChainImpl.java:27)

    What happens in a Struts Portlet is that Portal calls into NetUI to get the action to forward to. The problem appears to be that the struts-config is not getting picked up or registered with NetUI.
    One thing to try is to do inter-op between Struts and NetUI/pageflows first to make sure the struts-config is being picked up and then layer on the Portal layer.
    Connie

  • Struts Support: "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

    I'm currently trying to deploy the struts-example webapp from Struts 1.1 RC1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard made available by the "JSR
    168 and Struts Support" patch.
    I select the struts module successfully "struts-example" and am prompted for the
    location of name mangled configuration file (i.e "struts-config.xml" for struts-example
    becomes "jpf-struts-config-struts-example.xml").
    As soon as I hit next, I am prompted with a dialog informing that me that [Workbench]
    "Cannot parse the struts configuration file."
    Given that this is a file supplied with the struts distro and that I can deploy
    the struts-example to Vanilla WLS 8.1 without problems I suspect this is a problem
    with my attempt to use the Struts Portlet.
    Can anyone please help?
    Thanks,
    --Andy Hull

  • "Cannot  parse the struts configuration file" when using the Struts Portlet Wizard

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

    I'm currently trying to deploy the struts webapp from Struts 1.1 into
    Weblogic Portal 8.1 using the Struts Portlet wizard.
    I select the struts module successfully and am prompted for the
    location of configuration file.
    As soon as I hit next, I am prompted with a dialog informing "Cannot parse the
    struts configuration file."
    I have 't started my server.
    Thanks
    Kicha

  • Struts portlet data binding

    Struts project using syntax like
    <c:out value="${bindings.RaeCustomersView1.labels['Role']}"/> works fine unless deployed as a struts portlet.
    As a portlet all the bindings are null.
    This is a major pain !!!
    Has anyone any ideas.

    ok, just to be more specific.
    If it is a bind control that is modified from the front panel, it works fine even from remote panel. However, if you modify it through a local variable, it wont have any effect on the bound shared variable.
    For this reason, all the changes made to bind indicators wont take effect on the corresponding shared variable either.
    A 2nd work around is to use the property node -> value and that will affect the shared variable correctly. However, I read somewhere that we should reduce the number of property nodes to a minimum when planning to use the remote panel so updating the shared variable directly still seems best.
    Regards

  • CSS for WSRP Struts Portlets

    I have a Struts 1.3 Portlet running in WLP 10.3.2. The css inside JSP displays right in a web-app. But when I expose over WSRP, the css is not getting applied.
    Here is the simple jsp I have:
    test.jsp
    <style type="text/css">
    .test{
    border: 2px solid red;
    background-color : blue;
    </style>
    <span class="test">CSS Testing</span>
    Qn. 2)
    Do I need to have html,head and body tags for Portlets that I want to expose over WSRP?
    Qn3) Do I need to go for render dependencies here..

    Just in case you haven't seen this, I will add in this doc link as well on how to configure render dependencies in the portlet.
    http://download.oracle.com/docs/cd/E15919_01/wlp.1032/e14244/configure.htm#i1073504
    I haven't done this with a struts portlet, but in my example, the .portlet file on the producer would have a
    "lafDependciesUri=/test.dependencies" with the css code you posted in it.
    So the "test.portlet" file on the producer would have something like this:
    <netuix:portlet definitonLabel="myportlet" title="simple test" lafDependenciesUri="/yourpath/test.dependencies">
    </netuix:portlet>
    then on the consumer side, the proxy portlet ".portlet" file would have something like:
    <netuix:proxyPortlet>
    invokeRenderDependencies="true"
    </netuix:proxyPortlet>
    this should allow the proxy portlet to obtain render dependencies from the producer during prerender lifecycle.

  • Logging doesn't work from my Struts portlet

    I've got a Struts portlet that uses (or tried to use) Log4J logging. I don't get any logging - not even .log file creation. When the OC4J instance starts up it gives a warning about not having the Log4J system initialized properly. I have a log4j.properties in my WEB-INF/classes directory so I don't understand why it gives this warning, though.
    Is Struts overriding Log4J logging with its commons-logging.jar?
    I also don't get an application.log file which the portlet should create in the applications-deployment/ directory.
    Has anyone run into this with a Struts portlet?

    I should have mentioned that I'm deploying my Struts Portlet in a local OC4J (with PDK support) and using it as a provider to a remote Oracle Portal. For some reason OC4J doesn't recognize the log4j.properties that is in my WEB-INF/classes directory.
    I've also got a TAR opened with Oracle Tech. support and when they deployed my .ear file to a Portal they get an application.log file which I do not get. There must be something on my local OC4J that prevents any logging (neither the application.log or the log4j .log file gets created on my local OC4J).
    Here are the messages that I get when I start OC4J:
    [java] Sep 2, 2005 11:41:38 AM org.apache.struts.util.PropertyMessageResources <init>
    [java] INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=true
    [java] Sep 2, 2005 11:41:38 AM org.apache.struts.util.PropertyMessageResources <init>
    [java] INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNull=true
    [java] Sep 2, 2005 11:41:38 AM org.apache.struts.util.PropertyMessageResources <init>
    [java] INFO: Initializing, config='oracle.portal.sample.v2.devguide.struts.messages', returnNull=true
    [java] 05/09/02 11:41:39 log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
    [java] 05/09/02 11:41:39 log4j:WARN Please initialize the log4j system properly.
    [java] 05/09/02 11:41:40 Oracle Application Server Containers for J2EE 10g (10.1.2.0.0) initialized

  • How can I display UTF-8 content in a struts portlet

    How can I display UTF-8 (with English and Traditional Chinese mixed characters) content in a struts portlet?
    Version used
    Oracle Portal 10g Release 1 (9.0.4) on Linux
    Portal language support: English only
    Many thanks !!!

    You can utilize multi-lingual support in your Struts portlets, as described in the Portal Developer's Guide.
    Peter

  • Struts portlet and request.getQueryString()

    Hi all,
    I've run into what seems like a bug in using struts portlets.
    In my JSP page, I'm attempting to retrieve the query string (parameters) from the request URL, but apparently under the Portal framework, only the first parameter/value in the query string can be retrieved.
    Eg. URL:
    http://www.myportal.com/portal/page?_pageid=11,86282&_dad=portal&_schema=PORTAL&_piref33_92271_33_86282_86282.strutsAction=%2myAction.do?param1=abc&param2=cde&param3=fgh
    When invoking a request.getQueryString() either in my JSP or in the action servlet, only the first part is returned, which is param1=abc. The rest is dropped.
    I should mention that the actual use of these parameters are okay (such as request.getParameter("param2") will return "cde"). Just pulling them out with the getQueryString() method seems not too work.
    The only way to workaround it for me is to use the request.getParameterNames() and run through the enumeration and construct the query string manually. Of course this is ugly running under the Portal framework because I have to filter out all the Portal parameters that begin with the underscore character(eg. page, schema, etc).
    Has anyone else had this problem and worked around it?
    Thanks in advance

    Hi,
    This may help. Use the pdk-struts-html:link tag instead.
    Something like
    <jsp:useBean id="prevDetail" class="java.util.HashMap"/>
    <c:set target="${prevDetail}" property="event_PreviousSet" value="PreviousSet"/>
    <c:set target="${prevDetail}" property="sortref" value="${param.sortref}"/>
    <c:set target="${prevDetail}" property="sortacc" value="${param.sortacc}"/>
    <c:set target="${prevDetail}" property="filteron" value="${param.filteron}"/>
    <pdk-struts-html:link action="portal/something.do" name="prevDetail">
    Good luck, Hernando

  • Struts Portlet does not show images when it is accessed outside the domain

    Hi all,
    I am using Oracle 10.1.2. I have created a Struts portlet. When I view the struts portlet from my office domain (University domain) it works well and shows the images properly. However, if I try to access the same page containing the struts portlet from some other domain (my home), I cannot see the images and CSS associated with the page. This might be a firewall issue. Is there any way out?
    Best regards,
    Omer

    I fixed the problem.  (YAY!)
    It was the way I embedded the files -- the Dreamweaver default does not work properly so I used the embed from this generator: http://www.bobbyvandersluis.com/swfobject/generator/index.html#alternativeContentHelp which now lets my navbar and swfobjects load properly.  I also made sure that my slideshow (loader.swf) was set with wmode = opaque while the navbar is set to wmode = transparent.  The div for the nav bar has z-index set to 5 while the div for the slideshow has z-index set to 1.  Both have absolute positioning.  I hope this helps anyone in the future that has trouble with overlaying flash (.swf) files.
    Thanks for your reply and trying to help me solve this issue!

  • Struts portlet error

    hi
    When i am working on struts portlet framework,i got this error,here i am sending my log file
    java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to org.apache.pluto.core.impl.PortletContextImpl
    at com.test.PortalServletContextProvider.getServletContext(PortalServletContextProvider.java:24)
    at org.apache.portals.bridges.struts.StrutsPortlet.getServletContext(StrutsPortlet.java:202)
    at org.apache.portals.bridges.struts.StrutsPortlet.processRequest(StrutsPortlet.java:286)
    at org.apache.portals.bridges.struts.StrutsPortlet.doView(StrutsPortlet.java:274)
    at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
    at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
    at com.sun.portal.portletcontainer.appengine.PortletAppEngineServlet.service(PortletAppEngineServlet.java:393)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at com.sun.portal.portletcontainer.appengine.PortletAppEngineFilter.doFilter(PortletAppEngineFilter.java:105)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
    at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
    at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:818)
    at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:695)
    at com.sun.portal.portletcontainer.impl.PortletContainer.getMarkup(PortletContainer.java:209)
    at com.sun.portal.portletcontainer.invoker.WindowInvoker.getPortletContent(WindowInvoker.java:375)
    at com.sun.portal.portletcontainer.invoker.WindowInvoker.render(WindowInvoker.java:249)
    at com.sun.portal.portletcontainer.driver.PortletContent.getContent(PortletContent.java:70)
    at com.sun.portal.portletcontainer.driver.DesktopServlet.getPortletContents(DesktopServlet.java:296)
    at com.sun.portal.portletcontainer.driver.DesktopServlet.getAllPortletContents(DesktopServlet.java:242)
    at com.sun.portal.portletcontainer.driver.DesktopServlet.doGetPost(DesktopServlet.java:121)
    at com.sun.portal.portletcontainer.driver.DesktopServlet.doGet(DesktopServlet.java:90)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
    at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
    at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
    at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
    at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
    at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
    at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
    at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    PSPL_PCCTXCSPPCI0006 : Exception thrown while rendering content for portlet window Content Exception
    PSPCD_CSPPD0022 : Number for Portlet Windows Displayed - thin: 0, thick: 3
    i am using open potlet container 2.x and GlassFish server with NetBeans,
    Any body please help me.
    Thanks,

    u r in the wrong forum. if you r using glassfish, u need to visit glassfish.dev.java.net and find out their forum link and post it over there

  • Struts Portlet problem

    Hello,
    I am developing a Struts Portlet, using JDev 10.1.2, and I'm deploying my app to Oracle Enterprise Manager.
    I have a DB Schema from which I created the Business Components for my Portlet.
    In the portlet, I need to display a tree-like Page Menu (pages have sub-pages and so on) in a single JSP that I have already working perfectly (outside Oracle Portal).
    This JSP consists of a series of "a href" links, each link representing a Menu Page, so that when I click on that link, the other portlets (content portlets) would show the selected page's contents.
    The idea here would be to, when I click a link, raise a struts event so that I can set my ViewObject's current row, and then get Portal to refresh the whole page passing the Page_Id as a parameter, so that both the menu portlet and the content portlet would be synchronized.
    The problem is that inside Portal, I can't seem to get the struts app to work:
    It renders the page just fine, but when I click on a link it obviously sets the browser's URL to one that is not relative to the portal - I suppose because i'm setting the URL mannualy on the "a href".
    (Note that I don't have a Form component in my JSP, just a number of links)
    What I need is to find a way to raise a Struts event so that the current row will be set. I'm trying to do it like this:
    < a href="/portal/menuPage.do?&id=<c:out value="${node2.IdPagina}"/>&event=Select">
    The event is raised and the row is set but I'm (obviously) forwarded to
    http://myServer:myPort/portal/menuPage.do?&id=28&event=Select
    Portal doesn't recognize this address and displays a "404 Not Found" message.
    Is there any other way to raise a struts action with links, or at least, without forms and submit buttons? Because raising it like I'm doing forwards me to a wrong URL.
    I read everything I found on Struts Portlets but still haven't found an answer to my problem.
    Any help?
    Rui Leitão

    When constructing links, you have to use the pdk-specific struts tags, for example:
    <pdk-struts-html:link href="/portal/menuPage.do">Also, you need to use the pdk struts tag library:
    <%@ taglib uri="/WEB-INF/pdk-struts-html.tld" prefix="pdk-struts-html" %>Peter

  • Struts portlet Instance Label problem: Appending the html tags in jsp

    I have created a struts portlet and given it a Instance Label. I have used struts-adapter-html.tld tld in my jsp which is referenced by my struts portlet. But the problem with using this taglib is that the portlet Instance Label is appended to all the html tags on the JSP as a result of which when the page is submitted, formbean will not pick any of the values as the name will not match. Has anyone has faced this kind of problem? How can I prevent the appending of the HTML tags with the portlet Instance Label?
    Please help me overcome this problem..
    Thanks in Advance ...

    1. To begin with, I would not recommend NOT to append portlet instance label to html tags. This is very much required. Take atleast 2 scenarios. If you dropped 2 instances for Same Portlet like News/Articles portlet etc on same page, you need to identify the html fields uniquely for each portlet so that backend java code works properly. Also if you have 2 different portlets assuming you did not give any name to form tag, and if you have html tags with same name, you need to identify them. Remember when portal or desktop is rendered, it is one big html file with html fragmetns from all .portlets files. So I am not sure if there is any option at all, to avoid the appending of instance label value to html tags.
    2. Coming to your usecase, I did had this problem once in 8.1 SPxx long back. All we did was, in the back end code, using BackingFile we could get the intance label value of the portlet. We can get this in pageflow also. Then pass this value and manually append this value to the html field of interest. In your case looks like you have Struts and tld tags. See somehow if you can get portlet instance label in jsp file and pass around to your tag lib code in request parameters etc. This is just one idea. I am not fully aware of your code, so try something along these lines.
    HTH
    Ravi Jegga

Maybe you are looking for