You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by Michael Blum <bl...@apache.org> on 2004/05/12 09:59:27 UTC
Re: Useing Pluto within Jboss
I will help and fix it accordingly, even I still think a more
configurable solution would be best. I would like to have a setting in
a property file, e.g. in
pluto/WEB-INF/config/services/PortletDefinitionRegistryService.properties
to be edited by a JBOSS administrator.
Michael
Arne v.Irmer wrote:
> Hi Micheal, hi Daniel,
> I have to run pluto in JBoss 3.2.3. Thanks for the patch in
> jakarta-pluto/portal/src/java/org/apache/pluto/portalImpl/services/portletdefinitionregistry/PortletDefinitionRegistryServiceFileImpl.java
>
> But even with the new version 1.4 of the source pluto does not run
> within JBoss. I found out that, with a small change the intended
> algorithm will work.
>
> In line 174 you initialize
> TMP_PREFIX = "tmp12354"
> and compare it with the beginning of the name of the webmodule
> webModule.startsWith(TMP_PREFIX)
> in my case webModule has the value "tmp15263testsuite.war" to do the
> things work change it to
> TMP_PREFIX.substring(0,3)
>
> Here the whole method :
>
> private String resolveURI(String webModule)
> {
> // For JBoss compatibility, change webModule from the form
> // of "tmp12345foo.war" to "foo".
> int len = webModule.length();
> if (webModule.endsWith(WAR_FILE_EXT) &&
> webModule.startsWith(TMP_PREFIX.substring(0,3)) && len >
> TMP_PREFIX.length() + WAR_FILE_EXT.length()) {
> webModule = webModule.substring(TMP_PREFIX.length(), len -
> WAR_FILE_EXT.length());
>
> }
> // else assumed literal.
> return webModule;
> }
>
> Yours
> Arne v.Irmer