简体   繁体   中英

Retrieve JSessionId in jsp

I am currently developing a web application which runs on a tomcat. This web application needs to get access to a specific jira instance. On this instance a jsp is running which I can call like that:

String jiraURL = https://jiraurl.org/theJSP.jsp?timestamp=&__name=&__username=&__page&__target=&_sign_=;

I got all the different information to build up the URL String. Then I load the page like so:

<html>
   <head>

       <meta http-equiv="refresh" content="0;url=<%jiraURL%>"
   </head>
</html>

Via the page and target attribute the site referres then back to my web application. When i run it in chrome for example I can see that there is a cookie saved called "JSESSIONID" for jiraurl.org . This is the value I want to get in my jsp file, since I need this id to authenticate with the JIRA Rest API. I am currently using username/password, but I would like to authenticate via cookies.

Also you have to know that I have no access to change the theJSP.jsp .

So: Is there anyway for me to retrieve the JSESSIONID from the other site which gets created when I run my HTTP-request ?

我认为您可以使用JIRA REST API方法/ rest / auth / 1 / session: https//docs.atlassian.com/jira/REST/latest/#d2e3737来验证用户并获取JSESSIONID。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM