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

  • SEARCH
  • Home
  • 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 8077729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:33:39+00:00 2026-06-05T15:33:39+00:00

In my JSP page, a tag <jsp:include page=servletName /> has been added. Here servletName

  • 0

In my JSP page, a tag <jsp:include page="servletName" /> has been added. Here servletName is is HttpServlet Class and that class add some attributes to Request object. Then, again in the jsp page, the values set to the request object are retrieved (this thing has been done to reduce the line of codes in the jsp page).

I want to do this in Struts 2 application.

I want to call an action class (something like <jsp:include /> in a normal jsp application) and then that class set some values to Request object(Value Stack) . Then those values should be retrieved in the jsp class using Struts Tags.

How Can I do this?

Also, how can I send a request parameter bound to the jsp page and send it to the action class?
here shows something what I want:

<s:action name="Login" flush="true" executeResult="true" namespace="/secure"/>   

But it is not clear for me how to write execute() and struts.xml and the attributes used. any one can clear it for me please?

  • 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-06-05T15:33:41+00:00Added an answer on June 5, 2026 at 3:33 pm

    Use the <s:action> tag.

    I question the need for this, however; if this is something done frequently enough to warrant this, consider using a base action class that implements Preparable, and create an app-specific sub-class means of adding behavior for actions that require their own prepare.

    IMO relying on the view to add objects it needs is a violation of concern separation.

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

Sidebar

Related Questions

On my JSP page, I defined some javascript with a variable that get value
I'm facing confusion with how JSP include tag works. What's happening is that the
I am passing param value in include tag in jsp page like below <s:include
Greetings, here is the problem. I have a page called entList.jsp , that works
Is there a way to debug <jsp:include> tag? I have a container.jsp that jsp:include
How can I add jspf file to jsp page via custom tag? In the
how to use variable in page attribute of jsp include tag ? <jsp:include page=/adminadvertisement?type=c80&action=showall
I need to define a jsp tag which named include. It should be used
I have a .jsp page that begins with <%@ taglib uri=http://java.sun.com/jstl/core prefix=c %> <%@
i have several CSS styles i would need to include in the JSP page,

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.