Easyweb: MVC framework
Easyweb — это Java-фреймворк для веб-разработки на основе модели MVC. Он распространяется бесплатно по лицензии Apache 2. Easyweb прост, понятен и лёгок в освоении. С его помощью можно:
<dependency>
<groupId>com.openthinks</groupId>
<artifactId>openlibs.easyweb</artifactId>
<version>1.2.1</version>
</dependency>
/*
* File name:com.openthinks.easywebexample.EasyWebConfigure
*/
@EasyConfigure
@ScanPackages({ "com.openthinks.easywebexample" })
@RequestSuffixs(".do,.htm")
public class EasyWebConfigure{}
...
<servlet>
<servlet-name>easyweb</servlet-name>
<servlet-class>com.openthinks.easyweb.EasyWebDispatcher</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>easyweb</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>easyweb</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>
<listener>
<listener-class>com.openthinks.easyweb.context.WebContextLoadListener</listener-class>
</listener>
<context-param>
<param-name>configureClassName</param-name>
<param-value>com.openthinks.easywebexample.EasyWebConfigure</param-value>
</context-param>
...
@Controller
public class HelloController {
@Mapping("/index")
public String index() {
return "hello.jsp";
}
}
После развертывания вашего веб-приложения в контейнере сервлетов (Tomcat/Resin)
Доступ по URL: http://localhost:8080/easywebexample/index.htm или http://localhost:8080/easywebexample/index.do чтобы получить страницу, которая отображается с помощью hello.jsp
easywebexample — это корневой контекст приложения.
Вы можете продолжить работу с быстрым стартом или обратиться к документации.
You can comment after Login
Inappropriate content may be displayed here and will not be shown on the page. You can check and modify it through the relevant editing function
If you confirm that the content does not involve inappropriate language/advertisement redirection/violence/vulgar pornography/infringement/piracy/false/insignificant or illegal content related to national laws and regulations, you can click submit to make an appeal, and we will handle it as soon as possible.
Comments ( 0 )