eclipse-ee4j / eclipse-ee4j/jersey

Jersey returning 404 on first call when working with react

Open
#3,774 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
730
Forks
382
PR merge metrics
No merged PRs in 30d

Description

I am using jersey backend with react js as the frontend. Since all 404s are redirected to index.html in react, so I added a errorPageErrorHandler for 404 as index.html. Though this solved the problem of page not found, but the status code returned is still 404. Is there any way that I could send 200 with this. Or a way so that I could redirect all non api calls to index.html.

Thanks for your help

Contributor guide

Open the contributing guide

Research direction

Start by reading Jersey's errorPageErrorHandler and 404 handling, then compare that behavior with React's index.html routing requirements. Determine whether non-API requests can be routed to index.html with a 200 response, and identify the configuration or documentation change needed to make the supported behavior clear.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, react
Domain
backend, frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.