https://github.com/daileyet/openlibs.easywebframework
The lib of java web MVC framework
https://github.com/daileyet/openlibs.easywebframework
easy-mvc java web web-framework
Last synced: 5 months ago
JSON representation
The lib of java web MVC framework
- Host: GitHub
- URL: https://github.com/daileyet/openlibs.easywebframework
- Owner: daileyet
- License: apache-2.0
- Created: 2015-08-04T06:44:06.000Z (almost 11 years ago)
- Default Branch: mvn-master
- Last Pushed: 2022-05-20T20:52:47.000Z (about 4 years ago)
- Last Synced: 2025-07-19T09:42:34.897Z (11 months ago)
- Topics: easy-mvc, java, web, web-framework
- Language: Java
- Homepage:
- Size: 4.36 MB
- Stars: 5
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Easyweb: MVC framework :camel::boom:
Easyweb is a java web MVC framework.It is free under Apache 2 license. Easyweb is simple, pure and easy to understand. You can use this framework to do:
* Bind web request to a java method in controller class
* Use POJO as web Controller
* Support multi-type response of java method as web View
* Support annotation configuration
* Add security controller flexibly and quickly
* Enable/disable simple web monitor to view Controllers and Filters
## Getting start
#### Add dependency to pom.xml
```xml
com.openthinks
openlibs.easyweb
1.2.1
```
#### Configure project by annotationed POJO class
```java
/*
* File name:com.openthinks.easywebexample.EasyWebConfigure
*/
@EasyConfigure
@ScanPackages({ "com.openthinks.easywebexample" })
@RequestSuffixs(".do,.htm")
public class EasyWebConfigure{}
```
#### Enable easyweb in web.xml
```xml
...
easyweb
com.openthinks.easyweb.EasyWebDispatcher
0
easyweb
*.do
easyweb
*.htm
com.openthinks.easyweb.context.WebContextLoadListener
configureClassName
com.openthinks.easywebexample.EasyWebConfigure
...
```
#### Create Controller with POJO class
```java
@Controller
public class HelloController {
@Mapping("/index")
public String index() {
return "hello.jsp";
}
}
```
### Deploy app to web container and run
After deploy your web application to Servlet container(Tomcat/Resin)
Access by URL:
http://localhost:8080/easywebexample/index.htm
or
http://localhost:8080/easywebexample/index.do
to get page which render by **hello.jsp**
*easywebexample* is app web root context.
### Sample
[easywebexample](https://github.com/daileyet/easywebexample)
## Documentation
You can continue with [quick start](https://openthinks.gitbook.io/docs/easyweb/chapter1) or refer to the [documentation](https://openthinks.gitbook.io/docs/easyweb).