Sparkjava redirect while keeping the browser URL
问题 I have a sparkjava server app running, it serves a static HTML page using this line: staticFiles.location("/public"); If you go to http://example.com, you will see the HTML page. Now, I want to redirect users from other paths to my homepage, while keeping the browser URL. For example, if you visit http://example.com/message/123, you will still see the HTML page, while the browser URL stays http://example.com/message/123. So redirect.get() won't work here. 回答1: In order to serve the same file