Transferring data to a web address

Utilizing a jax-rs endpoint, I am invoking a jsp page in the following manner.

 public String logout(@Context HttpServletRequest request,@DefaultValue("Empty Details") @QueryParam("logoutNotification") String logoutNotification,
                     @QueryParam("id_token_hint") String id_token_hint) {
     Response response=    Response.status(200).entity(logoutNotification).build();
    if(response.getEntity().toString().equals("True")){
       return "<html><head><script>\n" +
              "window.open(\"https://localhost:9443/carbon/authenticationendpoint/test.jsp\");</script></head><body></body></html>";
    }
   else {
       return null;
    }

I am faced with the need to transmit certain parameters to the 'https://localhost:9443/carbon/authenticationendpoint/test.jsp' from this endpoint. How can this be accomplished? Is it feasible to pass them as query parameters from the endpoint? Any guidance on the matter would be greatly appreciated. Thank you.

Answer №1

My understanding of RESTful webservices is limited, but I do know that if you need to pass parameters in a URL, it can be accomplished like this:

<url URL>?par1=val1&par2=val2
. This method should work if your code opens a new window.

I believe this information could be beneficial for you.

For example: https://localhost:9443/carbon/authenticationendpoint/test.jsp?name=Joe&age=24

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The request to http://localhost:7500/api/users/posts has resulted in a 400 error response indicating a Bad

Currently, I am in the process of saving data to a MongoDB database using Axios. I have set up a form for users to fill out and upon clicking the save button, the data should be stored. This is how my code looks: import auction1 from '../../Imag ...

Choosing an option from the select box in the controller

I've spent hours searching and testing numerous Google search queries, but all I can find are tutorials on setting a default option in a select box. On my page, there's an admin interface where users can be selected from a list. Angular JS then ...

Wrapbootstrap offers dynamic design options for Java-based web applications

I recently obtained a bootstrap theme from the website wrapbootstrap to use in my Java web application. However, I am unsure of where to begin with it. Despite having already added the bootstrap css to my application, I now wish to remove it and replace it ...

Problem with accessing state in React 16

In my code snippet below, I am encountering an issue. When the button is clicked and 'streaming' appears on the UI, the console.log within the 'process' function displays false. Can you help me identify what might be causing this discre ...

Is there a better way to remove the hidden attribute from p2 since calling removeAttribute() doesn't appear to work?

Is there a way to successfully change the attribute of an object using removeAttribute to remove its hidden status? I've been attempting this but haven't had any luck so far. It seems like my code isn't having any effect. Could I be making ...

Accessing the return value from an ASP.NET web service in JavaScript outside of the callback function

I am facing an issue with my ASP.NET web service that returns a simple string value. I have successfully called this web service using JavaScript and the script manager. However, I am in need of accessing the return value directly from where I made the cal ...

Is it possible to hide the iOS Safari navbar by simply scrolling the body?

One of the challenges I am facing with my website layout is the grid structure that consists of a fixed header, scrollable content, and a fixed footer. The issue arises when using iOS Safari because the bottom navbar and URL bar never go away even when scr ...

Each time a page loads, the react useContext feature is causing the web socket connection to reset

I have integrated websockets into various parts of my nextJS application and need to make sure they are accessible everywhere without resetting the socket connection. Whenever the connection is reset, it loses all the rooms it was connected to, causing iss ...

Button halts the playback of numerous audio tracks simultaneously

I'm in the process of creating a Launchpad, where each row consists of 8 buttons/audio tracks and a stop button. My goal is for each stop button to halt all audio playing on that specific row when pressed—for instance, pressing Stop Button 1 would c ...

Incorporating JavaScript and CSS files into a content page of a master page in ASP.NET: Steps to follow

I am facing an issue with adding javascript files and css to a content page of a master page in asp.net. I attempted to include a datetime picker on my ContentPage, but it only works on the masterpage. When I try to add the same code to my contentpage, i ...

Recursive Parsing of JSON Objects in Java

I have a JSON containing a list of Objects where any item in the list may have null or an object as a value for a certain key. I am seeking a more efficient method to parse the JSON and obtain my desired output. The structure of the data is as follows - [ ...

Order of Loading WebResources in ScriptControl

As I work on integrating a new control into a project that already contains ASP.Net controls, I am faced with the challenge of managing multiple .Net classes and JavaScript files. Each control consists of a .NET class (inheriting ScriptControl) along with ...

Is there a way to circumvent the eg header along with its contents and HTML code using JavaScript?

I have a script in JavaScript that is designed to replace the content of data-src attribute within each img tag with src. However, I am facing an issue where this script interferes with the functionality of a slider located in the header section. The sli ...

byte sequence displays as binary data (angular + express)

I've been working on pulling files from a back-end Node.js / Express server and displaying them in an Angular front-end. Despite trying different methods, I keep facing the same issue - the data displayed at the front-end appears as a bytestring. Even ...

Using React to showcase a base64 image representation

I'm struggling to show an image that has been sent from my Node/Express server to my React application. I've tried looking at solutions on other platforms, but so far nothing has worked for me. Let me outline the steps I have taken: The image is ...

Issue with Hadoop showing UnsupportedClassVersionError message despite no visible version changes

My attempt to execute a hadoop job on the university cluster has unfortunately encountered an error: hadoop jar target/SpamClassifier-1.0-SNAPSHOT-jar-with-dependencies.jar <args> Exception in thread "main" java.lang.UnsupportedClassVersionError: in ...

Loading articles seamlessly in Yii using Ajax

I am currently working on a project where I need to display articles from databases, but every time an article is viewed, the whole page reloads. I would like to load articles without having to reload the page, and I believe this can be achieved using Ajax ...

Developer tools driven event sparking alterations in value

When using the developer tools to change an input value, are there any events that get triggered? I attempted to use change(), blur(), and focus() but found that these events do not fire when changing values through the developer tools. ...

Efficient segmentation of text using CSS and JavaScript

Currently, I'm involved in a project that allows users to create their own timelines with events. However, there seems to be an issue with the event titles. Users are able to create events with extremely long titles, such as: `1231231231231231231231 ...

Can JavaScript/JQuery be used to dynamically alter the color of a dropdown menu or change the color of list items when a radio option is selected?

Is it possible to enhance the functionality of my code that currently selects a radio option and automatically changes the dropdown box? Can I also make the selected dropdown item change color, such as blue for 'Work', green for 'Grocery&apo ...