- 浏览: 285271 次
- 性别:
- 来自: 杭州
文章分类
最新评论
-
sjx19871109:
有一个疑问,博主在做循环的时候,for(int i=0;i&l ...
ArrayList:用add代替remove -
剑锋凛冽:
不错,看了很有帮助。但有个概念不是很清楚,锁投票是什么?
java中的lock和synchronized -
星期扒的幻想:
学习了,了解了
Solr增删改查 -
programming:
很蛋痛的webx 工程与jarsource编码不一直,相关 ...
Webx3 -
xjt927:
...
Solr增删改查
这两天利用空余时间学习了webx3.0,基于spring mvc开发的一款mvc;由于对webx2.0以及spring mvc没有进行过深入的研究,在学习webx3.0的时候,肯定会出现理解上的偏差甚至错误,希望大家积极提出,有问题才是进步的动力;以前很少写文章,文笔不好,还请大家见谅,:)!无废话,开始:
Web.xml,tomcat加载war包开始:
- <!-- 装载/WEB-INF/webx.xml, /WEB-INF/webx-*.xml -->
- <listener>
- <listener-class>com.alibaba.citrus.webx.context.WebxContextLoaderListener</listener-class>
- </listener>
<!-- 装载/WEB-INF/webx.xml, /WEB-INF/webx-*.xml --> <listener> <listener-class>com.alibaba.citrus.webx.context.WebxContextLoaderListener</listener-class> </listener>
其中WebxContextLoaderListener 信息如下:
- import org.springframework.web.context.ContextLoader;
- import org.springframework.web.context.ContextLoaderListener;
- public class WebxContextLoaderListener extends ContextLoaderListener {
- ……
import org.springframework.web.context.ContextLoader; import org.springframework.web.context.ContextLoaderListener; public class WebxContextLoaderListener extends ContextLoaderListener { ……
WebxContextLoaderListener继承了spring mvc的监听类:ContextLoaderListener;
可想而知,容器启动时,将调用: contextInitialized(ServletContextEvent event) 该方法,如下:
- public void contextInitialized(ServletContextEvent event) {
- //1.初始化加载类
- this.contextLoader = createContextLoader();
- //2.出示话web上下文
- this.contextLoader.initWebApplicationContext(event.getServletContext());
- }
public void contextInitialized(ServletContextEvent event) { //1.初始化加载类 this.contextLoader = createContextLoader(); //2.出示话web上下文 this.contextLoader.initWebApplicationContext(event.getServletContext()); }
由于WebxContextLoaderListener覆盖了createContextLoader()方法,
- @Override
- protected final ContextLoader createContextLoader() {
- return new WebxComponentsLoader() {
- @Override
- protected Class<?> getDefaultContextClass() {
- Class<?> defaultContextClass = WebxContextLoaderListener.this.getDefaultContextClass();
- if (defaultContextClass == null) {
- defaultContextClass = super.getDefaultContextClass();
- }
- return defaultContextClass;
- }
- };
- }
@Override protected final ContextLoader createContextLoader() { return new WebxComponentsLoader() { @Override protected Class<?> getDefaultContextClass() { Class<?> defaultContextClass = WebxContextLoaderListener.this.getDefaultContextClass(); if (defaultContextClass == null) { defaultContextClass = super.getDefaultContextClass(); } return defaultContextClass; } }; }
contextLoader已经是这个了:WebxComponentsLoader 重点关注这个类,
public class WebxComponentsLoader extends ContextLoader
将负责加载webx中的componet组件,还继承了spring mvc的加载类 ContextLoader,
所以initWebApplicationContext 就在子类WebxComponentsLoader中执行了:
- @Override
- public WebApplicationContext initWebApplicationContext(ServletContext servletContext) throws IllegalStateException,
- BeansException {
- this.servletContext = servletContext;
- init();
- //开始spring mvc加载…
- return super.initWebApplicationContext(servletContext);
- }
@Override public WebApplicationContext initWebApplicationContext(ServletContext servletContext) throws IllegalStateException, BeansException { this.servletContext = servletContext; init(); //开始spring mvc加载… return super.initWebApplicationContext(servletContext); }
经过自己的init后
super.initWebApplicationContext(servletContext);
又回到父类里面去了:
- public WebApplicationContext initWebApplicationContext(ServletContext servletContext)
- throws IllegalStateException, BeansException {
- //.....先忽略
- long startTime = System.currentTimeMillis();
- try {
- // Determine parent for root web application context, if any.
- //1.先找parent,一般是空的吧
- ApplicationContext parent = loadParentContext(servletContext);
- // Store context in local instance variable, to guarantee that
- // it is available on ServletContext shutdown.
- //2.创建
- this.context = createWebApplicationContext(servletContext, parent);
- //3.设为root
- servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this.context);
- currentContextPerThread.put(Thread.currentThread().getContextClassLoader(), this.context);
- //再忽略...
- return this.context;
- }
- catch (RuntimeException ex) {
- logger.error("Context initialization failed", ex);
- servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex);
- throw ex;
- }
- catch (Error err) {
- logger.error("Context initialization failed", err);
- servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, err);
- throw err;
- }
- }
public WebApplicationContext initWebApplicationContext(ServletContext servletContext) throws IllegalStateException, BeansException { //.....先忽略 long startTime = System.currentTimeMillis(); try { // Determine parent for root web application context, if any. //1.先找parent,一般是空的吧 ApplicationContext parent = loadParentContext(servletContext); // Store context in local instance variable, to guarantee that // it is available on ServletContext shutdown. //2.创建 this.context = createWebApplicationContext(servletContext, parent); //3.设为root servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, this.context); currentContextPerThread.put(Thread.currentThread().getContextClassLoader(), this.context); //再忽略... return this.context; } catch (RuntimeException ex) { logger.error("Context initialization failed", ex); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, ex); throw ex; } catch (Error err) { logger.error("Context initialization failed", err); servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, err); throw err; } }
createWebApplicationContext方法主要包括下面4步:
1.找到上下文类
Class contextClass = determineContextClass(servletContext);
定位上下文class,这个class可配置;这个方法被WebxContextLoaderListener覆盖,最后返回的class:
return WebxComponentsContext.class;
第二个重要的类出现:WebxComponentsContext
WebxComponentsContext
继承
WebxApplicationContext(webx重写)
继承
XmlWebApplicationContext(spring原生)
2.实例化上下文类
- ConfigurableWebApplicationContext wac = (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass);
- wac.setParent(parent);
- wac.setServletContext(servletContext);
- wac.setConfigLocation(servletContext.getInitParameter(CONFIG_LOCATION_PARAM));
ConfigurableWebApplicationContext wac = (ConfigurableWebApplicationContext) BeanUtils.instantiateClass(contextClass); wac.setParent(parent); wac.setServletContext(servletContext); wac.setConfigLocation(servletContext.getInitParameter(CONFIG_LOCATION_PARAM));
3.可以自定义操作上下文
customizeContext(servletContext, wac); //被子类覆盖
此方法也被WebxContextLoaderListener覆盖:
- protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext componentsContext) {
- this.componentsContext = componentsContext;
- if (componentsContext instanceof WebxComponentsContext) {
- // componentsContext就是上面实例化的上下文,铁定是WebxComponentsContext类
- ((WebxComponentsContext) componentsContext).setLoader(this);
- //为load webx组件配置文件而准备
- }
- }
protected void customizeContext(ServletContext servletContext, ConfigurableWebApplicationContext componentsContext) { this.componentsContext = componentsContext; if (componentsContext instanceof WebxComponentsContext) { // componentsContext就是上面实例化的上下文,铁定是WebxComponentsContext类 ((WebxComponentsContext) componentsContext).setLoader(this); //为load webx组件配置文件而准备 } }
4.初始化IOC容器
wac.refresh();
看到熟悉的refush方法了,ConfigurableWebApplicationContext是没有refush方法,AbstractApplicationContext这个类有refush方法:
- public void refresh() throws BeansException, IllegalStateException {
- synchronized (this.startupShutdownMonitor) {
- // Prepare this context for refreshing.
- prepareRefresh();
- // Tell the subclass to refresh the internal bean factory.
- ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();
- // Prepare the bean factory for use in this context.
- prepareBeanFactory(beanFactory);
- try {
- // Allows post-processing of the bean factory in context subclasses.
- postProcessBeanFactory(beanFactory);
- //被覆盖,重点关注
- // Invoke factory processors registered as beans in the context.
- invokeBeanFactoryPostProcessors(beanFactory);
- // Register bean processors that intercept bean creation.
- registerBeanPostProcessors(beanFactory);
- // Initialize message source for this context.
- initMessageSource();
- // Initialize event multicaster for this context.
- initApplicationEventMulticaster();
- // Initialize other special beans in specific context subclasses.
- onRefresh();
- // Check for listener beans and register them.
- registerListeners();
- // Instantiate all remaining (non-lazy-init) singletons.
- finishBeanFactoryInitialization(beanFactory);
- // Last step: publish corresponding event.
- finishRefresh();
- //被覆盖,重点关注
- }
- catch (BeansException ex) {
- // Destroy already created singletons to avoid dangling resources.
- beanFactory.destroySingletons();
- // Reset 'active' flag.
- cancelRefresh(ex);
- // Propagate exception to caller.
- throw ex;
- }
- }
- }
public void refresh() throws BeansException, IllegalStateException { synchronized (this.startupShutdownMonitor) { // Prepare this context for refreshing. prepareRefresh(); // Tell the subclass to refresh the internal bean factory. ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory(); // Prepare the bean factory for use in this context. prepareBeanFactory(beanFactory); try { // Allows post-processing of the bean factory in context subclasses. postProcessBeanFactory(beanFactory); //被覆盖,重点关注 // Invoke factory processors registered as beans in the context. invokeBeanFactoryPostProcessors(beanFactory); // Register bean processors that intercept bean creation. registerBeanPostProcessors(beanFactory); // Initialize message source for this context. initMessageSource(); // Initialize event multicaster for this context. initApplicationEventMulticaster(); // Initialize other special beans in specific context subclasses. onRefresh(); // Check for listener beans and register them. registerListeners(); // Instantiate all remaining (non-lazy-init) singletons. finishBeanFactoryInitialization(beanFactory); // Last step: publish corresponding event. finishRefresh(); //被覆盖,重点关注 } catch (BeansException ex) { // Destroy already created singletons to avoid dangling resources. beanFactory.destroySingletons(); // Reset 'active' flag. cancelRefresh(ex); // Propagate exception to caller. throw ex; } } }
postProcessBeanFactory(beanFactory);有覆盖吗?有!
实例化前,webx覆盖了此方法来,进行把webx组件实例放入spring中,怎么放?哪里执行?
((WebxComponentsContext) componentsContext).setLoader(this);
这里看出是WebxComponentsLoader来进行这个工作:
- /**
- * 在创建beanFactory之初被调用。
- *
- * @param webxComponentsContext
- */
- public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
- // 由于初始化components依赖于webxConfiguration,而webxConfiguration可能需要由PropertyPlaceholderConfigurer来处理,
- // 此外,其它有一些BeanFactoryPostProcessors会用到components,
- // 因此components必须在PropertyPlaceholderConfigurer之后初始化,并在其它BeanFactoryPostProcessors之前初始化。
- //
- // 下面创建的WebxComponentsCreator辅助类就是用来确保这个初始化顺序:
- // 1. PriorityOrdered - PropertyPlaceholderConfigurer
- // 2. Ordered - WebxComponentsCreator
- // 3. 普通 - 其它BeanFactoryPostProcessors
- BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(WebxComponentsCreator.class);
- builder.addConstructorArgValue(this);
- BeanDefinition componentsCreator = builder.getBeanDefinition();
- componentsCreator.setAutowireCandidate(false);
- BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory;
- String name = SpringExtUtil.generateBeanName(WebxComponentsCreator.class.getName(), registry);
- registry.registerBeanDefinition(name, componentsCreator);
- }
/** * 在创建beanFactory之初被调用。 * * @param webxComponentsContext */ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) { // 由于初始化components依赖于webxConfiguration,而webxConfiguration可能需要由PropertyPlaceholderConfigurer来处理, // 此外,其它有一些BeanFactoryPostProcessors会用到components, // 因此components必须在PropertyPlaceholderConfigurer之后初始化,并在其它BeanFactoryPostProcessors之前初始化。 // // 下面创建的WebxComponentsCreator辅助类就是用来确保这个初始化顺序: // 1. PriorityOrdered - PropertyPlaceholderConfigurer // 2. Ordered - WebxComponentsCreator // 3. 普通 - 其它BeanFactoryPostProcessors BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(WebxComponentsCreator.class); builder.addConstructorArgValue(this); BeanDefinition componentsCreator = builder.getBeanDefinition(); componentsCreator.setAutowireCandidate(false); BeanDefinitionRegistry registry = (BeanDefinitionRegistry) beanFactory; String name = SpringExtUtil.generateBeanName(WebxComponentsCreator.class.getName(), registry); registry.registerBeanDefinition(name, componentsCreator); }
一个内部类,WebxComponentsCreator辅助类就是用来确保初始化顺序,见上面:
- public static class WebxComponentsCreator implements BeanFactoryPostProcessor, Ordered {
- private final WebxComponentsLoader loader;
- public WebxComponentsCreator(WebxComponentsLoader loader) {
- this.loader = assertNotNull(loader, "WebxComponentsLoader");
- }
- public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
- if (loader.components == null) {
- WebxComponentsImpl components = loader.<SPAN style="BACKGROUND-COLOR: #ffffff; COLOR: #ff0000">createComponents</SPAN>
- (loader.getParentConfiguration(), beanFactory);
- AbstractApplicationContext wcc = (AbstractApplicationContext) components.getParentApplicationContext();
- wcc.addApplicationListener(new SourceFilteringListener(wcc, components));
- loader.components = components;
- }
- }
- public int getOrder() {
- return Ordered.LOWEST_PRECEDENCE;
- }
- }
public static class WebxComponentsCreator implements BeanFactoryPostProcessor, Ordered {
private final WebxComponentsLoader loader;
public WebxComponentsCreator(WebxComponentsLoader loader) {
this.loader = assertNotNull(loader, "WebxComponentsLoader");
}
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
if (loader.components == null) {
WebxComponentsImpl components = loader.createComponents
(loader.getParentConfiguration(), beanFactory);
AbstractApplicationContext wcc = (AbstractApplicationContext) components.getParentApplicationContext();
wcc.addApplicationListener(new SourceFilteringListener(wcc, components));
loader.components = components;
}
}
public int getOrder() {
return Ordered.LOWEST_PRECEDENCE;
}
}
初始化components:
- /**
- * 初始化components。
- */
- private WebxComponentsImpl createComponents(WebxConfiguration parentConfiguration,
- ConfigurableListableBeanFactory beanFactory) {
- //1.取得一组关于components的配置,也就是component的配置文件,ComponentsConfigImpl中
- ComponentsConfig componentsConfig = getComponentsConfig(parentConfiguration);
- // 2.假如isAutoDiscoverComponents==true,试图自动发现components
- Map<String, String> componentNamesAndLocations = findComponents(componentsConfig, getServletContext());
- // 3.取得特别指定的components
- Map<String, ComponentConfig> specifiedComponents = componentsConfig.getComponents();
- // 4.实际要初始化的comonents,为上述两种来源的并集
- Set<String> componentNames = createTreeSet();
- componentNames.addAll(componentNamesAndLocations.keySet());
- componentNames.addAll(specifiedComponents.keySet());
- // 5.创建root controller
- WebxRootController rootController = componentsConfig.getRootController();
- if (rootController == null) {
- rootController = (WebxRootController) BeanUtils.instantiateClass(componentsConfig.getRootControllerClass());
- }
- // 6.创建并将components对象置入resolvable dependencies,以便注入到需要的bean中
- WebxComponentsImpl components = new WebxComponentsImpl(componentsContext, componentsConfig
- .getDefaultComponent(), rootController, parentConfiguration);
- beanFactory.registerResolvableDependency(WebxComponents.class, components);
- // 7.初始化每个component
- for (String componentName : componentNames) {
- ComponentConfig componentConfig = specifiedComponents.get(componentName);
- String componentPath = null;
- WebxController controller = null;
- if (componentConfig != null) {
- componentPath = componentConfig.getPath();
- controller = componentConfig.getController();
- }
- if (controller == null) {
- controller = (WebxController) BeanUtils.instantiateClass(componentsConfig.getDefaultControllerClass());
- }
- WebxComponentImpl component = new WebxComponentImpl(components, componentName, componentPath, componentName
- .equals(componentsConfig.getDefaultComponent()), controller, getWebxConfigurationName());
- components.addComponent(component);
- prepareComponent(component, componentNamesAndLocations.get(componentName));
- }
- return components;
- }
/** * 初始化components。 */ private WebxComponentsImpl createComponents(WebxConfiguration parentConfiguration, ConfigurableListableBeanFactory beanFactory) { //1.取得一组关于components的配置,也就是component的配置文件,ComponentsConfigImpl中 ComponentsConfig componentsConfig = getComponentsConfig(parentConfiguration); // 2.假如isAutoDiscoverComponents==true,试图自动发现components Map<String, String> componentNamesAndLocations = findComponents(componentsConfig, getServletContext()); // 3.取得特别指定的components Map<String, ComponentConfig> specifiedComponents = componentsConfig.getComponents(); // 4.实际要初始化的comonents,为上述两种来源的并集 Set<String> componentNames = createTreeSet(); componentNames.addAll(componentNamesAndLocations.keySet()); componentNames.addAll(specifiedComponents.keySet()); // 5.创建root controller WebxRootController rootController = componentsConfig.getRootController(); if (rootController == null) { rootController = (WebxRootController) BeanUtils.instantiateClass(componentsConfig.getRootControllerClass()); } // 6.创建并将components对象置入resolvable dependencies,以便注入到需要的bean中 WebxComponentsImpl components = new WebxComponentsImpl(componentsContext, componentsConfig .getDefaultComponent(), rootController, parentConfiguration); beanFactory.registerResolvableDependency(WebxComponents.class, components); // 7.初始化每个component for (String componentName : componentNames) { ComponentConfig componentConfig = specifiedComponents.get(componentName); String componentPath = null; WebxController controller = null; if (componentConfig != null) { componentPath = componentConfig.getPath(); controller = componentConfig.getController(); } if (controller == null) { controller = (WebxController) BeanUtils.instantiateClass(componentsConfig.getDefaultControllerClass()); } WebxComponentImpl component = new WebxComponentImpl(components, componentName, componentPath, componentName .equals(componentsConfig.getDefaultComponent()), controller, getWebxConfigurationName()); components.addComponent(component); prepareComponent(component, componentNamesAndLocations.get(componentName)); } return components; }
怎么找到components,只要找到对应配置项即可
- public String getComponentConfigurationLocationPattern() {
- return componentConfigurationLocationPattern == null ? "/WEB-INF/webx-*.xml"
- : componentConfigurationLocationPattern;
- }
- //找到了配置文件,接下去要解析了,里面实现比较啰嗦,@#¥#@¥@#¥一大堆,返回
public String getComponentConfigurationLocationPattern() { return componentConfigurationLocationPattern == null ? "/WEB-INF/webx-*.xml" : componentConfigurationLocationPattern; } //找到了配置文件,接下去要解析了,里面实现比较啰嗦,@#¥#@¥@#¥一大堆,返回引用自:http://thinkinmylife.iteye.com/blog/712885
相关推荐
Webx3_Guide_Book 用户指南 2001年,阿里巴巴内部开始使用Java Servlet作为WEB服务器端的技术,以取代原先的 Apache HTTPD server和mod_perl的组合。 • 2002年,选择Jakarta Turbine作为WEB框架,并开始在此之上...
Webx3中文指南, 非常详细!
WebX3是一个强大的开源Web应用程序框架,主要用于构建企业级的Web应用系统。它以其灵活性、高效性和可扩展性而受到开发者的青睐。本压缩包包含了WebX3学习的示例和一个简单的留言板应用,这对于初学者理解WebX3的...
### Webx3框架知识点概述 #### 一、Webx3框架简介 - **定义与背景**:Webx3是阿里巴巴公司推出的一款专为大规模互联网应用设计的企业级开发框架。该框架旨在解决传统Java Web开发中遇到的问题,如复杂的配置、低效...
《Webx3 开源框架深度解析》 Webx3 是阿里巴巴开源的一款强大的Java Web开发框架,它基于MVC(Model-View-Controller)设计模式,旨在简化企业级应用的开发流程,提高开发效率。Webx3 提供了丰富的功能,包括但不...
《WebX3 Guide Book学习指南》是一本由Michael Zhou编写的关于Webx框架的专业书籍,出版于2010年11月13日。Webx框架是一个用于构建Web应用程序的强大工具,尤其在Java开发领域中有着广泛的应用。本书旨在为开发者...
### Webx3 PDF(阿里巴巴前端Web框架):深入解析与技术要点 #### 引言 Webx是一款由阿里巴巴推出的前端Web框架,旨在提供一个高效、灵活且可扩展的基础架构来支持大规模Web应用的开发。本文章将从Webx框架的核心...
《Webx3日志系统配置指南》 在Web开发中,日志系统是不可或缺的一部分,它可以帮助开发者跟踪程序运行状态,定位错误,以及进行性能分析。Webx3是一款功能强大的Web应用框架,其中包含了完善的日志处理机制。本文将...
《剖析paoding-webx3-solr-lucene:构建高效搜索引擎的深度探索》 在现代互联网应用中,数据量的增长速度惊人,如何高效地搜索和处理这些数据成为了开发者面临的重大挑战。"paoding-webx3-solr-lucene"是一个专注于...
在Webx3中获取Cookie的值是Web开发中常见的任务,尤其对于依赖用户会话信息的应用来说至关重要。Webx3是一个基于Java的企业级Web应用框架,它提供了丰富的功能来处理HTTP请求和响应,包括对Cookie的操作。下面我们将...
3. Webx的历史 ....................................................................................................... ix 4. 为什么要用Webx而不是其它的开源框架? ........................................
Webx是基于Java的Web应用框架,它具有高成熟度和可靠性,并且具备强大的开放性和扩展性。Webx框架的文档详细介绍了该框架的设计理念、历史、优势以及与Spring框架的集成等方面。文档内容主要分为两大部分:Webx框架...
Webx是一个高性能的Java Web应用框架,提供了丰富的组件和灵活的设计理念,使得开发者能够快速构建出可扩展、易于维护的Web应用程序。本知识点将详细介绍Webx框架的核心理念、架构层次、使用优势以及在实际开发中的...
在"petstore-webx3"这个压缩包中,我们可能找到了一个示例应用——PetStore,它是基于WebX框架的一个在线宠物商店的实现。 WebX 的核心特点和关键技术主要包括以下几个方面: 1. **MVC(Model-View-Controller)...
### Webx框架核心知识点 #### 一、Webx框架简介 **Webx**是一个由阿里巴巴集团内部开发并广泛使用的Web框架。它采用了经典的MVC(Model-View-Controller)设计模式,并强调页面驱动和“约定优于配置”的理念,旨在...
文件名“Webx3_requestContexts.docx”可能是指Webx的第三个主要版本(Webx3)中的Request Context(请求上下文)部分。Request Context是Web框架中常见的一种设计模式,用于封装HTTP请求的相关信息,如请求参数、...
3. **视图(View)**:视图负责渲染并展示数据。在Webx中,视图可以是JSP、FreeMarker或其他模板引擎生成的HTML页面。视图和模型之间的通信通过模型对象进行,模型对象包含要显示的数据。 4. **会话(Session)**:...
在本文中,我们将深入探讨WebX的基础知识、核心概念以及如何通过`login-webx3-tutorial`这个教程来学习和理解WebX。 首先,WebX的设计理念是提供一种易于使用的、模块化的开发方式,它将复杂的Web应用逻辑分解为可...
Webx3是一款强大的Java开发框架,它为构建Web应用程序提供了丰富的功能,同时也关注网站和用户数据的安全。尽管Webx3框架自带了一定的安全防护措施,但开发者仍然需要对安全问题保持警惕,因为并非所有的安全措施都...