当前位置: 互联网>综合
本页文章导读:
▪Nginx学习之三-ngx_http_request_t结构体 ngx_http_request_s是nginx中非常重要的一个结构体,贯穿于htpp请求处理的整个过程中。
下面解释了ngx_http_request_s结构体中与HTTP框架相关的重要的成员变量。
struct ngx_http_request_s {
uint32_t .........
▪.net中页面插入CKEditor编辑器
首先是配置,下载好。
然后把里面的文件夹放进web根目录下。
ok,现在就可以了
前台代码如下:
<head runat="server">
<title></title>
<script type="text/javascript" src.........
▪Websphere 8.5报 java.lang.VerifyError: JVMVRFY007 final method overridden; class=net/sf/cglib/core/De 错误详细信息如下:
[6/27/13 15:54:49:679 CST] 00000043 SystemOut O ERROR - 获取指定的对象[AppendixMgr]的实例失败!请检查配置文件! -com.trs.DreamFactory.createObjectById(DreamFactory.java:79)
org.springframework.beans.f.........
[1]Nginx学习之三-ngx_http_request_t结构体
来源: 互联网 发布时间: 2013-10-26
ngx_http_request_s是nginx中非常重要的一个结构体,贯穿于htpp请求处理的整个过程中。
下面解释了ngx_http_request_s结构体中与HTTP框架相关的重要的成员变量。
struct ngx_http_request_s { uint32_t signature; /* "HTTP" */ //请求对应的客户端连接 ngx_connection_t *connection; //指向存放所有HTTP模块的上下文结构体的指针数组 void **ctx; //指向请求对应的存放main级别配置结构体的指针数组 void **main_conf; //指向请求对应的存放srv级别配置结构体的指针数组 void **srv_conf; //指向请求对应的存放loc级别配置结构体的指针数组 void **loc_conf; /* * 在接收完http头部,第一次在业务上处理http请求时,http框架提供的处理方法是ngx_http_process_request。 但如果该方法无法一次处理完该请求的全部业务,在归还控制权到epoll时间模块后,该请求再次被回调时, 将通过Ngx_http_request_handler方法来处理,而这个方法中对于可读事件的处理就是调用read_event_handler处理请求。 也就是说,http模块希望在底层处理请求的读事件时,重新实现read_event_handler方法 */ ngx_http_event_handler_pt read_event_handler; //与上面的方法类似 ngx_http_event_handler_pt write_event_handler; #if (NGX_HTTP_CACHE) ngx_http_cache_t *cache; #endif //upstream机制用到的结构体 ngx_http_upstream_t *upstream; ngx_array_t *upstream_states; /* of ngx_http_upstream_state_t */ //这个请求的内存池 ngx_pool_t *pool; //用于接收http请求内容的缓冲区,主要接收http头部 ngx_buf_t *header_in; //ngx_http_process_request_headers在接收、解析完http请求的头部后,会把解析完的每一个http头部加入到headers_in的headers链表中,同时会构造headers_in中的其他成员 ngx_http_headers_in_t headers_in; //http模块会把想要发送的http相应信息放到headers_out中,期望http框架将headers_out中的成员序列化为http响应包发送给用户 ngx_http_headers_out_t headers_out; //接收请求中包体的数据结构 ngx_http_request_body_t *request_body; //延迟关闭连接的时间 time_t lingering_time; //当前请求初始化时的时间 time_t start_sec; ngx_msec_t start_msec; //下面的9个成员是函数ngx_http_process_request_line方法在接收、解析http请求行时解析出的信息 ngx_uint_t method;//方法名 ngx_uint_t http_version;//协议版本 ngx_str_t request_line; ngx_str_t uri;//用户请求中的uri ngx_str_t args;//用户请求中的url参数 ngx_str_t exten;//用户请求的文件扩展名 ngx_str_t unparsed_uri;//没有进行URL解码的原始请求 ngx_str_t method_name;//用户请求中的方法名字符串 ngx_str_t http_protocol;//其data成员指向请求中http起始地址 /*表示需要发送给客户端的http响应。out中保存着由headers_out中序列化后的表示http头部的TCP流。 * 在调用ngx_http_output_filter方法后,out中还会保存着待发送的http包体,它是实现异步发送http响应的关键。*/ ngx_chain_t *out; /*当前请求既有可能是用户发来的请求,也可能是派生出的子请求。 * 而main标识一系列相关的派生子请求的原始请求。 * 一般可通过main和当前请求的地址是否相等来判断当前请求是否为用户发来的原始请求。*/ ngx_http_request_t *main; //当前请求的父请求(不一定是原始请求) ngx_http_request_t *parent; //与subrequest子请求相关的功能 ngx_http_postponed_request_t *postponed; ngx_http_post_subrequest_t *post_subrequest; //所有的子请求都是通过这个单链表链接起来的 ngx_http_posted_request_t *posted_requests; /*全局的ngx_http_phase_engine_t结构体中定义了一个ngx_http_phase_handler_t回答方法组成的数组。 * 而phase_handler成员则与该数组配合使用。表示请求下次应当执行phase_handler作为序列号指定的数组中的回调方法*/ ngx_int_t phase_handler; //表示NGX_HTTP_CONTENT_PHASE阶段提供给http模块处理请求的一种方式,它指向http模块实现的请求处理方法 ngx_http_handler_pt content_handler; //在NGX_HTTP_ACCESS_PHASE节点需要判断请求是否具有访问权限时,通过access_code来传递http模块的handler回调方法的返回值,如果为0表示具备权限。否则不具备。 ngx_uint_t access_code; ngx_http_variable_value_t *variables; #if (NGX_PCRE) ngx_uint_t ncaptures; int *captures; u_char *captures_data; #endif size_t limit_rate; /* used to learn the Apache compatible response length without a header */ size_t header_size; //http请求的全部长度,包括http包体 off_t request_length; ngx_uint_t err_status; ngx_http_connection_t *http_connection; #if (NGX_HTTP_SPDY) ngx_http_spdy_stream_t *spdy_stream; #endif ngx_http_log_handler_pt log_handler; //在这个请求中如果打开了某些资源,并需要在请求结束时释放,那么需要把定义的释放资源的方法添加到这个成员 ngx_http_cleanup_t *cleanup; unsigned subrequests:8; //引用计数一般都作用于这个请求的原始请求上 //引用计数,每当派生出子请求时,原始请求的count成员都会加一 unsigned count:8; //阻塞标志位,目前仅由aio使用 unsigned blocked:8; //标志位:为1表示蛋清请求正在使用异步IO unsigned aio:1; unsigned http_state:4; /* URI with "/." and on Win32 with "//" */ unsigned complex_uri:1; /* URI with "%" */ unsigned quoted_uri:1; /* URI with "+" */ unsigned plus_in_uri:1; /* URI with " " */ unsigned space_in_uri:1; unsigned invalid_header:1; unsigned add_uri_to_alias:1; unsigned valid_location:1; unsigned valid_unparsed_uri:1; //标志位:为1时表示URL发生过rewrite重写 unsigned uri_changed:1; //表示使用rewrite重写URL的次数 unsigned uri_changes:4; unsigned request_body_in_single_buf:1; unsigned request_body_in_file_only:1; unsigned request_body_in_persistent_file:1; unsigned request_body_in_clean_file:1; unsigned request_body_file_group_access:1; unsigned request_body_file_log_level:3; unsigned subrequest_in_memory:1; unsigned waited:1; #if (NGX_HTTP_CACHE) unsigned cached:1; #endif #if (NGX_HTTP_GZIP) unsigned gzip_tested:1; unsigned gzip_ok:1; unsigned gzip_vary:1; #endif unsigned proxy:1; unsigned bypass_cache:1; unsigned no_cache:1; /* * instead of using the request context data in * ngx_http_limit_conn_module and ngx_http_limit_req_module * we use the single bits in the request structure */ unsigned limit_conn_set:1; unsigned limit_req_set:1; #if 0 unsigned cacheable:1; #endif unsigned pipeline:1; unsigned chunked:1; unsigned header_only:1; //标志位,为1表示当前请求时keepalive请求 unsigned keepalive:1; //延迟关闭标志位 unsigned lingering_close:1; //标志位:为1表示正在丢弃http请求中的包体 unsigned discard_body:1; //标志位:为1表示请求的当前状态是在做内部跳转 unsigned internal:1; unsigned error_page:1; unsigned ignore_content_encoding:1; unsigned filter_finalize:1; unsigned post_action:1; unsigned request_complete:1; unsigned
[2].net中页面插入CKEditor编辑器
来源: 互联网 发布时间: 2013-10-26
首先是配置,下载好。
然后把里面的文件夹放进web根目录下。
ok,现在就可以了
前台代码如下:
<head runat="server"> <title></title> <script type="text/javascript" src=/blog_article/"ckeditor/ckeditor.js"></script>/index.html </head> <body> <form id="form1" method="post" runat="server"> <div style="width:500px;height:300px;"> <asp:TextBox ID="txtContent" runat="server" TextMode="MultiLine" CssClass="ckeditor"></asp:TextBox> <asp:Button runat="server" Text="保存" ID="btn_OK" onclick="btn_OK_Click"/> </div> </form> </body>
后台代码只是简单的获取到TextBox里的内容就可以了,下面包含我测试用的把数据写进一个txt格式的文本里
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string strPath = "E:\\jin\\CompanyProject\\WebSite\\Web\\txt\\txt.Txt"; //读取: txtContent.Text = File.ReadAllText(strPath); } } protected void btn_OK_Click(object sender, EventArgs e) { string Data = txtContent.Text; //string st = Request.Form.Set[form1].tostring(); string Data2 = Request.Form[txtContent.Text.ToString()]; string strContent = Data; string strPath = "E:\\jin\\CompanyProject\\WebSite\\Web\\txt\\txt.Txt";//如: D:/Text/File.Txt File.WriteAllText(strPath, strContent);//保存文件 }
效果如下:
作者:jintougao 发表于2013-6-27 16:39:39 原文链接
阅读:13 评论:0 查看评论
[3]Websphere 8.5报 java.lang.VerifyError: JVMVRFY007 final method overridden; class=net/sf/cglib/core/De
来源: 互联网 发布时间: 2013-10-26
错误详细信息如下:
[6/27/13 15:54:49:679 CST] 00000043 SystemOut O ERROR - 获取指定的对象[AppendixMgr]的实例失败!请检查配置文件! -com.trs.DreamFactory.createObjectById(DreamFactory.java:79) org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'AppendixMgr' defined in file [/opt/IBM/WebSphere/AppServer/profiles/AppSrv06/installedApps/QATest218Node05Cell/ekp_1235_fix.ear/ekp.war/WEB-INF/classes/trsconfig/domain/com.trs.components.wcm.content/beans.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: JVMVRFY007 final method overridden; class=net/sf/cglib/core/DebuggingClassWriter, method=visit(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at com.trs.SpringBean.getBean(SpringBean.java:58) at com.trs.DreamFactory.createObjectById(DreamFactory.java:72) at com.trs.components.wcm.content.domain.DocBakLCListenerForApd.<init>(DocBakLCListenerForApd.java:40) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39) at java.lang.reflect.Constructor.newInstance(Constructor.java:527) at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:76) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:990) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:943) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at com.trs.SpringBean.getBean(SpringBean.java:58) at com.trs.DreamFactory.createObjectById(DreamFactory.java:72) at com.trs.infra.persistent.listener.ObjectLCListenerConfig.getBean(ObjectLCListenerConfig.java:81) at com.trs.infra.persistent.listener.ObjectLCMonitorServer.loadListeners(ObjectLCMonitorServer.java:318) at com.trs.infra.persistent.listener.ObjectLCMonitorServer.loadListeners(ObjectLCMonitorServer.java:254) at com.trs.infra.persistent.listener.ObjectLCMonitorServer.loadConfig(ObjectLCMonitorServer.java:240) at com.trs.infra.persistent.listener.ObjectLCMonitorServer.doStart(ObjectLCMonitorServer.java:345) at com.trs.infra.BaseServer.startup(BaseServer.java:144) at com.trs.infra.ServerControl.doStart(ServerControl.java:194) at com.trs.infra.StartupServlet.init(StartupServlet.java:52) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:336) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.init(ServletWrapperImpl.java:168) at com.ibm.ws.webcontainer.servlet.ServletWrapper.loadOnStartupCheck(ServletWrapper.java:1341) at com.ibm.ws.webcontainer.webapp.WebApp.doLoadOnStartupActions(WebApp.java:588) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinally(WebApp.java:559) at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:425) at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88) at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169) at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749) at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:426) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:718) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1170) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:638) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:769) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2172) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:445) at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:388) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:116) at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:994) at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1783) Caused by: java.lang.VerifyError: JVMVRFY007 final method overridden; class=net/sf/cglib/core/DebuggingClassWriter, method=visit(IILjava/lang/String;Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;)V at java.lang.ClassLoader.defineClassImpl(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:262) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:69) at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:852) at com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:762) at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:585) at java.lang.ClassLoader.loadClass(ClassLoader.java:627) at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:85) at java.lang.J9VMInternals.initialize(J9VMInternals.java:162) at net.sf.cglib.core.AbstractClassGenerator.<init>(AbstractClassGenerator.java:38) at net.sf.cglib.core.KeyFactory$Generator.<init>(KeyFactory.java:127) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:112) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108) at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104) at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69) at java.lang.J9VMInternals.initializeImpl(Native Method) at java.lang.J9VMInternals.initialize(J9VMInternals.java:228) at org.springframework.aop.framework.Cglib2AopProxy.createEnhancer(Cglib2AopProxy.java:229) at org.springframework.aop.framework.Cglib2AopProxy.getProxy(Cglib2AopProxy.java:171) at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:476) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:362) at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:322) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:407) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1461) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) ... 59 more
解决办法:
8.5版本的Websphere,需要 “cglib-nodep-2.2.2.jar” 替换 ekp/web-inf/lib下的“cglib-2.2.2.jar”文件
原因是:cglib-2.2.2.jar 可以与 asm-3.3.1.jar 搭配使用管理bean文件,但是"asm-3.3.1.jar"不可以与“asm-4.0.jar”搭配使用,正是因为Websphere 8.5 自身带了“asm-4.0.jar”造成的。
在其他应用服务器下不会有问题。
出现的异常是:重写了某个final方法,这个方法正是 asm-4.0.jar与asm
最新技术文章:
 
站内导航:
特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!