Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jenspapenhagen/react-include-jsp-example
example for react app included into existing JSP APP
https://github.com/jenspapenhagen/react-include-jsp-example
docker-compose jakarta jakarta-ee jakartaee jsp jstl react tomcat tomcat10
Last synced: 1 day ago
JSON representation
example for react app included into existing JSP APP
- Host: GitHub
- URL: https://github.com/jenspapenhagen/react-include-jsp-example
- Owner: jenspapenhagen
- Created: 2024-07-22T14:51:09.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-07-25T06:57:31.000Z (4 months ago)
- Last Synced: 2024-07-25T07:50:39.432Z (4 months ago)
- Topics: docker-compose, jakarta, jakarta-ee, jakartaee, jsp, jstl, react, tomcat, tomcat10
- Language: TypeScript
- Homepage:
- Size: 296 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Include React App into existing JSP App #
> [!WARNING]
> this is only an example ProjectWe use am simple [Apache Tomcat 10](https://tomcat.apache.org/) App,
inside a Docker Compose Setup
the folder "app" is mounted into the right postion of the Tomcat.
the web.xml is only for this example.> [!TIP]
> under "app/WEB-INF/lib" we need to install [JSTL](https://projects.eclipse.org/projects/ee4j.jstl) by download the [spec](https://mvnrepository.com/artifact/jakarta.servlet.jsp.jstl/jakarta.servlet.jsp.jstl-api/3.0.0)
an the [impl](https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl/3.0.1)## Buidling the React App with Vite ##
Overview: [Vite Guide](https://vitejs.dev/guide/) \
better use with TypeScriptthis example react app is under "react-app"
to build the react app we use npm. Other tools like yarn are fine, too.```shell
npm install
npm run build
```under "react-app\dist\" we will find an "index.html" and the linked CSS and JS file on the subfolder "assets" copy all this into the "existing" JSP App.
Copy the linking of the CSS and JS file into the needed jsp file.
Than copy the HTML Snipped:```HTML
```on the right place.
now we can start the tomcat 10.1.26
```shell
docker-compose up -d
```Now we can check the example JSP jakarta tomcat app with included react component with full hook support.