PDK Portlet not calling Struts Action?

Hello,
The problem I have is the PDK struts-portlet jsp page is not invoking my action class after a login page is submitted. The same page seems to get refreshed. No error is registered. However, the same application instance invoked outside of the portal is working fine! Any ideas? Thanks.

Hi,
I don't know how to get the index.faces thing to work but what i did do:
1. create a new jsp in the Page flow Editor
2. renamed the "default" forward to "default1"
3. double clicked on my new jsp and then right clicked to "link existing node". I selected the "begin" action
4. i opened up the new jsp and removed the html, head and body tags. My new jsp only has in it:
==================
<%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
<%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
Beehive NetUI JavaServer Page - ${pageContext.request.requestURI}==================
5. The i republished my code and the begin action was executed.

Similar Messages

  • Call struts action from javascript?

    Hi all
    I'm having problem already discussed here quite a lot, but I have idea to solve it different way. And need to know is it possible or I'm doing mission impossible here :(
    I have JSP with 2 drop down lilsts, where the second is populated according to selected value from first - that's basically my problem.
    Is it possible to somehow only call my struts action which will return all needed values using javascript and onchange event handler?
    I dont have any experience with javascript, and I'm trying to avoid it as much as possible at the moment.
    Thanks in advance

    well as far your requirement is concern if at all you are planning to implement AJAX try to use the below link which might be of some help...
    http://www.it-eye.nl/weblog/2005/12/13/ajax-in-struts-implementing-dependend-select-boxes/
    However,I somehow feel there are few loopholes in the author's approach...
    i advice to use XmlHttpRequest.reponseXML property there.
    However, i've mentioned a sample code snippet for you reference.
    XML Response Pattern :
    ======================
    <? xml version="1.1" ?>
    <dropdown>
    <option>
    <val>CUSTOMIZED_VALUE</val>
    <text>CUSTOMIZED_VALUE</text>
    </option>
    </dropdown>Sample.jsp:
    ===========
    <%@page language="java" %>
    <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <title>Automatic Drop-Down Updation</title>
         <script language="javascript">
          // Global Variable for XmlHttp Request Object  
          var xmlhttp
          // Timer Variables
          var c = 0
          var t
           /* A function which calls a servlet  named AjaxServlet to get XmlData using XmlHttpObject */    
            function refreshCombo(txt){
                xmlhttp = null
                // code for initializing XmlHttpRequest Object On Browsers like  Mozilla, etc.
                if (window.XMLHttpRequest){
                     xmlhttp = new XMLHttpRequest()
                // code for initializing XmlHttpRequest Object On Browsers like IE
               else if (window.ActiveXObject) {
                   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
               if (xmlhttp != null){
                  // Setting the Action url to get XmlData
                   url = "dropdown.do?count="+txt;
                   // Course of Action That Should be Made if their is a change in XmlHttpRequest Object ReadyState NOTE : it is 4 when it has got request from CGI
                   xmlhttp.onreadystatechange = getResponseAction;
                   // Open the Request by passing Type of Request & CGI URL
                   xmlhttp.open("GET",url,true);
                   // Sending URL Encoded Data
                   xmlhttp.send(null);
               else{
                 // Only Broswers like IE 5.0,Mozilla & all other browser which support XML data Supports AJAX Technology
                 // In the Below case it looks as if the browser is not compatiable
                  alert("Your browser does not support XMLHTTP.")
          /* Used for verifing right ReadyState & Status of XmlHttpRequest Object returns true if it is verified */
          function verifyReadyState(obj){
             // As Said above if XmlHttp.ReadyState == 4 then the Page Has got Response from WebServer
              if(obj.readyState == 4){
               // Similarly if XmlHttp.status == 200 it means that we have got a Valid response from the WebServer
                if(obj.status == 200){               
                    return true
                 else{
                    alert("Problem retrieving XML data")
          /* Action that has to take place after getting reponse */
          function getResponseAction(){
              // Verifying State & Status
              if(verifyReadyState(xmlhttp) == true){
                  // Building a DOM parser from Response Object
                  var response = xmlhttp.responseXML.documentElement
                  // Deleting all the Present Elements in the Drop-Down Box
                  drRemove()      
                  // Checking for the Root Node Tag
                  var x = response.getElementsByTagName("option")
                  var val
                  var tex
                  var optn
                  for(var i = 0;i < x.length; i++){
                     optn = document.createElement("OPTION")
                     var er
                     // Checking for the tag which holds the value of the Drop-Down combo element
                     val = x.getElementsByTagName("val")
    try{
    // Assigning the value to a Drop-Down Set Element
    optn.value = val[0].firstChild.data
    } catch(er){
    // Checking for the tag which holds the Text of the Drop-Down combo element
    tex = x[i].getElementsByTagName("text")
    try{
    // Assigning the Text to a Drop-Down Set Element
    optn.text = tex[0].firstChild.data
    } catch(er){
    // Adding the Set Element to the Drop-Down
    document.SampleForm.SampleCombo.options.add(optn)
    /* Function removes all the elements in the Drop-Down */
    function drRemove(){
    var x = document.SampleForm.SampleCombo
    for(var i = document.SampleForm.SampleCombo.length - 1 ; i >= 0 ; i--){                     
    x.remove(i)
    </script>
    </head>
    <body onload="syncCount()">
    <pre> <h1>Refresh Drop-Down <div id='txt'> </div> </h1></pre>
    <form name="SampleForm">
    <!-- Drop Down which has country list -->
    <select name="x" onchange="refreshCombo(this.value)">
                   <option value="1">United States</option>
                   <option value="2">United Kingdom</option>
                   <option value="3">United Arab Emriates</option>
    </select>
    <!-- Drop Down which is dependent on Country Drop down get list of states -->
    <select name="SampleCombo">
    <option value="-1">Pick One</option>
    </select>
    </form>
    </body>
    </html>
    struts-config.xml:
    ==================
    <action-mappings>
    <action path="/dropdown" type="com.controlleraction.AjaxActionClass">
    <forward name="error" path="/error.jsp"/>
    </action>
    </action-mappings>AjaxActionClass.java:
    =====================
    package com.controlleraction;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class AjaxActionClass extends DispatchAction {
      public ActionForward execute( ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response) throws Exception {
        String req = new String("");
        try{
           req = request.getParameter("count");
        } catch(Exception exp){
       if(!req.equals("")){
           response.setContentType("text/xml");        
           response.setHeader("Pragma","no-cache");
           response.setHeader("Cache-Control","no-cache,post-check=0,pre-check=0");
           PrintWriter out = response.getWriter();
           /*a sample bean where we trying to call a service from Model*/
           com.Biz.XmlBean xml = new XmlBean();
           String buffer = xml.getXmlData(req);
           if(xml.close() == true && buffer.equals("") == false)
             out.write(buffer);     
           return(null);
      } else {
         return new ActionForward("error");
    }XmlBean.java:
    =============
    * XmlBean.java
    import java.sql.*;
    import java.util.*;
    import java.io.*;
    * @author RaHuL
    public class XmlBean {
        private Connection con = null;
        private PreparedStatement pstmt = null;
        private ResultSet rs = null;
        // Setting CLASSURL path to TYPE I Driver
        private String CLASSURL = "sun.jdbc.odbc.JdbcOdbcDriver";
        /* Specifing CONNECTION PATH to a DSN named TestDsn
         * Please Make Sure you create a DSN Named TestDsn to your database which holds EMP table
        private String CONNECTIONURL = "jdbc:odbc:TestDsn";
        boolean IS_ESTABLISHED = false;
        /** Creates a new instance of XmlBean and also establishes DB Connections */
        public XmlBean() {
            try{
                Class.forName(CLASSURL);
                con = DriverManager.getConnection(CONNECTIONURL,"admin","");
                IS_ESTABLISHED = true;
            } catch(SQLException sqe){
                sqe.printStackTrace();
            } catch(Exception exp){
                exp.printStackTrace();
        /* Generates XmlData For the Business Logic Specified */
        public String getXmlData(String req){
            String XmlBuffer = new String("");
            if(IS_ESTABLISHED == true){
                try{
                    pstmt = con.prepareStatement("SELECT stateid,statename FROM STATE_TABLE where countryid = ?");
                    pstmt.setString(1,req);
                    rs = pstmt.executeQuery();
                    if(rs != null){
                        XmlBuffer = XmlBuffer + "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
                        XmlBuffer = XmlBuffer + "<!--  Edited by Rahul Sharma -->";
                        // Root Node
                        XmlBuffer = XmlBuffer + "<dropdown>";
                        while(rs.next()){
                            String value = rs.getString(1);
                            String text = rs.getString(2);
                            // Sub-root Node
                            XmlBuffer = XmlBuffer + "<option>";
                            // node which holds value of drop-down combo
                            XmlBuffer = XmlBuffer + "<val>"+value+"</val>";
                            // node which holds text for drop-down combo
                            XmlBuffer = XmlBuffer + "<text>"+text+"</text>";
                            XmlBuffer = XmlBuffer + "</option>";
                        XmlBuffer = XmlBuffer + "</dropdown>";
                }catch(SQLException sqe){
                    sqe.printStackTrace();
                } catch(Exception exp){
                    exp.printStackTrace();
            return(XmlBuffer);
        /* Closes the DB Connection Conmpletely */
        public  boolean close(){
            if(IS_ESTABLISHED == true){
                try{
                    pstmt.close();
                    con.close();
                    return(true);
                } catch(SQLException sqe){
                    sqe.printStackTrace();
                } catch(Exception exp){
                    exp.printStackTrace();
            return(false);
    NOTE: I understand i'm not completely coded things as per proper coding standards.please execuse me for that as this example was just given to enable user to learn how XmlHttpRquest,reponseXML
    can be used for better purposes instead of devising manual parsing.
    where i've used XmlHttpResponse pattern to be in XML. you may make use of other practices like JSON & so on depending on your requirement..
    and and if you are more instrested in integrating Struts with AJAX using few frameworks & customized tag based support please go though the below link.
    http://struts.sourceforge.net/ajaxtags/index.html
    Hope that might help :)
    REGARDS,
    RaHuL

  • How to call struts action manually in onchange property???

    Hello!
    action defined in struts-config.xml:
    <action path="/editLafLm" className="oracle.adf.controller.struts.actions.DataActionMapping" type="oracle.adf.controller.struts.actions.DataForwardAction" name="DataForm" parameter="/editLafLm.jsp">
    <set-property property="modelReference" value="editLafLmUIModel"/>
    <forward name="Submit" path="/viewLaf.do"/>
    </action>
    In my JSP the following form:
    <html:form action="/editLafLm.do" target="laf" onsubmit="self.close();">
    <input type="hidden" name="<c:out value='${bindings.statetokenid}'/>" value="<c:out value='${bindings.statetoken}'/>"/>
    <html:select property="StaId1">
    <html:optionsCollection label="prompt" value="index" property="StaId1.displayData"/>
    </html:select>
    <c:out value="${bindings.editingMode}"/>
    <input name="event_Submit" type="submit" value="    OK    "/>
    </html:form>
    When i click choose an entry from the Select list and then click the Submit Button all works well (the action forward goes to viewLaf.do)
    But i want to use the "onchange" property on the select list:
    <html:select property="StaId1" onchange="submit();">
    This is not the same as pressing the Submit button because here the action editLafLm.do is done in a new window (and then i have to click the submit button)...
    So can i call the action or the action forward manually in the onchange-property so that there is the same behavour as clicking on the submit button???
    Thanks
    Markus

    Markus,
    You can use the click method on the submit button called "event_Submit". The trick is to access it in the elements array of the form.
    So instead of:
    <html:select property="StaId1" onchange="submit();">you will have
    <html:select property="StaId1" onchange="elements[n].click();">where n is the correct index of the 'event_Submit' element in the array of form elements.
    If you need to access the form by name you can always count the form name to be DataForm. So from the document it will be:
    document.forms.DataForm.elements[8].click()Charles.

  • Not calling the action method??

    hi ..
    now i up with some common problem...
    i said as common problem coz i dont know where the error is occuring.
    here is the description.
    In my jsp
    i am having a panel tabbed pane with 2 panes.
    first pane contains some 20 text boxes with save button, used to save the entered records to the database.
    second pane contains the summary page which displays all the records from the respected table with select option button(radio). By selecting the single radio button we can edit the particular record by getting the same in the first tabbed pane fields...
    (here, i am using a javascript to select any one radio button in the form coz radio buttons are generated thru datatable)
    In java
    ======
    in constructor
    i populate all the data from the table to a list. and i display the populated data to the summay fields.
    save button action
    saving the data to the table
    edit the value
    updating the edited values
    Here, my problem is after entering all the fields in the first tabbed pane
    i click the save button. if there is no data in the table(database) all things working properly, but if there single data, save function is not calling. but the constructor are calling properly.
    i am using hibernate for the database conn.
    i know this is some sort of logical error, i am posting this only if any one who had already face this type of error(might be in setting session values).. suggestions plz..

    Hi;
    Your question is not related wiht Download forum side, Please post your issue on related Forum side:
    Forum Home » Developer Tools » JDeveloper and ADF
    Regard
    Helios

  • Google portlet not calling correct url

    My customer has installed the google portlet, and it appears to work, until you click on the search button. When the google search is called instead of going to http://www.google.com/search it seems to look for just the /search part, and append that to the portal hostname url rather than searching from www.google.com.
    Any idea why this could be happening????

    Julia,
    A lot of times this happens because the base HREF is not set right in the provider.xml. If the site uses relative links URL Services needs a base HREF to attach the first part of the URL to the relative part.
    Take a look at the sample google portlet - provider.xml in the PDK. I have inserted below. Within the showPage tag is a tag called baseHREF.
    <portlet class="oracle.portal.provider.v2.http.URLPortletDefinition">
    <id>1</id>
    <name>GooglePortlet</name>
    <title>Google.com Portlet</title>
    <description>This portlet is to test Integration services using Google</description>
    <timeout>100</timeout>
    <timeoutMessage>Google timed out</timeoutMessage>
              <showEdit>false</showEdit>
              <showEditDefault>false</showEditDefault>
              <showPreview>false</showPreview>
              <showDetails>false</showDetails>
              <hasHelp>false</hasHelp>
              <hasAbout>false</hasAbout>
              <acceptContentType>text/html</acceptContentType>
              <registrationPortlet>false</registrationPortlet>
              <accessControl>public</accessControl>
              <renderer class="oracle.portal.provider.v2.render.RenderManager">
    <showPage class="oracle.portal.provider.v2.render.http.URLRenderer">
                        <contentType>text/html</contentType>
                        <pageExpires>60</pageExpires>
                        <pageUrl>http://www.google.com</pageUrl>
                        <filterType>text/html</filterType>
                        <filter class="oracle.portal.provider.v2.render.HtmlFilter">
                             <headerTrimTag>&lt;body</headerTrimTag>
                             <footerTrimTag>/BODY></footerTrimTag>
                             <baseHRef>http://www.google.com/</baseHRef>
                             <convertTarget>true</convertTarget>
                        </filter>
                   </showPage>
              </renderer>
              <securityManager class="oracle.portal.provider.v2.security.URLSecurityManager">
                   <authorizType>public</authorizType>
              </securityManager>
         </portlet>

  • Calling struts actions between the two Web projects

    I don't know if it's the right forum for this question.
    Let's say I have two Web projects: MyProjectWeb and OtherProjectWeb.
    Each of them has they own struts-config.xml configuration and each of them has they own Web Deployment Descriptor (web.xml):
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    Links to the Actions in the two projects are:
    http://localhost:8080/MyProjectWeb/myRender.do
    http://localhost:8080/OtherProjectWeb/otherRender.do
    The question is how can I forward the action from MyProjectWeb to OtherProjectWeb ?
    The configuration in MyProjectsWeb struts-config.xml would look like this:
    <action path="/myRender" type="MyRenderAction" >
    <forward name="forward" path="/OtherProjectWeb/otherRender.do" contextRelative="false"/>
    </action>
    But it doesn't seem to work!
    Can somebody help me with this problem?

    As you've discovered, action paths are relative to the web application you're running on (so that you can deploy the app to any context path you want, without changing anything). They are not relative to the server. Therefore, forwards between webapps are not supported. Your best bet would be to redirect instead.
    By the way, a good source of help on Struts specific questions is the Struts user mailing list at Apache ... it's filled with helpful people, and the archives are a gold mine of good advice. To subscribe, send an empty message to <[email protected]>.
    Craig McClanahan

  • NW2004s SP12, action not called when Save button pressed

    Hi Experts,
    I have a strange behaviour in my Interactive form SAVE functionality. If its a large form, the SAVE button does not call corresponding action method in the implementation.
    However it does when the form size is small eg 1.5Mb or so.
    Please advise. This is quite urgent.
    Thanks in advance
    Mona

    Hi!
    If you commit the form and insert data after that,
    that data will not being commited to the database and got lost until you use
    something like forms_ddl ( 'commit' ); after the insert.
    :system.last_query, which is the very last query of a block in your form,
    will never show an insert in any trigger.
    May a commit-trigger is not a good place for an insert.
    But anyway, hope this help you.
    Regard
    Stauder

  • Values from JSP to Struts Action Class

    Dear All,
    Am working on a small struts project, i want to get values from JSP in the Action class, i tried with sending variables using request through URL, it works fine, any other way is there to send the values from JSP to action class. Am not having any input fields in the JSP.I have links.
    Thanks,
    vyrav.

    I have a dispatch action for that am calling the action like this viewfiles.do?parameter=edit, and i have to send a variable ID from the same page, so am doing like this through java script, viewfiles.do?parameter=edit&id=10. Am able to get the id in the dispatch action edit, but when i start tomcat with security manager its not calling the action itself and its giving accesscontrol exception, but when i directly type viewfiles.do in URL its calling the action.
    I dont know wats the problem, tomcat security manager not allowing this. Please help me.
    Thanks,
    vyrav.

  • In Web Logic Server Due to HTML file tag the action of struts is not called

    Hi All
    I have a problem as under:-
    There is a HTML page which contains several fields including a file input tag of HTML and i write enctype = "multipart/form-data" in the form tag
    I am calling a struts Action from this form, then it is not reaching to that action of struts.
    If I remove this file tag and enctype = "multipart/form-data" then it reaches to the struts action.
    I am facing this problem in Weblogic server 8.1 but i can easily deploy this same code on Tomcat 5.0
    Please help me out from this problem..
    Thanks...
    Nitin Saxena

    My installation has a DefaultWebApp directory under mydomain/applications,
              try moving everything down there. (I'm on 6.1 but I think 6.0 is the same)
              Eliot Stock
              eliot [ at ] carbonfive [ dot ] com
              http://carbonfive.com
              "Ram" <[email protected]> wrote in message
              news:3bc71641$[email protected]..
              >
              > Hi,
              >
              > I am trying to deploy a simple servlet in WebLogic Server.
              > I have done the following steps.
              >
              > 1) Compiled the MyWorld.Java Servlet Successfully in c:test\ Directory..
              >
              > 2) Created WEB-INF/Classes Directory in the home Directory of
              WebApplication Directory..
              > C:\bea\wlserver6.0\config\mydomain\applications\
              > 3) Copied the Class file into the WebApplication Directory i.e
              >
              > C:\bea\wlserver6.0\config\mydomain\applications\WEB-INF/Classes
              >
              > 4) Executed in the Browser using following URL:
              > http://127.0.0.1:7001/MyWorld
              >
              > But, I am getting this error:
              >
              > Error 404--Not Found
              >
              > Please let me know if the above procedure is wrong, then what are the
              exact steps
              > involved in Deploying a servlet in WebLogic Server.
              >
              > Thanks,
              > Ram.
              >
              

  • PDK Struts Not calling StrutsAction

    Hello,
    I posted this question in portal-general forum and just now found out this specific forum.
    My PDK-struts implementation JSP doesn't seem to invoke the Struts-Action class at all after the submit button is clicked on the JSP Page. I just modified the JPDK-struts sample to call my specific action class. The only difference is I use local copy of pdk-struts.tld vs. the external uri used in the jsps of the sample. Any idea? Thanks.

    Hello,
    I posted this question in portal-general forum and just now found out this specific forum.
    My PDK-struts implementation JSP doesn't seem to invoke the Struts-Action class at all after the submit button is clicked on the JSP Page. I just modified the JPDK-struts sample to call my specific action class. The only difference is I use local copy of pdk-struts.tld vs. the external uri used in the jsps of the sample. Any idea? Thanks.

  • How to call a struts action from a JSF page

    I am working on a small POC that has to do with struts-faces. I need to know how to call a struts ".do" action from a JSF page..
    Sameer Jaffer

    is it not possible to call a action from the faces submit button and/or the navigation?
    This a simple POC using struts-faces exmaples.
    Here is my struts-config and faces-config file.
    <struts-config>
    <data-sources/>
    <form-beans>
      <form-bean name="GetNameForm" type="demo.GetNameForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards>
      <forward name="getName" path="/pages/inputname.jsp"/>
    </global-forwards>
    <action-mappings>
      <action name="GetNameForm" path="/greeting" scope="request" type="demo.GreetingAction">
       <forward name="sayhello" path="/pages/greeting.jsp"/>
      </action>
    </action-mappings>
    <controller>
        <set-property property="inputForward" value="true"/>
        <set-property property="processorClass"
                value="org.apache.struts.faces.application.FacesRequestProcessor"/>
    </controller>
    </struts-config>faces-config
    <faces-config>
    <managed-bean>
      <managed-bean-name>calculate</managed-bean-name>
      <managed-bean-class>com.jsftest.Calculate</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <managed-bean>
      <managed-bean-name>GetNameForm</managed-bean-name>
      <managed-bean-class>demo.GetNameForm</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
      <from-view-id>/calculate.jsp</from-view-id>
      <navigation-case>
       <from-outcome>success</from-outcome>
       <to-view-id>/success.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
       <from-outcome>failure</from-outcome>
       <to-view-id>/failure.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    <navigation-rule>
      <from-view-id>/inputNameJSF.jsp</from-view-id>
      <navigation-case>
       <to-view-id>/pages/greeting.jsp</to-view-id>
      </navigation-case>
    </navigation-rule>
    </faces-config>in my inputNameJSF.jsp (faces page)
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
    <%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
    <%@ taglib prefix="s" uri="http://struts.apache.org/tags-faces" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Say Hello!!</title>
    </head>
    <body>
    Input Name
    <f:view>
         <h:form >
              <h:inputText value="#{GetNameForm.name}" id = "name" />
              <br>
              <h:commandButton id="submit"  action="/greeting.do" value="   Say Hello!   " />
         </h:form>
    </f:view>
    </body>
    </html>I want to be able to call the struts action invoking the Action method in the that returns the name
    package demo;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public class GreetingAction extends org.apache.struts.action.Action {
        // Global Forwards
        public static final String GLOBAL_FORWARD_getName = "getName";
        // Local Forwards
        private static final String FORWARD_sayhello = "sayhello";
        public GreetingAction() {
        public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
            String name = ((demo.GetNameForm)form).getName();
            String greeting = "Hello, "+name+"!";
            request.setAttribute("greeting", greeting);
            return mapping.findForward(FORWARD_sayhello);
    }Edited by: sijaffer on Aug 11, 2009 12:03 PM

  • Can we call a pdk portlet from other pdk portlet

    Hi friends,
    Can i call a pdk portlet from other pdk portlet when an event happens.
    Scenario:
    I have a pdk portlet with 10 html links. When anyone clicks on a link then a new portlet should be displayed in the same page.
    Is it possible to call one portlet from others.
    Please help me out with ur ideas or any workarounds.
    Thanks & Rgds,
    Dhanu

    Neeraj,
    Let me state my requirements very clear to u.
    1)I have a search portlet at top right corner.
    2)Below there is a region with 3 tabs(say A, B, C).
    3)When anyone searches for anything in the search portlet then the results should be displayed in new search tab(say D).
    4)If any one navigates to other tab(ie A or B or C) then the search tab(ie D) should not be displayed.
    This is my requirement. Can u please suggest me with how this can be achieved. I am just a beginner to Oracle portals10.1.4 and i am using JPDK to create portlets.
    Please do reply ASAP.
    With thanks & Rgds,
    Dhanu

  • Migrating Struts/ADF 10.1.2 = 10.1.3, model validation not called

    As said in thread
    reportErrors(PageLifecycleContext ctx) not called
    Old Struts 10.1.2 can remain as is and will work in JDev 10.1.3.
    For some unexplained reason in my new account registration action, the entity validation method doesn't get called after migration?
    This jsp and action are similar to the toyStore new account creation,
    10.1.3 trace extract:
    as you see prepareToCreateNewAccount
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.prepareModel webAccountAM call to prepareToCreateNewAccount
    06/07/08 20:20:38 com.photoswing.model.site.AccountInSiteImpl.create BEGIN
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.prepareModel END
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel BEGIN
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm: oracle.adf.controller.v2.struts.forms.BindingContainerActionForm
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel curLogin:
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates BEGIN skipCycle: false
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates mystr: null
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates call to super.validateModelUpdates
    06/07/08 20:20:38 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates after call to super.validateModelUpdates, this.hasErrors(ctx): false
    JDev 10.1.2 extract:
    06/07/08 20:41:45 com.photoswing.model.site.AccountInSiteImpl.create BEGIN
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.prepareModel END
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm: oracle.adf.controller.struts.forms.BindingContainerActionForm
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel curLogin:
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates BEGIN skipCycle: false
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates mystr: null
    06/07/08 20:41:45 com.photoswing.webview.actions.AccountRegisterAction.validateModelUpdates call to super.validateModelUpdates
    06/07/08 20:41:45 com.photoswing.model.site.AccountInSiteImpl.validateEntity BEGIN
    etc ...
    Thank you for giving me a clue.
    Fred

    I traced my program, the action form has all the pending values entered in the jsp page but the View Row isn't updated?
    extract of pending values:
    06/07/09 12:05:47 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm, key: Email, value: [email protected]
    06/07/09 12:05:47 com.photoswing.webview.actions.AccountRegisterAction.processUpdateModel actionForm, key: FirstNameLatin, value: aaaxxx
    For your info:
    Service update 4 was installed.
    The navigation event to the review page is not a commit action.
    My trace shows that:
    -my prepareToCreateNewAccount is called when the jsp is first accessed (no event handling)
    - after activating next button:
    - no new call to prepareToCreateNewAccount => ok
    - processUpdateModel is called
    - the ActionForm gets filled => ok
    - validateModelUpdates is called
    but VO row (based on one Entity) and Entity set and validation methods are not called?
    My page def has only one iterator?
    Question when and where does the framework copy ActionForm values to underlying VO?
    I noticed that there were new ActionForm classes:
    oracle.adf.controller.v2.struts.forms.BindingContainerActionForm
    Do they work with
    <set-property property="v1ActionClass"
    value="com.photoswing.webview.actions.AccountRegisterAction"/>
    I need a clue!
    I'm lost!
    Regards
    Fred

  • Why can´t call my action !? struts in oas

    I have aplicattion with struts !!!!!
    The function sin OC4J is very good ......but .....when I      generate deploimente from my aplicattion in OAS ....The can´t call the Action from my aplicattion !!!!
    Sombody help me !?

    I went to settings-wallpaper.  clicked on the lock screen found my picture and responded to lock screen only.  The picture I chose shows up there but not on the phone actual lock screen.

  • Calling struts application within a portlet

    Can anyone explain step wise procedure to call struts application within a portlet.or refer any tutorial for this.

    Amir,
    this might be because you are using the plain struts taglibs. you should use the pdk-struts taglibs. more specifically, you should use the pdk-struts-html taglib instead of the struts-html lib, as the latter renders URLs for a struts application whereas you need portal-enabled urls, which are provided by the pdk-struts-html lib.
    You can either change the taglib reference in your web.xml file to map the plain sruts-html.tld to the pdk-struts-html.tld (don't forget to include it and its jarfile in your deployment file), or you can add the library to every jsp page and replace the <html:whatever> tags by <pdk-html:whatever> tags. (or your other favourite prefix).
    Regards,
    Benjamin

Maybe you are looking for