HttpServletRequest 情境 1

晚上7:46

HttpServletRequest 情境 1使用 IDE/STS's debug mode of server runtime environment

    這篇文章的重點有兩個:(1). 在main method 被執行之前的 warning process method 內,無法傳遞 form,我改用 set attribute 的方式。(2). 開始 研究 :Struts's MultipartRequestWrapper(以及:JettyWebAppContext LazyWebXmlApplicationContext)

A. War :

[
file:/X:[the workingspace1]/[project1]/modules/[yy1]/the webapplication1 name of [yy1]/src/main/webapp/,
file:/X:[the workingspace1]/[project1]/modules/[yy1]/the inner path2 of [yy1]/html/,
file:/X:[the workingspace1]/[project1]/modules/[yy1]/the inner path2 of [yy1]/jsp/,
file:/X:[the workingspace1]/[project1]/modules/[yy2]/the inner path2 of [yy1]/html/,
file:/X:[the workingspace1]/[project1]/modules/[yy2]/the inner path2 of [yy2]/jsp/,
file:/X:[the workingspace1]/[project1]/modules/[yy3]/the inner path2 of [yy3]/html/,
file:/X:[the workingspace1]/[project1]/modules/[yy3]/the inner path2 of [yy3]/jsp/
]

B. [ZZZZ]'s















































1. HttpServletRequest 的 instance :

(POST /xx/[yy1]/[ZZZZ].do)@1946959692 org.eclipse.jetty.server.Request@740c3f4c

2. HttpServletRequest  org.apache.struts.upload.MultipartRequestWrapper  的 some Element :

(1). _attributes --

{
syskey_has_checked_repeated_submit=true,
syskey_[action]_form=,
com.{company}.{common-framework}.module.web.filter.STATIC_FILES=false,
[ZZZZ][Form]=,
org.{org/company : apache}.{framework : struts}.[action].mapping.instance=[Action]Config[
path=/[ZZZZ],
name=[ZZZZ][Form],
scope=request,
type=org.springframework.web.{framework : struts}.Delegating[Action]Proxy (註1),
(the attribute1 of the form1)=Y,
org.{org/company : apache}.{framework : struts}.[Action].MODULE=org.{org/company : apache}.{framework : struts}.config.impl.ModuleConfigImpl@630f9536,
com.{company}.{common-framework}.module.web.filter.TOP=true
}

註1:Proxy for a Spring-managed Struts Action that is defined in ContextLoaderPlugIn's WebApplicationContext.

a. ZZZZ's From :

[actionForm] : [ZZZZ]Form  (id=17441) :
|-action : [Action]  (id=17552) :
|-actionType : "" (id=417) :
|-criteria : [ZZZZ]Criteria  (id=17449) :
|-(the attribute1 of the form1) : "Y" (id=513) :
|-listId : null :
|-multipartRequestHandler : null :
|-pager : Pager  (id=17553) :
|-[ZZZZ]Desc : null :
|-[ZZZZ]Type : null :
|-attribute3 : null :
|-attribute4 : null :
|-attribute4 : null :
|-servlet : [ZZZZ's Super ZZZZ][Action]Servlet  (id=17554) :

b. ZZZZ's some attribute :

(the attribute1 of the form1) : "Y" (id=513)





















(2). [Sun/J2EE/WebApplication Instance -- _context] : JettyWebAppContext -- [Sun/J2EE/WebApplication Instance -- _context]:[Sun/J2EE/WebApplication -- WebApp][Sun/J2EE/WebApplication Instance -- Context*]$[Sun/J2EE/WebApplication Instance -- Context*] (id=457): [Sun/J2EE/WebApplication Instance -- this$0]:[Sun/J2EE/WebApplication Container : Jetty][Sun/J2EE/WebApplication -- WebApp][Sun/J2EE/WebApplication Instance -- Context*] (id=17482): __dftProtectedTargets:String[2] (id=17484): __FAILED:-1: __STARTED:2: __STARTING:1: __STOPPED:0: __STOPPING:3: _aliasChecks:CopyOnWriteArrayList (id=17485): _aliasesAllowed:false: _allowDuplicateFragmentNames:false: _allowNullPathInfo:false: _attributes:AttributesMap (id=17487): _availability:1: _available:true: _baseResource:ResourceCollection (id=17489): _beans:CopyOnWriteArrayList (id=17490): _classLoader:[Sun/J2EE/WebApplication -- WebApp]ClassLoader (id=524): _compactPath:false: _configurationClasses:String[6] (id=17492): _configurationClassesSet:false: _configurationDiscovered:true: _configurations:Configuration[9] (id=17494): _configurationsSet:true: _connectors:null: _[ContextAttributeListener : contextAttributeListeners]:Servlet[Sun/J2EE/WebApplication Instance -- Context*]AttributeListenerProxy (id=17496): [Sun/J2EE/WebApplication Instance -- _context]Attributes:AttributesMap (id=17498): [Sun/J2EE/WebApplication Instance -- _context]Listeners:ArrayList (id=17499): [Sun/J2EE/WebApplication Instance -- _context]Path:"/ls" (id=462): [Sun/J2EE/WebApplication Instance -- _context]WhiteList:null: _copyDir:false: _copyWebInf:false: _decorators:ArrayList (id=17502): _[Sun/J2EE/WebApplication Deploy Descriptor/Default : defaultsDescriptor]:"org/eclipse/[Sun/J2EE/WebApplication Container : jetty]/webapp/webdefault.xml" (id=17503): _defaultSecurityHandlerClass:Class (org.eclipse.[Sun/J2EE/WebApplication Container : jetty].security.ConstraintSecurityHandler) (id=7888): _[Sun/J2EE/WebApplication Deploy Descriptor : descriptor]:"file:/[thw path of workingspace1]/modules/[yy1]/[Company Web Application 1]/src/main/webapp/WEB-INF/web.xml" (id=17505): _displayName:null: _distributable:false: _errorHandler:ErrorPageErrorHandler (id=17507): _eventListeners:EventListener[9] (id=17508): _extraClasspath:null: _extractWAR:true: _handler:SessionHandler (id=17510): _initParams:HashMap (id=17511): _listeners:CopyOnWriteArrayList (id=17513): https://bugs.eclipse.org/bugs/show_bug.cgi?id=485063 After stopping and restarting JettyWebAppContext, it still retains a reference to the old ServerContainer. The ServerContainer bean is added to JettyWebAppContext by "jettyContext.addBean(jettyContainer);" in WebSocketServerContainerInitializer, and is apparently never removed. This means restarting leaks a lot of memory because the ServerContainer holds a reference to the old WebAppClassLoader and all its classes: _localeEncodingMap:HashMap (id=17514): _lock:Object (id=17515): _logger:StdErrLog (id=17517): _logUrlOnStart:false: _managedAttributes:null: _maxFormContentSize:-1: _maxFormKeys:-1: _metadata:MetaData (id=17519): _mimeTypes:MimeTypes (id=17521): _nextScope:SessionHandler (id=17510): _options:3: _outerScope:null: _overrideDescriptors:ArrayList (id=17523): _ownClassLoader:true: _parentLoaderPriority:false: _permissions:null: _protectedTargets:String[2] (id=17525): _requestAttributeListeners:null: _requestListeners:null: _resourceAliases:HashMap (id=17527): _restricted[Sun/J2EE/WebApplication Instance -- Context*]Listeners:null: _scontext:[Sun/J2EE/WebApplication -- WebApp][Sun/J2EE/WebApplication Instance -- Context*]$[Sun/J2EE/WebApplication Instance -- Context*] -- WebAppContext$Context (id=457): _securityHandler:ConstraintSecurityHandler (id=17529): _server:[Sun/J2EE/WebApplication Container : Jetty][Sun/J2EE/WebApplication Server Runtime : JettyServer] (id=17531): _serverClasses:ClasspathPattern (id=17532): _servletHandler:ServletHandler (id=17533): _sessionHandler:SessionHandler (id=17510): _shutdown:false: _started:true: _state:2: _systemClasses:ClasspathPattern (id=17536): _throwUnavailableOnStartupException:false: _tmpDir:File (id=17538): _unavailableException:null: _vhosts:null: _war:"[file:/X:[the workingspace1]/[project1]/modules/[yy1]/the webapplication1 name of [yy1]/src/main/webapp/, file:/X:[the workingspace1]/[project1]/modules/[yy1]/the inner path2 of [yy1]/html/, file:/X:[the workingspace1]/[project1]/modules/[yy1]/the inner path2 of [yy1]/jsp/, file:/X:[the workingspace1]/[project1]/modules/[yy2]/the inner path2 of [yy1]/html/, file:/X:[the workingspace1]/[project1]/modules/[yy2]/the inner path2 of [yy2]/jsp/, file:/X:[the workingspace1]/[project1]/modules/[yy3]/the inner path2 of [yy3]/html/, file:/X:[the workingspace1]/[project1]/modules/[yy3]/the inner path2 of [yy3]/jsp/]" (id=17540): _welcomeFiles:String[3] (id=17541): _wrapper:[Sun/J2EE/WebApplication Container : Jetty][Sun/J2EE/WebApplication -- WebApp][Sun/J2EE/WebApplication Instance -- Context*] (id=17482): baseAppFirst:true: classes:File (id=17543): classpathFiles:ArrayList (id=17544): copyWebInf:false: envConfig:EnvConfiguration (id=17584): [Sun/J2EE/WebApplication Container : jetty]EnvXml:"src/main/webapp/WEB-INF/[Sun/J2EE/WebApplication Container : jetty]-xxxx.xml" (id=17586): overlays:ArrayList (id=17587): testClasses:null: unpackOverlays:false: webInfClasses:ArrayList (id=17588): webInfJarMap:HashMap (id=17589): webInfJars:ArrayList (id=17591):





  • Share:

You Might Also Like

0 意見