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 8003889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T16:46:15+00:00 2026-06-04T16:46:15+00:00

I have a back button and i want to implement its functionality in controller,

  • 0

I have a back button and i want to implement its functionality in controller, i don’t want to use window.history.back functionality.

When the user click on backbutton, how can i transfer the control to the controller. I don’t want to use form submission.

Steps that will be done are:

  1. User click on Back button, ( a javascript function is called with onClick event)
  2. javascript function pass control to the controller, in other words javascript calls
    a @RequestMapping method.
  3. controller use (return redirect:some page.jsp) for redirection.

How can i implement such scenario.

  • 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-04T16:46:17+00:00Added an answer on June 4, 2026 at 4:46 pm

    You can do something like below mentioned line. But according to me its not the clean way to do that. But it can’t be ignored as an option. Have a look at this line of code.

    <input type="button" value="Go Back" onclick="javascript:window.location.href='<%=request.getContextPath()%>/services'"/>
    

    You just need to replace the /services part in the code with the url mapping you would like to go back to.

    One another clean approach could be to pass this go back URL from the controller and then use the value in your jsp here.

    Hope this helps you.

    Cheers.

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

Sidebar

Related Questions

If I want to implement Ajax and have the back/forward button and also a
I want to implement the back button functionality so that upon clicking that the
I have a button, the label of which I want to change back and
I want to implement functionality like back and forward in my project same as
I have a scenario where my UINavigationController is missing the back button (left button)
Possible Duplicate: How to: Back button support “Ajax” I have a ASP.NET MVC implementation
I have a MVP application implemented. Back button is working fine. I'd like to
Back-end: I have a model (User) that has_many of another model (ContactPreference). Front-end: An
I'm trying to implement a navigation controller with some hierarchical views. I want to
I want to implement Facebook Connect in my android application. I have seen a

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.