Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3785458
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T11:31:54+00:00 2026-05-19T11:31:54+00:00

How many values available for scope attribute in action element of struts-config.xml file other

  • 0

How many values available for “scope” attribute in “action” element of
struts-config.xml file other than “request” and “session”?

<action name="loginform" path="/bkplogin" scope="?" type="org.springframework.web.struts.DelegatingActionProxy">
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T11:31:55+00:00Added an answer on May 19, 2026 at 11:31 am

    There are only two possible values for the scope attribute: request and session as stated in the struts-config’s DTD:

    <!-- 
    The name of a JSP bean scope within which such a form bean may be accessed.
    -->
    <!ENTITY % RequestScope "(request|session)">
    ...
    ...
    <!ATTLIST action   scope    %RequestScope;  #IMPLIED>
    

    See the DTD here:
    http://struts.apache.org/dtds/struts-config_1_3.dtd

    or a more human readable documentation of the DTD here:
    http://struts.apache.org/1.x/struts-core/dtddoc/struts-config_1_3.dtd#action

    What about the “Application” and “page” ?

    Well, the scope of an object across JSP pages can be:

    • page – an object can be accessed only from within the same JSP page it was created in;
    • request – objects created using the request scope can be accessed from any pages that serves that request;
    • session – an object is accessible from pages that belong to the same session (spans across multiple requests of the same client, with state maintained in the session, each client with his own session);
    • application – objects from this scope can be accessed from any pages in the application (all users share the same objects in application scope, one object to all users).

    Now, the scope in struts-config refers to where to create/find ActionForm objects. An ActionForm represents the server object representation of a client HTML form.

    It does not make any sense to have the form with application scope because it will be one form for everybody which which I can’t even think at what that will be useful. So no application value for that field.

    Now imagine you have page scope. How will that work? Struts does a RequestDispatcher.forward/redirect to go to the JSP files, how is it going to save the ActionForm in the page scope of the page that still does not have a page scope since it does not yet have control?! Is just like sending values to a method but instead of sending method arguments you are trying to directly create local variables in the code of the method from outside the method.

    So there are only two values that make sense: request and session. If you want something extra you have to manage it yourself.

    Struts is a generic framework, it does not cover every imaginable or unimaginable case, it covers most of normal use case scenarios for which request and session is all you will ever need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does any Common Lisp (builtin) function return more than 2 values? I know many
I have a need to display many numerical values in columns. These values need
Many times I have seen Visual Studio solutions which have multiple projects that share
Many times we find ourselves working on a problem, only to figure out the
Many frameworks seek to abstract away from HTML (custom tags, JSFs component system) in
Many applications have grids that display data from a database table one page at
Many people use Mock Objects when they are writing unit tests. What is a
Many beginning programmers write code like this: sub copy_file ($$) { my $from =
Many of us have used Perfmon tool to do performance analysis. Especially with .Net
Many websites, including this one, add what are apparently called slugs - descriptive but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.