Convert JSP webview page to React Native format

minsanity :

Hello I'm a super newbie at React Native.

Currently, I have a tomcat server running which consists of java spring + JSP files. Right now, I call "~/login.do" url to load my initial login page as a webview in my ios project.

But I want to make all the web pages native with React Native. What's the proper way to do this?

Originally, a bunch of RequestMappers in the web project return JSP names. Should I make the mappers somehow return as JSON and newly render a native page based on the JSON? or should I just use the existing mappers and get returned JSP pages then somehow wrap them as react native components?

Could you please explain how? Do I have to use RESTful API?

Sorry if my question is vague. I will update it once I figure out some better ideas.

Wang Kenneth :

jsp page can not render in webview, actually it's the web server(tomcat) rendering the JSP page, transform to html and response to webview or web browser.

So, generally way to adapt multi client is that different url mappers:

/page/XXX: return rendered html to web browser, 
/api/XXX:  return JSON(just data) to ios/android render a native page based on the JSON

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=165726&siteId=1