收藏 分销(赏)

一个portlet页面的制作过程.doc

上传人:仙人****88 文档编号:11731465 上传时间:2025-08-11 格式:DOC 页数:6 大小:59KB 下载积分:10 金币
下载 相关 举报
一个portlet页面的制作过程.doc_第1页
第1页 / 共6页
一个portlet页面的制作过程.doc_第2页
第2页 / 共6页


点击查看更多>>
资源描述
一个portlet页面的制作过程 1、 先在NetBeans下建立一个关于porttal的工程(技术通报“jBoss Portlet 设计范例”中已经建立好了)。要有portlet.xml文件。 2、 在此工程下建立一个GPS_zfm.jsp页面: <%@ page contentType="text/html"%> <%@ page pageEncoding="UTF-8"%> <%@ page import="javax.portlet.*,java.util.*,com.wanhai.portlet.*" %> <%@ page import="org.jboss.portal.server.PortalConstants" %> <%@ taglib uri=" prefix="portlet" %> <%@ page isELIgnored="false" %> <portlet:defineObjects /> <% Tools myTools = new Tools(renderRequest); { %> <body topmargin="0" leftmargin="0"> <table width="770" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF"> <tr> <td nowrap bgcolor="#FFFFFF"><table border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="13" rowspan="5" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td> <td width="1" height="133"></td> <td width="750" rowspan="5" valign="top"><table width="706" border="0" align="center" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="706" height="34" valign="middle" bgcolor="#FFFFFF"><table width="53%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" class="BoldFont"> <!--DWLayoutTable--> <tr> <td width="275" height="22" align="center" valign="middle" bgcolor="#FFFFFF"><div align="center" class="BoldFont"><font size="4"><b>GPS集成应用</b></font> </div></td> </tr> </table></td> </tr> <tr> <td height="17"></td> </tr> <tr> <td height="587" align="right" valign="top"><table width="105%" height="696" border="0" cellpadding="18" cellspacing="1" bgcolor="#FFFFFF"> <!--DWLayoutTable--> <tr> <td width="660" height="582" valign="top" bgcolor="#FFFFFF" align="center"><p class="STYLE58"><img src="/WDRECPortal/images/gps1.png" height="226" width="426"><br> <p align="left"> <span class="InnerText"><font size="2">全球卫星定位系统(Global Positioning System, GPS),在每一颗卫星上都载有位置及时间讯号,只要客户端装设GPS设备,无论何地都可接收到至少5颗卫星的讯号。如今,GPS客户端接收器体积不断缩小,价格日降,单机的接收精准度愈来愈高,使其逐渐出现在手机、PDA、笔记型计算机等信息电子产品中,未来更可望成为以上产品的标准配备之一。</font></span></p> <p align="left"><img src="/WDRECPortal/images/d2.gif" width=15 height=15> <font size="2" background=/WDRECPortal/images/b1.gif><b>用途分类:</b></font> </p> <table width="607" height="159" align="center"> <tr align="center"> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/chezaishi.gif" width="120" height="110"></p> <P><a href=""><font size="2">车载式</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/chuanzaishi.jpg" width="120" height="110"></p> <P><a href=""><font size="2">船载式</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/it.jpg" width="120" height="110"></p> <P><a href=""><font size="2">机载式</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/address.GIF" width="120" height="110"></p> <P><a href=""><font size="2">星载式</font></a></P></td> </tr> </table> <p align="left"><img src="/WDRECPortal/images/d2.gif" width=15 height=15> <font size="2"><b>核心功能:</b></font> </p> <table width="604" height="159" align="center"> <tr align="center"> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/address.GIF" width="120" height="110"></p> <P><a href=""><font size="2">地图查询</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/systemDevlop.jpg" width="120" height="110"></p> <P><a href=""><font size="2">路线规划</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/daohang.jpg" width="120" height="110"></p> <P><a href=""><font size="2">自动导航</font></a></P></td> <td width="160" height=153 align=center><p><img src="/WDRECPortal/images/outsourcing.gif" width="120" height="110"></p> <P><a href=""><font size="2">信息归纳域管理</font></a></P></td> </tr> </table> <p align="left"><span class="InnerText" ><font size="2"> 康汇GPS引领潮流,采用先进的全球定位系统,广泛的应用于航海业、交通运输业甚至是城市智能交通管理,也能够细微的应用野外旅游、登山探险等。</font><br> </span><br> <img src="/WDRECPortal/images/gps.png" width="415" height="200"><br> </p> </td> </tr> </table> </td> </tr> </table></td> <td width="10" rowspan="5" align="right" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td> </tr> <tr> <td height="26"></td> </tr> <tr> <td height="53"></td> </tr> <tr> <td height="161"></td> </tr> <tr> <td height="258"></td> </tr> <tr> <td height="19" bgcolor="#FFFFFF"></td> <td bgcolor="#FFFFFF"></td> <td bgcolor="#FFFFFF"></td> <td bgcolor="#FFFFFF"></td> </tr> <tr> <td height="35"></td> <td></td> <td valign="bottom"><table width="101%" border="0" cellspacing="0" cellpadding="8"> <!--DWLayoutTable--> <tr> <td height="35" colspan="4" align="center">Copyright 2008 gntsh Inc. All rights reserved<br> Powered By GNTSH</td> </tr> </table></td> <td valign="bottom"><!--DWLayoutEmptyCell-->&nbsp;</td> </tr> </table></td> </tr> </table> </body> <% } myTools = null; %> 3、在portlet.xml文件中进行如下配置 <?xml version='1.0' encoding='UTF-8' ?> <portlet-app xmlns=' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation=' version='1.0'> <portlet> <description>GPS_zfm</description> <portlet-name>GPS_zfm</portlet-name> <display-name>GPS_zfm</display-name> <portlet-class>com.wanhai.portlet.GPS_zfm</portlet-class> <expiration-cache>0</expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>VIEW</portlet-mode> </supports> <resource-bundle>com.wanhai.portlet.messages</resource-bundle> <portlet-info> <title>GPS_zfm_jsp专区:</title> <short-title>GPS_zfm_jsp专区:</short-title> </portlet-info> </portlet> 3、 在Source Packages目录下建立com.wanhai.portlet包,在此包下建立GSP_zfm.java文件,内容如下: package com.wanhai.portlet; import mon.InitParameters; import javax.portlet.GenericPortlet; import javax.portlet.ActionRequest; import javax.portlet.RenderRequest; import javax.portlet.ActionResponse; import javax.portlet.RenderResponse; import javax.portlet.PortletException; import java.io.IOException; import javax.portlet.PortletRequestDispatcher; /** * GPS_zfm Portlet Class */ public class GPS_zfm extends GenericPortlet { public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException { } public void doView(RenderRequest request, RenderResponse response) throws PortletException, IOException { response.setContentType("text/html"); Tools myTools = new Tools(request); if (myTools.getUserID().trim().equals(this)){ response.getWriter().println("Require Login"); } else{ PortletRequestDispatcher dispatcher = getPortletContext().getRequestDispatcher("/WEB-INF/jsp/GPS_zfm.jsp"); dispatcher.include(request, response); } myTools = null; } } 4、 对所建立的项目进行编译生成WDRECPortal.war文件。 5、 将此war文件放到jboss-portal-2.7.0.GA\server\default\deploy下,然后启动 jboss-portal-2.7.0.GA 6、在浏览器地址栏中输入http://localhost:8080/portal。
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服