1.1 File->New->Portlet Project
1.2Specify the attributes(it's alright to set them as default) in the New Portlet Project wizard, take care of the following attributes
* target runtime: WebSphere Portal v6.0(if you don't see this runtime, click new to set one up.
* Portlet Type: Mobile Portlet
1.3 Specify the attributes at Portlet Setting page.
Note that ContentType->x-application/vnd.xdime+xml-> view should be checked if the portlet is going to deploy on mobile portal. Currently the mobile portlet only support view mode at default.
At this point, a new project has created. To change the project settings, we can modify the portlet.xml file located at \WebContent\Web-INF
2. The project structure
src: The java code is contained here. Initially there are 3 kinds of files: portlet, portlet session and language properties files.
At portlet file names like
At portelt session file we can store some session attribute which both portlet file and jsp file can access. This file acts like model of MVC pattern.
Note that each portlet has its own portlet and portlet session file.
WebContent/mcs-policies: This directory stores the xdime component such as layout(mlyt), theme(mthm), image component(mimg) etc. The jsp file can acess them with path like "/sample.mimg" note that this component are xml files, we can view the xml source when open them with source view.
WebContent/WEB-INF: web.xml and portlet.xml lie here. They are all about the project configuration
3. Add portlet to existing portlet project
3.2 specify the attributes for portlet
portlet project: the exsiting portlet project
portlet type: mobile portlet
3.3 portlet setting page(do as 1.3)