An open API service indexing awesome lists of open source software.

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

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).