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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T02:15:56+00:00 2026-06-15T02:15:56+00:00

I have two applications. One is a legacy webapp which is servlet-based. The other

  • 0

I have two applications. One is a legacy webapp which is servlet-based. The other is a spring-based webapp. The legacy app has a page that has multiple jquery tabs. I want one of the tabs to act as an iframe to the spring based application. I have done the following to achieve that:

  1. trigger an http post request (by openning and http url connection and writing to a printing to a writer) to the spring app, upon clicking on the tab name
  2. the request contains information about the user in the legacy system, encrypted using a generated key shared on both systems
  3. configure the spring mvc framework to intercept calls to the url and calls a method to process the request.

The request handling ideally should do the following:

  1. decrypt the request data using the shared key
  2. validate the request, license, etc
  3. if the requester is deemed to be authentic and user has a valid license (uses an api for the license validation) then set up an account for the user and authenticate them programmatically into spring security
  4. generate a random authentication key (to be used for future communications instead of the shared key)
  5. send the random key back to legacy system (encrypted using the shared key)
  6. direct the user to a specific page in the spring app

1,2 and 3 are complete, but I am struggling with 4 and 5. How can I send the second key to the legacy system and have the legacy system read it in using a buffered reader and then open the redirect page in the tab? Is it even possible in one response?

I used the @ResponseBody to return the key, but dont know how to send the redirect?
p.s. feel free to ask me questions if anything is not clear

  • 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-15T02:15:58+00:00Added an answer on June 15, 2026 at 2:15 am

    Solved it as follows:

    1. the tab page on legacy application is preloaded with an iframe but without source, along with it a form with hidden fields is placed but without values, the form has the iframe as its target, and its action points to spring app url
    2. when the tab page is opened, an ajax call is performed to a servlet on the legacy application
    3. The servlet makes a call to the spring app on `/spring-url.do` with params. The call is performed by opening an `HttpURLConnection`.
    4. `/spring-url.do` is intercepted by spring dispatcher and a method handles it as follows:
    5. if it’s the user’s first time then generate a new key for them and write it to the response (it does so by forwarding the request to another controller whose return type is `@ResponseBody String`)
    6. the response is read by the legacy application servlet and the key is persisted on the legacy app database for future communications
    7. the servlet encrypts the user data using the new key and returns it to the ajax call
    8. ajax success function reads the response and sets the value of the hidden form fields and programmatically submits the form
    9. spring intercepts the url again, but this time it’s an existing user, so it doesnot generate the new key, instead it validates the data and forwards request to a page on the spring app.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two applications, one updates a single table which has constant number of
I have two applications one a console application and the other an ASP.NET app.
I have two applications. One app has the Activity and another one is a
I have two separated applications, one written in Java and other in Erlang. Both
I run foo.com. I have two different applications that live in foo.com: one is
I have a project that generates applications for two targets. One of the targets
I have two applications, one is the main application and the other is a
I have two applications in my project 'test' the applications are one.mxml and two.mxml
i have two flex applications and i want to pass the data from one
I have two window form applications written in C, one holds a struct consisting

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.