锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲国产精品无码专区影院 ,亚洲一区二区三区夜色,亚洲国产精品自在自线观看http://m.tkk7.com/Ericzhang5231/category/29191.htmlzh-cnSun, 02 Mar 2008 16:55:33 GMTSun, 02 Mar 2008 16:55:33 GMT60JSR 168 APIhttp://m.tkk7.com/Ericzhang5231/articles/JSR168API.htmlEric5231Eric5231Sun, 02 Mar 2008 12:05:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/JSR168API.htmlhttp://m.tkk7.com/Ericzhang5231/comments/183292.htmlhttp://m.tkk7.com/Ericzhang5231/articles/JSR168API.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/183292.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/183292.html1.Number of portlet instances

For a single system which is not clustered, there is only one portlet object per portlet definition. In a clustered environment
(marked distributable in the web.xml), only one portlet object will be instantiate per portlet definition per VM


2.Portlet windows

The portlets may contain preferences and default values. These values are used to create the PortletPreferences object.The portlet entity has the PortletPreferences attached to it.Administrators can globally change the parameters while in Config mode. The changes will affect all of the portlet instances on all pages. If a user modifies a portletPreference, it will only affect their PortletPreferences object.



3.Thread safety

The PortletRequest and PortletResponse objects are not guaranteed to be thread safe. These object should only be used in the scope of the processAction and render methods. You should not reference the PortletRequest or PortletResponse in any object outside these methods. If the request handling methods modify class variables, these variables will also be modified for all instances of the portlet. This can cause unexpected problems in your portlets that are difficult to debug. Use method local variables to avoid this problem.

4.JSR 168 comparison to servlets

The JSP 168 API does not extend or implement any of the Servlet classes or interface. However, JSR 168 portlets are modeled after the servlet specification. Portlets therefore cannot set character set encoding for the response. They also cannot set HTTP header responses.This allows the ServletContext and the PortletContext to share attributes. This also allows the HttpSession to share attributes with the PortletSession. The opposite is true also, the PortletSession can share attributes with the HttpSsession.


5.JSR168 portlet modes

JSR 168 supports three modes,View, Edit, and Help. JSR 168 also supports custom modes. IBM WebSphere Portal at the time of this writing only supports the custom mode Configuration.
 * Custome-portlet-mode: Configuration mode is used to globally update a portlet configuration. In Configuration mode an administrator can update the read-only ortletPreferences. Changes are reflected in all occurrences of the portlet on all pages. The doDispatch() method of the GenericPortlet class needs to be overridden to handle this custom mode.


6.JSR 168 Porlet window states

Like portlet mode the Window state can be programmatically changed in processAction() while processing an action request. The state can also be requested while creating a render or action URL.

7.Core JSR 168 objects

7.1 Portlet

 * void destory()
 * void init(PortletConfig config): requests
. The init is called only once per portlet object and should be used to load any expensive resources (such

as database connections). A unique PortletConfig object is passed into the init method. This PortletConfig object is per portlet definition. You can

gain access to the initialization parameters and the resource bundles from the PortletConfig object. You can also get the PortletContext from the

PortletConfig. The PortletContext will provide information about the portlet's runtime environment.
 * void processAction(ActionRequest request, ActionResponse response): The processAction method is called in response to an action request. URLs

generated by the portlet using RenderResponse.createActionURL() or the ActionURL JSP tag will generate an action URL causing this method to be

invoked. This method should be used to update the portlets state based on the action request parameters.The ActionRequest provides access to the

parameters, window state, portlet mode, portlet context, portlet session and the PortletPreferences object. Changes to the window state and mode are

made through the ActionResponse object;
 * void render(RenderRequest request, RenderResponse response): The RenderRequest does not have access to the parameters passed into the ActionRequest unless they have been explicitly added during the action request using the ActionResponse.setRenderParameter() method.The RenderResponse is used to display content, it can either use the RenderResponse Writer or it can delegate to a JSP or Servlet using the PortletRequestDispatcher.



7.2 GenericPortlet

 * String getInitParameter(String name)
 * Enumeration getInitParameterNames(): Returns all the initialization parameters names in an Enumeration of Strings.
 * PortletContext getPortletContext():
 * String getName(): Returns the name of the portlet defined by either the administrator or the application deployment descriptor.
 * ResourceBundle getResourceBundle(Locale locale): Portlets may define basic information to be used in the title bar. This information may include title, short-title and keywords. This information can be added directly in the portlet deployment descriptor or it may be added in an external ResourceBundle. If this information is located in an external ResourceBundle, the portlet deployment descriptor must provide the name of the ResourceBundle.Portal will search the values in the ResourcesBundle first and then it will look for the resources inline. If the resource cannot be found, an empty String will be returned.
 *void doDispatch(RenderRequest request, RenderResponseresponse) : The doDispatch method is called from the render method.The doDispatch will determine the portlet mode and invoke the correct method. If using a custom mode, you should override the doDispatch method to test for your custom mode.If the request is not for your custom mode invoke super.doDispatch to allow GenericPortlet do dispatch the correct method.
 * void doEdit(RenderRequest request, RenderResponseresponse): When the portlet mode is Edit, the doEdit method will be invoked by doDispatch.
 * void doHelp(RenderRequest request, RenderResponseresponse): When the portlet mode is Help, the doHelp method will be invoked by doDispatch.
 * void doView(RenderRequest request, RenderResponse response): like as doHelp();
 * PortletConfig getPortletConfig()
 * String getPortletName()
 * String getTitle(RenderRequest request)
 *void processAction(ActionRequest reqeust, ActionResponse response): The processAction method is invoked for all action requests for the portlet.
 * void render(RenderRequest request, RenderResponse response): The render method sets the portlet title and then invokes the doDispatch() method.



7.3 PortletURL

PortletURLs: action URL and RenderURL. By using the RenderResponse.createActionURL, RenderResponse.createRenderURL or the JSP tags, the portlet developer can create the different types of URLs. When a render URL is encountered, the render method is invoked and it turn invokes the appropriate doXXX method. When an action URL is encountered, the processAction method is invoked. Only action URLs should be used for forms. Render and Action parameters are different. Parameters set for an action URL (parameters in an HTML form) are not available to the render method unless they are explicitly added using the setRenderParameter of the ActionResponse class.
 * void setParameter(String name, String value)
 * void setParameter(String name, String[] values)
 * void setParameters(Map parameters)
 * void setPortletMode(PortletMode portletMode)
 * void setWindowState(WindowState windowState)
 * void String toString()
 * void setSecure(boolean secure)

7.4 PortletContext

The PortletContext provides the portlet with information about the portlet application that it is running in. If the portlet application is not in a distributed environment, there is nly once PortletContext object instantiated for each portlet application deployed. If the application is in a distributed environment (marked distributable in the web.xml) then there will be one instance per JVM.
The following methods of the PortletContext class will have the sameimplementation as the ServletContex:
 getAttribute
 getAttributeNames
 getInitParameter
 getInitParameternames
 getMimeType
 getRealPath
 getResource
 getResourcePaths
 getResourceAsStream
 log
 removeAttribute
 setAttribute

7.5 PortletRequest

 The portlet request object will contain information about the client request. The request will also include parameters, the portlet mode, the window state, session, and access to the portlat context. PortletRequest defines commonly used functionality for ActionRequest and RenderRequest.
 * String getParameter(java.lang.String name)
 * Enumeration getParameterNames()
 * String[] getParameterValues(java.lang.String name)
 * Map getParameterMap()
 * void setAttribute(java.lang.String name, java.lang.Objectvalue)
 * Object getAttribute(java.lang.String name)
 * void removeAttribute(java.lang.String name)
 * Enumeration getAttributeNames()
 * java.lang.String getContextPath():
The path returned starts with ‘/’ character but it does not end with a ‘/’. This method should be used when including resources such as images<%= portletResponse.encodeURL(renderRequest.getContextPath() + "/images/myImage.jpg") %>
 * boolean isPortletModeAllowed(PortletMode mode): This method will true if the mode is defined in the portlet deployment descriptor. If the mode is

not defined it will return false.
 * PortletMode getPortletMode(): This method will return the current portlet mode.
 * boolean isWindowStateAllowed(WindowState state): If the window state is defined in the deployment descriptor this will return true, else it will return false.
 * WindowState getWindowState()
 * String getProperty(java.lang.String name)
 * Enumeration getProperties(java.lang.String name)
 * Enumeration getPropertyNames()
 * String getRemoteUser()
 * boolean isUserInRole(java.lang.String role)
 * javax.security.Principal getUserPrincipal():
Returns the Principal object of the current user who is logged in. If security is not enabled, this method will always returns null.

7.6 ActionRequest

The ActionRequest interface extends the PortletRequest interface and is used during an action request. The ActionRequest object is passed into the processAction method. he ActionRequest object is in scope only during execution of the processAction method.
* BufferedReader getReader(): This returns a BufferedReader containing the body of the HTTP request as character data. The character data returned will be of the same type as the character encoding of the body. If the character encoding is not supported, an UnsupportedEncodingException will be thrown.
 * InputStream getPortletInputStream(): An InputStream containing the HTTP request body in the form of binary data will be returned.When the data is of type application/x-www-form-urlencoded, portal has already processed the form and the parameters will be available via request parameters. An IllegalStateException will be thrown if the data is of type application/x-www-form-urlencoded.Either the getPortletInputStream or the getReader may be called for the ActionRequest object but not both. If the getreader has been called, an ensuing call to getPortletInputStream will throw an IllegalStateException.
 * String getContentType()
 * String getCharacterEncoding()
 * void setCharacterEncoding(String enc):
This method will set the character encoding for the returned input of the getReader method. This must be called before the call to getReader. An UnsupportedEncodingException is thrown if the encoding passed in is unsupported or unknown. An IllegalStateException will be thrown if this method is called after getReader().
 * int getContentLength()



7.7 RenderRequest

The RenderRequest interface extends the PortletRequest. The RenderRequest does not define any additional functionality. The RenderRequest object is scoped to the render method.



Eric5231 2008-03-02 20:05 鍙戣〃璇勮
]]>
Chapter 1 Overviewhttp://m.tkk7.com/Ericzhang5231/articles/portal.htmlEric5231Eric5231Sat, 26 Jan 2008 14:35:00 GMThttp://m.tkk7.com/Ericzhang5231/articles/portal.htmlhttp://m.tkk7.com/Ericzhang5231/comments/177956.htmlhttp://m.tkk7.com/Ericzhang5231/articles/portal.html#Feedback0http://m.tkk7.com/Ericzhang5231/comments/commentRss/177956.htmlhttp://m.tkk7.com/Ericzhang5231/services/trackbacks/177956.html             At the coir of the challenges currently being faced by Web developers is the integration of disparate user content into a seamless Web application and well-designed user interface.Portal technology provides a framework to build such application for the Web.
            The main job of  a portal is to aggregate content and functionality. Portal servers provide:
            4A server to aggregate content
            4A scalable infrastructure
            4A framework to build portal components and extendsions
 Additionally, most portals require personalization and customization.

1.1.1
1.2.1 Whta is  a portal?
                Portals are the next-generation desktop, deliverin e-business applications over the Web to all kinds of client devices. Portals provide site user with a single point of access to multiple types of information and applications.Regardless of where the information resides or what format it uses, a portal aggregates all of the information in a way that is pleasing and relevant to the user. Acomplete portal solution should provide users with convenient access to everything they need to get their tasks done.

Eric5231 2008-01-26 22:35 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 久久精品a亚洲国产v高清不卡| 亚洲国产精品第一区二区三区| 亚洲成AV人片天堂网无码| 一区二区在线视频免费观看| 亚洲国产成人精品无码区在线秒播 | caoporm超免费公开视频| 免费无遮挡无码永久视频| 91人人区免费区人人| 日韩伦理片电影在线免费观看| 亚洲同性男gay网站在线观看| 精品国产无限资源免费观看| 亚洲Av无码乱码在线播放| 色偷偷亚洲第一综合网| 免费一级大黄特色大片| 无码人妻一区二区三区免费视频 | 国产一精品一AV一免费孕妇 | 亚洲精品中文字幕乱码三区| 黄色网页在线免费观看| 国产亚洲老熟女视频| 亚洲国产精品综合福利专区| 麻豆一区二区免费播放网站 | 一级做a毛片免费视频| 亚洲啪啪综合AV一区| 色猫咪免费人成网站在线观看| 国产一级特黄高清免费大片| 香蕉视频免费在线| 免费的一级黄色片| 一级毛片免费播放试看60分钟| 国产亚洲精久久久久久无码| 亚洲成人免费网站| 亚洲a无码综合a国产av中文| 国产亚洲精品a在线观看| 日本一卡精品视频免费| 亚洲欧洲日产国码久在线| 亚洲国产午夜福利在线播放| 一级毛片aaaaaa免费看| 亚洲精品女同中文字幕| 毛片在线看免费版| 四虎一区二区成人免费影院网址| 亚洲AV日韩AV天堂一区二区三区| 一日本道a高清免费播放|