Alibabacloud.com offers a wide variety of articles about simple java web framework, easily find your simple java web framework information here online.
JFinal 1.1.0 has been optimized, some small practical functions have been added, and some additional functions have been removed. Other changes are as follows:
1: Add com. jfinal. plugin. activerecord. tx. TxByRegex and TxByActionKeys. They support regular declarative transactions and actionKeys declarative transactions respectively.
2: Improve ActionReporter, narrow the link range, and Interceptor output formatting to improve the development experience.
3: C3p0Plugin. start () Change return fal
easier for us to use the three broad frameworks. Of course, the framework combination of a large program also relies on the spring of the IOC, in addition, the transaction we will certainly use. AOP These more advanced things, depends on the need, such as what log requirements, interception requirements, with AOP can be achieved better.3 Hibernate:hibernate is also famous in the Java world, and is basicall
write, to generate a complete module, with pages, SQL scripts, processing classes, service and other complete modules2 Ali database Connection pool Druid, security permissions Framework Shiro, cache framework Ehcache, Tool class interface Redis3 Integrated WX Interface Development WX custom menu (support multiple public numbers)4 Image crawler Technology Enter the URL of the picture, can crawl and download
For a simple simulation of the Spring framework:
a). reading XML configuration file
B.) Using Java reflection mechanism to get objects
Step one: Create an interface, define a method to get the object Getbean ():
Public interface Beanfactory {
public Object Getbean (String name);
}
Step Two: Create a class Xmlcontext to implement the Getbean method in th
Struts2+ibatis+json realization of Fast Java web2.0 program development
With Struts2 basically finished a company project, the program is always summed up after the development, the previous scheme is STRUTS2+SPRING+DWR these three kinds of framework of the combination of the database operation of the spring in the JdbcTemplate, Always to hibernate do not like, previously in Hibernate 2 when using it total
Use Java to write a Web server and frame with your bare hands Write a Web server and framework with your bare hands in Java This chapter first the function of the web framework to say s
Portal-Basic Java Web Application Development Framework (portal-basic for short) is a fully functional, high-performance full-stack web application development framework, built-in stable and efficient MVC infrastructure and Dao framework
"); One byte[] head =sb.tostring (). GetBytes (CHARSET); AFinalData = bytebuffer.allocate (head.length + content.length + 2); - Finaldata.put (head); - finaldata.put (content); theFinaldata.put ((byte) ' \ R '); -Finaldata.put ((byte) ' \ n '); -Finaldata.flip ();//Remember, flip is needed here . - } + returnFinalData; -}Here a finaldata is used to save the final result, which cannot be modified once the call is made, and prevents the same content from being sent when repeated re
requires a plug-in to the intrusion detection program into the Java Web application, so that every time users visit the Java Web, the first to the intrusion detection program to report to the rules to release.
There are roughly two types of Java
Approximate idea
Inherit HttpServlet, implement Dispatcherservlet, intercept all requests;
Dispatchservlet rewrite the init () method, which is responsible for initializing the framework;
Rewrite the service () method to get HttpServletRequest, httpservletresponse;
Through the HttpServletRequest, the HttpServletResponse, obtains the request path, the request parameter, carries on the request processing, and does the forwarding or redirec
member variable values *@paramobj Bean instance *@paramfield member Variable *@paramassignment of the value member variable*/ Private Static voidSetField (Object obj, Field field, Object value) {Try { //A value of TRUE indicates that the reflected object should cancel the Java language access check when it is used. //a value of false indicates that the reflected object should implement a Java
The structs can be automatically encapsulated for parameters, which is also simple.One, the action parameter is automatically encapsulated:1, you can declare properties of public, accept parameters directly in the action class.2, the attribute is also private, if it is private, you need to provide a setter method, you can also provide getter method as needed.3,struts can automatically convert types, typically we pass string-type arguments, and struts can be converted to the default declared vari
and a single file upload configuration is the same, just accept the parameter in the action, accept the array, is no longer a single file.One, the action implementation:public class Mutablefilesupload extends Actionsupport {private static final long Serialversionuid = 1l;public file[] Uploa Dobjects;public string[] uploadobjectsfilename;public string[] uploadobjectscontenttype;public String moreInfo; Public String upload () {System.out.println (moreinfo);//1. Get Servletcontextservletcontext Ser
1, a reference to the configuration fileThere can be more than one configuration file in struts, and a struts profile can be set up in each module's package.The main configuration file, placed in the "src" folder, can introduce other profiles, introduced in the way:Where the configuration path of the file property can be right-click, copy qualified name2, configuration of common constantsSpecify the request encoding formatSpecifies the URL suffix name of the accessSome other 3, package conf
= "java"%> 2 3 4 5 6 7 8 9 Configure TomcatFirst, Tomcat is configured, and the following is a well-configured interfaceRun the project, Access http://localhost:8080/home/What is needed here is to configure Tomcat, set application context, such as application context as "/home", then the root address of the project's server is:http://localhost:8080/home/, then to display the Home.jsp interface should be: Http://localhost:8080/home/h
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.