Define global-forwards in struts2

Hi!
I am migrating from struts-1 to struts-2. Is there any possible solution where i can define the global-forwards in struts 2?

Yes, in your struts.xml file:
Ex:
<package name="somepackage" extends="struts-default">
    <global-results>
      <result name="success">/good.jsp</result>
      <result name="input">/form.jsp</result>
      <result name="error">/error.jsp</result>
    </global-results>
...Gabriel

Similar Messages

  • Exception in global forwards in strut-config.xml

    Hi friends,
    i am doing a global forward and i am getting the following exception. without global forward in strut-config.xml it works fine.exception
    javax.servlet.ServletException: Cannot find global ActionForward for name welcome
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:76)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    javax.servlet.jsp.JspException: Cannot find global ActionForward for name welcome
         org.apache.struts.taglib.logic.ForwardTag.doEndTag(ForwardTag.java:142)
         org.apache.jsp.test_jsp._jspx_meth_logic_forward_0(org.apache.jsp.test_jsp:93)
         org.apache.jsp.test_jsp._jspService(org.apache.jsp.test_jsp:64)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)my struts-config.xml is
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">
    <struts-config>
    <!-- ========== Global Forward Definitions ============================== -->
      <global-forwards>   
      <forward name="welcome" path="/LPCIndex/doit.do" redirect="true"/>
      </global-forwards>
      <!-- ========== Action Mapping Definitions ============================== -->
      <action-mappings>   
    <action
         path="/doit"
         type="com.hsbc.lpcintex.LPCIntexAction">
         <forward name="success" path="/index.jsp"/>
    </action>
      </action-mappings>
    </struts-config>my web.xml
    is
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!--
      Copyright 2004 The Apache Software Foundation
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
          http://www.apache.org/licenses/LICENSE-2.0
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
    -->
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
        version="2.4">
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description>
    <!-- JSPC servlet mappings start -->
    <!-- The Welcome File List -->
         <welcome-file-list>
              <welcome-file>test.jsp</welcome-file>
         </welcome-file-list>
         <session-config>
              <session-timeout>0</session-timeout>
         </session-config>
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- JSPC servlet mappings end -->
    </web-app>and my jsp code is
    <%@ page language="java" import="com.hsbc.lpcintex.*" import="java.io.*"%>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <html>
    <body>
    <logic:forward name="welcome"/>
    </body>
    </html>any help please
    thanks
    R

    its done by adding
    <load-on-startup>2</load-on-startup>to web.xml

  • Define Global Variable in XSLt

    H,
    Please let me know how to define Global Variable in XSLT.
    I have define a variable under for-each and i want to use that variable after for-each.
    Please suggest on the same.
    Thanks,
    Pradeep

    Hi Pradeep,
    IN XSL design, right click on target node and then select --> Add Variable. Give the name you desire to that variable and click OK. You can use that variable anywhere in that particular XSLT. In the source xsl you will see entry like this after adding your variable
    "<xsl:variable name="your variable name">value you want to give</xsl:variable>".
    Hope this helps.
    Regards,
    Karan

  • How can I define global variable in user exit whic I can use anywhere.

    Hi all,
    How can I define global variable( Table ) which I can use when it come back to same user exit where I defined and stored some data.
    What I mean is I want to define 1 global table.
    In user exit when it comes I store some information. and again when it will come I will have that stored information so I can use it.
    Thanks a lot in advance.

    You can use EXPORT  TO MEMORY ID and IMPORT FROM MEMORY ID Statement for this.
    EXPORT T_ITAB FROM T_ITAB TO MEMORY ID 'ABC'.
    IMPORT T_ITAB TO T_ITAB FROM MEMORY ID 'ABC.'

  • Travel management-- Control Parameters for Travel Expenses-- Define global

    We have setup provision variants for:
    India, UAE, Africa (since travel expenses in these countries need to be settled in the local currency).
    For each of the above variants, we have done the following settings in IMG node:
    Travel management-->Control Parameters for Travel Expenses --> Define global setting
    I have selected the respective country for the "Country grouping" field. i.e. for India Variant, it is set to India and similarly for UAE etc.
    Is this correct? What is the impact if in India variant this field ("Country grouping) is set to UAE?

    hi
    the settings which you set is right.
    you will have inconsistency between the settings you made in the other areas.

  • Loading defining global variables?

    Hello all!
    I have a project that is an online presentation, which I (being no pro in codeing) create in Edge and Muse. I create the animation in Edge, publish it as OAM and place it into the muse site/page. Master looks fine and I am happy with it.
    My problem, that I have to solve, is that it has to be translated into 44 Languages and kept updated regularly, which is near to impossible without using external data source.
    I thought to create an XML file for each language and use it for text and maybe Image content. I can use an xml file for a specific animation, but at my current knowledge level i!Il have to define the variables and the source of content for each and every animation/object.
    What I would like to see is that if you land on the Index page, you can choose the preferred language, and all the content appeares in the given language. For that (my best guess) I'll have to define global variables, which do not lose their value i.e.: which is my preferred language.
    How do I do that? Had anyone a similar issue? Also, how do I use external data in Muse?
    Any help would be appreciated!
    Greetz
    ND

    Here it is :
    In the Stage > document.compositionReady event handler, we define a JavaScript object LANG containing
    • a property flag that is the state of the displayed flag (in the example file, symbol drapeau, french for flag) ;
    • a function switchLang executed each time the flag is clicked, to refresh the content of
    - the three titles (b1A_tit, b1B_tit, b1C_tit) by  assigning hard-coded values,
    - the three texts (b1A_txt, b1B_txt, b1C_txt) by loading HTML snippets files in a text folder.
    LANG =
      flag: 'NL',
      switchLang: function()
        sym.getSymbol('bandeauH').getSymbol('drapeau').stop( LANG.flag);
        var symBloc1A = sym.getSymbol("bloc1A");
        var symBloc1B = sym.getSymbol("bloc1B");
        var symBloc1C = sym.getSymbol("bloc1C");
        switch (LANG.flag)
          case 'NL':
            symBloc1A.$('b1A_tit').html("Montagne");
            symBloc1A.$('b1A_txt').load('text/b1A_FR.html');
            symBloc1B.$('b1B_tit').text("Peinture");
            symBloc1B.$('b1B_txt').load('text/b1B_FR.html');
            symBloc1C.$('b1C_tit').text("Maison d’hôtes");
            symBloc1C.$('b1C_txt').load('text/b1C_FR.html');
            LANG.flag = 'FR';
            break;
          case 'FR':
            symBloc1A.$("b1A_tit").text("Montagne");
            symBloc1A.$('b1A_txt').load('text/b1A_NL.html');
            symBloc1B.$("b1B_tit").text("Schilderen");
            symBloc1B.$('b1B_txt').load('text/b1B_NL.html');
            symBloc1C.$("b1C_tit").text("Bed & Breakfast");
            symBloc1C.$('b1C_txt').load('text/b1C_NL.html');
            LANG.flag = 'NL';
            break;
    LANG.switchLang();
    The drapeau > click event handler is a single call to LANG.switchLang();
    Download the example file here : https://app.box.com/s/f8boa2oswnowyl3ehb2o
    Gil

  • Using User Defined Global Functions

    Hi,
    I am implementing Error Handling in a package. The logic goes like this:
    If the call to the first interface fails, KO will call the error proc using which error message is extracted, written to a file and an email notification is sent.
    The code given below is written in the procedure.
    OdiOutFile -FILE=E:\OraHome_2\oracledi\demo\Assignmnt\ErrorLog.log
    ErrMesg:'<%=odiRef.getPrevStepLog("MESSAGE")%>'
    Now i need to implement this using a global function which can be used across interfaces to implement error handling.
    i want to club the code used above with sending an email notification.
    Can anyone pls guide me if i my approach is correct and how this approach can be implemented using Global Function?
    Thanks.
    Edited by: RitikaS on Dec 18, 2009 2:19 AM

    Hi Ritika,
    Can i suggest a method?
    Build a package, define your interface flow, from the KO (failure) of every interface call OdiSendMail.
    In the OdiSendMail define all the parameters like Mail Server,From, To, Subject and in the message body paste the below code,
    Previous step <%=odiRef.getPrevStepLog("STEP_NAME")%> with session number <%=odiRef.getPrevStepLog("SESS_NO")%> failed with the error message
    *<%=odiRef.getPrevStepLog("MESSAGE")%> .*
    Please look into the operator for more details.
    So what ODI will do is, it will send a notification to the recipient with the error message ,interface name and session number.
    Sample :
    Previous step INT_LOAD_AGE with session number 1822124 failed with the error message
    17002 : null : java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
         at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:361)
         at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
         at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:595)
         at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.c(SnpsConnection.java)
         at com.sunopsis.sql.i.run(i.java)
    Please look into the operator for more details.
    Makes sense?
    http://img259.imageshack.us/img259/1704/screenshot003.jpg
    P.S: Please do close your threads accordingly assigning points (Helpful/Correct) to make experts to help you eagerly.
    Thanks,
    Guru

  • Challenge - Defining "global" variable accessible in Transfer Rules Routine

    Hi,
    Is there a way to define a global variable in BW which is accessible via all the "Routines" in the Transfer Rules in the Info Source.
    Scenario:
    1) I have a field called ZTEXT in the transfer rules.
    2) I am adding code in the Routine to manipulate this data in the Transfer Rules for the Info Source.  Ultimately the RESULT will be populated with a value.
    RESULT = .
    returncode <> 0 means skip this record
      RETURNCODE = 0.
    abort <> 0 means skip whole data package !!!
      ABORT = 0.
    $$ end of routine - insert your code only before this line   
    3) In the Routine Code, the value of the RESULT will be derived based on what's in a field called "g_value".  I don't want to derive the value in the "g_value" field in each Routine for each record that gets processed as it will take a performance hit. I am looking for a way that "g_value" can be populated once e.g. in a START Routine or another alternative and then "g_value" can be used throughout the Routine for any field in the transfer Rules.
    Is there a way to define and populate "g_value" as a global variable so its VALUE can be retained and used in all the Routines in the same transfer rules.  Note that there will be a fair amount of logic to derive "g_value" and hence the need to avoid deriving it each time.
    Could someone advise me if this is even possible?  If so, could you give me a ABAP code sample for it please? 
    Thank you very much,
    Haritha

    if you create the variable as global and in your start routine, calculate and give it a value, you can use that value in all your individual routines.

  • Defining global Visual Attribute groups

    Hi,
    We are currently in the process of moving our forms application from Oracle 6i (client/server) to 10g Webforms (we do not use the designer). The application consists of close roundabout 400 windows.
    In the 6i version we declared some global Visual Attributes in a resource file via the Oracle Terminal program. Now that we moved the forms to 10g these visual attributes groups are missing and its making certain functionalities fail like for example highligting query mode.
    My question is how do we most easily incorporate the missing visual attributes into all the webforms ?
    Kind regards,
    Bo

    As the number of forms is quite large for manual processing, even if the solution already provided is adequate. You may use the Oracle Forms API to automate the task. Theres the ORCL Toolbox applications in top of that API that may help You.

  • SAP GRC 10.0 - Risk Analysis - Define global variant

    Hi Experts,
    We are implementing SAP GRC 10.0 and we have a question about variant management in Access Risk Analysis.
    When we saved a variant, it seems that this variant is user specific.
    Is it to possible to define this variant as default for all users?
    Thanks.
    Best regards,
    Nicolas RICHARD

    Hi,
    I think this is still user-specific, as it was in 5.X. I have checked the new GRC authorisation object parameters delivered within the roles and also tried to see if a Admin user was able to see all the variants created by the different users, but so far I have not found a solution.
    It may be worthwhile to raise this in "IdeaPlace", hoping it gets enough votes and SAP's attention for implementing in a future Support Pack delivery.

  • Define global error page on global-web.xml

    Dear fellows:
    We want to create a common 404 web error page for all our J2EE applications. We have added these error pages to the global-web.xml through the Visual Administrator:
      on several  system local folders such as:
    usrsap<SID><j2ee-instance>j2eecluster
    usrsap<SID><j2ee-instance>j2eecluster<server-inst>
    usrsap<SID><j2ee-instance>j2eecluster<server-inst>apps
    usrsap<SID><j2ee-instance>j2eecluster<server-inst>sap.com
    However, everytime we provoke the server error in order to retreive this Global Error Web Page, the system does not seem to find our custom error page, giving the following message:
    The request can’t be processed.
    Details: Requested resource ( /testerrorpage.html ) not found.
    We have discovered that the application was not trying to look up for our web Error page, but for another one located inside the application. However, we don't want to add a specific application web page but a global one common for all of them.
    Since there is not any common folder, such as global/root folder, we don’t know where the custom error page should be placed. Do we need to do something else?
    We are currently using WAS: 6.40 SP 11 PatchLevel 89291.313.
    Does anyone know how to configure this global error page? It is possible to do it?
    Thank you
    Gonzalo
    Message was edited by: Gonzalo Pérez-Prim

    Hello,
    Yes, Uvaylo is right, the only way to edit the content of the global-web.xml is through the visual administrator --> Configuration Adapter.
    I have the same problem as Gonzalo, I have modified the global-web.xml and added custom errors pages for each HTTP error and exceptions. The big deal is when I try to specify in the <b>location</b> field of <b>error-page</b> item: I dont know where I should place my custom error page. I have tried the same paths as Gonzalo did with the same result, when the error event is raised the error page is not found. In the log appears the following entry:
    Processing an http request by the error page [/testerrorpage.html] finished with errors.
    Probably the exception [com.sap.engine.services.servlets_jsp.server.exceptions.ServletNotFoundException:
    Requested resource ( /custom_error.html ) not found.]
    thrown by the requested servlet [/testerrorpage.html] cannot be processed.
    The error is: com.sap.engine.services.servlets_jsp.server.exc
    Please help! Where can I place my custom error pages, to make them available for all the applications of the server?
    Thanks in advance for your help!

  • Setting up a global forward

    Please let me know whether it is possible to set up a global application such that any request coming into the server will hit the global war before it hits any other deployed application. The deployed applications need not be aware of the global application.

    I've thought about quicksilver, but i understand that's it's used to do much more than just that. And, I don't really want to deal with all of quicksilver. Now that might change, but I think I want to stay away from it for now.
    However, butler looks good. I'll play around with it.
    Also, the other application "Fast Scripts" looks decent, but it's shareware and I personally would like to get an entire program free and then donate when I feel props are due. (Just my personal thing.)

  • JSP : Tiles Error �tag.getAsString� : component context is not defined

    JSP : Tiles Error �tag.getAsString� : component context is not defined
    I�m working with Struts 1.1 and Tiles, under Tomcat 5.0.16
    My application works fine using Struts 1.1 alone, however, when attempting to run the application in a �Tiles� environment, I get an error:

    javax.servlet.jsp.JspException: Error - tag.getAsString : component context is not defined. Check tag syntax

    I have �defined� this in my �tiles-defs.xml� file, and as far as I can tell, everything else is configured properly (I have looked over the included Struts document examples, and others on the web, and I seem to have everything configured identically).
    What am I missing???
    I have created a series of �mostly� empty JSP files, for simplicity sake.
    JSP FILES:
    -     header.jsp
    -     footer.jsp
    -     menu.jsp
    -     rootLayout.jsp
    -     user.jsp
    -     show_user.jsp
    -     error.jsp
    -     defaultContentPage.jsp
    All JSP files contain:
    <%@ taglib uri="/WEB-INF/lib/struts-tiles.tld" prefix="tiles" %>
    and

    <title>
    <tiles:getAsString name="title"/>
    </title>

    My �tiles-defs.xml�: =================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <!-- ================ RootLayout ======================= -->
    <definition name=".root.layout" path="/jsp/rootLayout.jsp" >
    <put name="title" value="Default title"/>
    <put name="header" value="/jsp/header.jsp"/>
    <put name="menu" value="/jsp/menu.jsp"/>
    <put name="content" value="/jsp/defaultContentPage.jsp"/>
    <put name="footer" value="/jsp/footer.jsp"/>
    </definition>
    <!-- ================ Extentions ======================= -->
    <!-- User -->
    <definition name=".view.user" extends=".root.layout">
    <put name="title" value="Welcome to the User Form."/>
    <put name="content" value="/jsp/user.jsp"/>
    </definition >
    <!-- Save -->
    <definition name=".view.save" extends=".root.layout">
    <put name="title" value="Welcome to the Show User Form."/>
    <put name="content" value="/jsp/show_user.jsp"/>
    </definition >
    <!-- Error -->
    <definition name=".view.error" extends=".root.layout">
    <put name="title" value="Error Message."/>
    <put name="content" value="/jsp/error.jsp"/>
    </definition >
    </tiles-definitions>
    My �struts-config.xml�: ==============================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
    <!-- ========== FormBeans =================================== -->
    <form-beans>
    <form-bean name="userForm" type="biz.seamrog.strutstest.model.state.UserForm"/>
    </form-beans>
    <!-- ========== Action Mapping Definitions=================== -->
    <action-mappings>
    <!-- Action using normal forward syntax...
    <action path="/user"
    forward="/jsp/user.jsp">
    </action>
    -->
    <!-- Action using a "Tiles" forward syntax...
    The "forward" path mappings are defined in a file named
    "../WEB-INF/tiles-defs.xml
    -->
    <action path="/user"
    forward=".view.user">
    </action>
    <!-- Action using normal forward syntax...
    <action path="/save"
    type="biz.seamrog.strutstest.model.logic.SaveAction"
    name="userForm" scope="request"
    input="/jsp/user.jsp">
    <forward name="success" path="/jsp/show_user.jsp"/>
    <forward name="failure" path="/jsp/error.jsp"/>
    </action>
    -->
    <!-- Tiles syntax -->
    <action path="/save"
    type="biz.seamrog.strutstest.model.logic.SaveAction"
    name="userForm" scope="request"
    input="/jsp/user.jsp">
    <forward name="success" path=".view.show_user"/>
    <forward name="failure" path=".view.error"/>
    </action>
    </action-mappings>
    <!-- ============== Global Forwards ======================== -->
    <global-forwards>
    <!-- NOTE: paths with "." syntax are Tiles defined paths,
    all other paths follow conventional "/path/to/file.jsp syntax
    -->
    <forward name="user" path=".view.user"/>
    <forward name="show_user" path=".view.show_user"/>
    <forward name="error" path=".view.error"/>
    <forward name="cssBase" path="/stylesheets/common.css"/>
    </global-forwards>
    <!-- ============= Plug-ins =============== -->
    <!-- Tiles Plug-in -->
    <plug-in className="org.apache.struts.tiles.TilesPlugin" >
    <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml"/>
    <set-property property="definitions-parser-validate" value="true" />
    <set-property property="moduleAware" value="true" />
    </plug-in>
    </struts-config>
    My �web.xml�: =====================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    <web-app>
    <servlet>
    <!--
    MyController extends org.apache.struts.action.ActionServlet
    NOTE: The servlet could also be specified specifying the
    default Struts ActonServlet...
    <servlet-name>controller</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    ...I have chosen to extend here just for practice sake.
    -->
    <!--
    <servlet-name>MyController</servlet-name>
    <servlet-class>biz.seamrog.strutstest.controller.MyController</servlet-class>
    -->
    <servlet-name>MyController</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <!--
    Point to Struts configuration file(s)
    -->
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <!-- Tiles config -->
    <init-param>
    <param-name>definitions-config</param-name>
    <param-value>/WEB-INF/tiles-defs.xml</param-value>
    </init-param>
    <!-- This is the added Application parameter: -->
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResource</param-value>
    </init-param>
    <!-- end -->
    <load-on-startup>5</load-on-startup>
    </servlet>
    <!--
    All incoming requests that end in .do, send to MyController.
    -->
    <servlet-mapping>
    <servlet-name>MyController</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--
    Send initial requests to the login page for this application
    -->
    <welcome-file-list>
    <welcome-file>/jsp/user.jsp</welcome-file>
    </welcome-file-list>
    <!--
    Make all of the necessary related Struts JSP custom tag libraries
    available and define where to find them.
    -->
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/lib/struts-tiles.tld</taglib-uri>
    <taglib-location>/WEB-INF/lib/struts-tiles.tld</taglib-location>
    </taglib>
    </web-app>
    My �rootLayout.jsp�: ================================================
    <%@page contentType="text/html"%>
    <%@ taglib uri="/WEB-INF/lib/struts-tiles.tld" prefix="tiles" %>
    <html>
    <header>
    <title>
    <tiles:getAsString name="title" />
    </title>
    <body>
    <tiles:get name="header"/>
    <tiles:get name="menu"/> <tiles:get name="content"/>
    <tiles:get name="footer"/>
    </body>
    </html>

    I found an entry in the Mail Archive for Struts. I got it working. My working code is below. You need to in the base JSP import the header and put the 'title' out to it.
    tiles:def file:
    <!DOCTYPE tiles-definitions PUBLIC
    "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
    <tiles-definitions>
    <definition name=".petstore.Base" path="/common/petstorecommon.jsp">
    <put name="title" value ="${title}"/>
    <put name="header" value="/common/header.jsp"/>
    <put name="message" value="/common/message.jsp"/>
    <put name="content" value="${content}"/>
    <put name="navbar" value="/common/navbar.jsp"/>
    </definition>
    <definition name="petstore.Login" extends=".petstore.Base" >
    <put name="title" value="Login Page" />
    <put name="content" value="/Logon.jsp"/>
    <put name="test1" value="test1value"/>
    </definition>
    base tile def:
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <html:html>
    <head>
    <html:base/>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>pet store common (jsp)</title>
    </head>
    <body>
    <tiles:insert attribute="header">
    <%-- both of these attributes are accessible from header.jsp It works!!! --%>
    <tiles:put name="title" beanName="title" beanScope="tile" />
    <tiles:put name="test1" beanName="test1" beanScope="tile" />
    </tiles:insert>
    <%-- <tiles:get name="header" /> --%>
    <tiles:get name="message" />
    <tiles:get name="content" />
    <tiles:get name="navbar" />
    </body>
    </html:html>
    Getting access to the title value in the header.jsp file:
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    <%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
    <html>
    <head>
    <tiles:getAsString name="title" />
    <tiles:getAsString name="test1" />
    </head>
    <body>
    </body>
    </html>

  • Scope of Forward name

    Hi,
    When working on a JSP file in 8.1 Workshop,
    you can create a new JSP file, and then
    you can generate an action for the page.
    By default the action contains a Forword which is named "success". For example:
    * @jpf:action
    * @jpf:forward name="success" path="newPage1.jsp"
    Now if you generate multiple actions without changing the Forward name.
    What will happen?
    What is the rule of the scope of the Forward name?
    If @jpf:forward appear right after an @jpf:action, is it visable to that Action
    only?
    Thanks!
    Hai
    * @jpf:action
    * @jpf:forward name="success" path="newPage1.jsp"
    protected Forward show_newPage1()
              return new Forward( "success" );
    * @jpf:action
    * @jpf:forward name="success" path="newPage2.jsp"
    protected Forward show_newPage2()
              return new Forward( "success" );

    There are two scopes for forwards. If the annotation appears in the
    comments before an action, this is scoped to the action and won't be visible
    to any other action within the page flow. You can also add an forward
    definition to the top of the file (right before the class) and those
    forwards are visible to all actions in the page flow. These are global
    forwards within the page flow. If you use the same name to define a local
    forward as was used to name a global forward the local one "hides" the
    global one.
    "Hai Zhao" <[email protected]> wrote in message
    news:3f8ebc83$[email protected]..
    >
    Hi,
    When working on a JSP file in 8.1 Workshop,
    you can create a new JSP file, and then
    you can generate an action for the page.
    By default the action contains a Forword which is named "success". Forexample:
    * @jpf:action
    * @jpf:forward name="success" path="newPage1.jsp"
    Now if you generate multiple actions without changing the Forward name.
    What will happen?
    What is the rule of the scope of the Forward name?
    If @jpf:forward appear right after an @jpf:action, is it visable to thatAction
    only?
    Thanks!
    Hai
    * @jpf:action
    * @jpf:forward name="success" path="newPage1.jsp"
    protected Forward show_newPage1()
    return new Forward( "success" );
    * @jpf:action
    * @jpf:forward name="success" path="newPage2.jsp"
    protected Forward show_newPage2()
    return new Forward( "success" );

  • Forwarding DHCP requests

    Just looking for a confirmation that I haven't left anything out on my config for forwarding DHCP packets.
    My DHCP servers will be on 10.1.1.50/24 and 10.1.1.51/24. The users are on 10.1.2.0/24. If I'm to forward the packets from the user segment I have put the following statments on the interface they are connected to;
    interface vlan 101
    ip helper-address 10.1.1.50
    ip helper-address 10.1.1.51
    I have also put the following global statements:
    ip forward-protocol udp 67
    ip forward-protocol udp 68
    Is there anything I'm leaving out? This will be on a 6509 running 12.2 x IOS.

    FYI:
    Usage Guidelines
    Enabling a helper address or UDP flooding on an interface causes the Cisco IOS software to forward particular broadcast packets. You can use the ip forward-protocol command to specify exactly which types of broadcast packets you would like to have forwarded. A number of commonly forwarded applications are enabled by default. Enabling forwarding for some ports (for example, Routing Information Protocol (RIP) may be hazardous to your network.
    If you use the ip forward-protocol command, specifying only UDP without the port enables forwarding and flooding on the default ports.
    One common application that requires helper addresses is Dynamic Host Configuration Protocol (DHCP). DHCP is defined in RFC 1531. DHCP protocol information is carried inside of BOOTP packets. To enable BOOTP broadcast forwarding for a set of clients, configure a helper address on the router interface closest to the client. The helper address should specify the address of the DHCP server. If you have multiple servers, you can configure one helper address for each server. Because BOOTP packets are forwarded by default, DHCP information can now be forwarded by the software. The DHCP server now receives broadcasts from the DHCP clients.
    If an IP helper address is defined, UDP forwarding is enabled on default ports. If UDP flooding is configured, UDP flooding is enabled on the default ports.
    If a helper address is specified and UDP forwarding is enabled, broadcast packets destined to the following port numbers are forwarded by default:
    ?Trivial File Transfer Protocol (TFTP) (port 69)
    ?Domain Naming System (port 53)
    ?Time service (port 37)
    ?NetBIOS Name Server (port 137)
    ?NetBIOS Datagram Server (port 138)
    ?Boot Protocol (BOOTP) client and server datagrams (ports 67 and 68)
    ?TACACS service (port 49)
    ?IEN-116 Name Service (port 42)

Maybe you are looking for

  • Adding Windows folders to iTunes library - 2 copies of song

    Having some trouble figuring out how to import preexisting mp3's into the iTunes library. The mp3's are ripped from my own CD collection using Windows Media Player. For discussion let's say I have 50 mp3's in a folder I created called iPod1. I go to

  • Object Oriented ALV - Editable

    hi, Could anyone advice me please....as I'm trying to modify and save the values after displaying in ALV...but value which i'm modifying is not reflecting in ALV, it is displaying the old value....this problem is occuring only when I change the value

  • Info field with Rulluptime in WAD

    Hi In the WAD we use a info field element that shows the rolluptime of the data provider. The time is not the same as shown in the administartion of the info cube (differs by one hour). All our systems use the same clock which is correct. Could it be

  • APPLICATION CRASH PROBLEM

      Problem Event Name: APPCRASH   Application Name: NitroPDF.exe   Application Version: 7.2.0.12   Application Timestamp: 4f33396f   Fault Module Name: filechck.dll   Fault Module Version: 0.0.0.0   Fault Module Timestamp: 4e2ef87f   Exception Code: c

  • QRFC Outbound queue errors

    Hi All, I have some "qRFC Outbound queue errors" in the production system of R/3 and the target system is CRM. The status is "SYSFAIL " . Can anybody tell me how to solve them. Regards, Anindya