Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

AEM-React state refresh issue

Avatar

Level 2

Hi,

Can any one advise, how to go about and solve the below issue.

This is a AEM - React integration project.

The scenario for the issue is when we refresh the link(localhost:4503/testing/map) it gives 404 error as  its a state .

Is there any way to get this working 

4 Replies

Avatar

Level 9

Does it load correctly first time and fails on reloading same URL?. 

priyadarshinic9395328 wrote...

Hi,

Can any one advise, how to go about and solve the below issue.

This is a AEM - React integration project.

The scenario for the issue is when we refresh the link(localhost:4503/testing/map) it gives 404 error as  its a state .

Is there any way to get this working 

 

Yes it loads correctly the first time, but when we refresh as the state is lost it gives 404 error

Does this link MAP to any OSGI servlet?. Because it seems there is a conflict between sling default servlet & your servlet. 

Does below node structure exist in your repository?

localhot:4502/testing/map.

priyadarshinic9395328 wrote...

Yes it loads correctly the first time, but when we refresh as the state is lost it gives 404 error

 

Avatar

Level 2

Here "testing/map" is a state from React-js terminology . This is a Single page application .

when this state is reached;  from react-js, sling servlet is invoked to serve the request.