快捷搜索:

Spring2的PortletMVC框架构建Portlet应用(一)

下载TOMCAT6.0

http://tomcat.apache.org/download-60.cgi

安装pluto

应用Apache Pluto测试我们的Portlet利用法度榜样

Pluto 源代码应用 Maven 2 进行项目治理和构建

首页

http://portals.apache.org/pluto/

下载地址

http://apache.mirror.phpchina.com/portals/pluto/

文件

pluto-current-src.zip

maven2 构建

编辑 D:\apache-maven-2.0.8\conf 目录下的 settings.xml 文件,增添

元素:

...

org.apache.pluto

...

运行敕令

敕令1:D:\>cd D:\tool\pluto-1.1.6

敕令2:D:\tool\pluto-1.1.6>mvn install

敕令3:D:\tool\pluto-1.1.6>mvn pluto:install -DinstallDir=D:/tool/tomcat6.0

运行敕令2的时刻报错如下:

[ERROR] Error loading supplemental data models: String index out of range: -1

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

at java.lang.String.substring(String.java:1768)

at org.codehaus.classworlds.UrlUtils.normalizeUrlPath(UrlUtils.java:28)

at org.codehaus.classworlds.DefaultClassRealm.getResource(DefaultClassRe

alm.java:284)

at org.codehaus.classworlds.RealmClassLoader.getResource(RealmClassLoade

r.java:237)

at java.lang.ClassLoader.getResourceAsStream(ClassLoader.java:1159)

at org.codehaus.plexus.resource.loader.ThreadContextClasspathResourceLoa

der.getResourceAsInputStream(ThreadContextClasspathResourceLoader.java:56)

at org.codehaus.plexus.resource.DefaultResourceManager.getResourceAsInpu

tStream(DefaultResourceManager.java:77)

晕,换成

pluto-1.1.4-src.zip

多mvn install几回,好了

敕令3:D:\tool\pluto-1.1.6>mvn pluto:install -DinstallDir=D:/tool/tomcat6.0

pluto 1.1.4 的相关文件就被安装到 Tomcat 响应目录下

编辑 D:/tool/tomcat6.0/conf/tomcat-users.xml 文件,添加角色 pluto,并在该角色下新增一个用户,以下为示例文件:

启动TOMCAT报错如下:

Loading mapping descriptors from jar:file:/D:/tool/tomcat6.0/lib/pluto-descriptor-impl-1.1.4.jar!/org/apache/pluto/descriptors/services/castor/castor-portlet-xml-mapping.xml

java.lang.RuntimeException: Could not instantiate parser org.apache.xerces.parsers.SAXParser: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser

at org.exolab.castor.util.LocalConfiguration.getParser(LocalConfiguration.java:342)

at org.exolab.castor.util.LocalConfiguration.getParser(LocalConfiguration.java:273)

at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:714)

at org.castor.mapping.MappingUnmarshaller.loadMappingInternal(MappingUnmarshaller.java:215)

at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:124)

at org.castor.mapping.MappingUnmarshaller.getMappingLoader(MappingUnmarshaller.java:99)

at org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:526)

at org.exolab.castor.xml.Unmarshaller.(Unmarshaller.java:255)

没有找到

org.apache.xerces.parsers.SAXParser

在jar包xercesImpl.jar中

拷贝该jar包到tomcat下这个位置:

D:\tool\tomcat6.0\lib

再次启动,问题办理

造访地址http://localhost:8080/pluto/portal,可以打开迎接登岸页面

输入pluto / pluto 登岸成功

您可能还会对下面的文章感兴趣: