Call a Servlet from a Model class

Avatar

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
View profile

Avatar
Level 2
karthikbhat3624
Level 2

Likes

0 likes

Total Posts

18 posts

Correct reply

0 solutions
View profile
karthikbhat3624
Level 2

17-09-2018

Hello,

I'm using AEM 6.4,

I want to call a servlet from a Model class,

What is the way to do that?

AEM - Questions

Replies

Avatar

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile

Avatar
Coach
MVP
Arun_Patidar
MVP

Likes

1,442 likes

Total Posts

3,318 posts

Correct reply

941 solutions
Top badges earned
Coach
Contributor 2
Ignite 10
Give Back 700
Boost 1000
View profile
Arun_Patidar
MVP

17-09-2018

Hi,

Why do you want to call servlet from Sling model, what is your requirement?

Other way around i.e. Sling Model Adaptation is possible Performing Sling Model Adaptation Using Request and Resource Objects

Avatar

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Feike_Visser1
Employee

Likes

247 likes

Total Posts

970 posts

Correct reply

221 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Feike_Visser1
Employee

17-09-2018

to me via the httpclient, you can fire http-calls.

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,409 likes

Total Posts

12,671 posts

Correct reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

17-09-2018