Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

wanted to store object across requests and sessions. Is there an equivalent to servletcontext in AEM?

Avatar

Avatar
Validate 1
Level 2
adobecq-venkat
Level 2

Likes

3 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
adobecq-venkat
Level 2

Likes

3 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile
adobecq-venkat
Level 2

12-03-2020

I tried to use servletcontext to store global data which can be used across components /requests/sessions.

The data is getting lost when used inside servlet, but when I used the Jspcontext in JSP, it worked.

I am looking for any API to hold the data as long as the instance is up.

I wanted to read data from JCR and made available to all the components so they dont have to read again.

 

Thanks for your help.

venkat

Replies

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,077 likes

Total Posts

3,112 posts

Correct Reply

1,060 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,077 likes

Total Posts

3,112 posts

Correct Reply

1,060 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

13-03-2020

So you want to store data in the HTTP session of that user?

Avatar

Avatar
Validate 1
Level 2
adobecq-venkat
Level 2

Likes

3 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
adobecq-venkat
Level 2

Likes

3 likes

Total Posts

28 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 3
Boost 1
View profile
adobecq-venkat
Level 2

13-03-2020

I wanted to read the data from JCR and make it available to all the components and Servlets so they dont have to read again.

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,077 likes

Total Posts

3,112 posts

Correct Reply

1,060 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,077 likes

Total Posts

3,112 posts

Correct Reply

1,060 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

31-03-2020

you can use the request attributes to make it work, in that way it's not tied to JSPs.