You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Frank Villarreal <f_...@tetco.com> on 2005/02/09 22:05:31 UTC

Changing the webapp context on J2

Hello all,

I feel silly having to ask this, but this simple task hasn't been as
straight-forward as I would like ....

How do you give Jetspeed2 a new webapp context (instead of the default
"/jetspeed").

Here is what I've already tried ...

1) renamed "${tomcat_home}/webapps/jetspeed" to
"${tomcat_home}/webapps/mysite"
2) renamed path & docBase attributes in
"${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
"mysite" respectively ...
3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
table to "/mysite" for the record previously named "/jetspeed"
4) renamed the mapping for the jetspeed servlet in
"${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...

    <servlet-mapping>
       <servlet-name>jetspeed</servlet-name>
       <url-pattern>/mysite/*</url-pattern>
    </servlet-mapping>


Only after performing all 4 steps above was I able to view the portal in the
"/mysite" context (at least the decorators and layouts) .... BUTTTT ... one
thing is still vomiting on me ... my portlets all render as "Portlet is not
available: null Reason: null" without providing meaningful clues as to why
in the logs (seems my portletDefinition objects are all null) ... hence my
email, does anyone know why??? (Seems like I must be missing a setting
somewhere).

I'm so close, yet soooo far away .... :-(

- Frank


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


AW: Changing the webapp context on J2

Posted by Sven Thiergen <s....@itcampus.de>.
> OK ... got it!
>
> In order to change the default context in Jetspeed2 ... I still had to
take
> all the steps I outlined in my previous email (see below), but I had to
> perform them immediately after running Maven's "quickStart" task.
> Apparently, J2 does some type of initialization that "hard-codes" the
> context into the database ...

Indeed J2 does this! I had the problem that my own, Struts-based portlet
simply did not show any contents when I deployed it the first time. (I only
could see the Portlet title and the maximize/minimize etc. icons). The
JPetstore portlet (Struts-based, too), however showed content and I could
not see any differences between both of them, until ...

I looked at the database! J2 stores a lot of portlet and other information
here, so initialization, once done for a Portlet is only done in a "reduced"
manner on each following startup. That at least is my impression so far. It
helps, to run the Maven "quickStart" task, which - besides other tasks -
clears the database and refills the initial values. You may as well extract
the appropriate SQL scripts for your database and run them manually.


> in a place/manner I haven't yet identified for the
> portlets.  This happens the very first time you start-up J2.  So, the
moral
> of the story ... make your context change before you start J2 for the very
> first time ... or else, you're up the proverbial creek! ;-)

Apparently my own Portlet was not made up correctly in the first place, when
J2 registered it in the database and after correcting the mistakes it wasn't
re-initialized correctly, 'cause J2 finds some information in the database
and "skips initial deployment" (-> this you see in the "Logs").

Cleaning and reinitializing the database could solve you're webapp context
problem, too. Though it is a rather bad solution. Maybe one can find the
tables and fields that need to be cleared, to make J2 startup the next time
from scratch.

Sven.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: Changing the webapp context on J2

Posted by Frank Villarreal <f_...@tetco.com>.
OK ... got it!

In order to change the default context in Jetspeed2 ... I still had to take
all the steps I outlined in my previous email (see below), but I had to
perform them immediately after running Maven's "quickStart" task.
Apparently, J2 does some type of initialization that "hard-codes" the
context into the database in a place/manner I haven't yet identified for the
portlets.  This happens the very first time you start-up J2.  So, the moral
of the story ... make your context change before you start J2 for the very
first time ... or else, you're up the proverbial creek! ;-)


- Frank

-----Original Message-----
From: Frank Villarreal [mailto:f_villarreal@tetco.com]
Sent: Thursday, February 10, 2005 09:14 AM
To: Jetspeed Users List
Subject: RE: Changing the webapp context on J2


Thanks for the info Chris.  This is a real bummer, kinda need this soon ...
like I said, I'm real close to making it work.  I'm able to page through the
site in my new context and see all my portlet "placeholders", but their
content all comes up "Reason: null".  I'll keep trying and post to this list
if I figure out how to get it done ... this is definately some type of
initialization issue.

- Frank

-----Original Message-----
From: Chris Custine [mailto:chris.custine@gmail.com]
Sent: Wednesday, February 09, 2005 09:17 PM
To: Jetspeed Users List
Subject: Re: Changing the webapp context on J2


You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
>
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
>
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
>
> Here is what I've already tried ...
>
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
>
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
>
> Only after performing all 4 steps above was I able to view the portal in
the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ...
one
> thing is still vomiting on me ... my portlets all render as "Portlet is
not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
>
> I'm so close, yet soooo far away .... :-(
>
> - Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


RE: Changing the webapp context on J2

Posted by Frank Villarreal <f_...@tetco.com>.
Thanks for the info Chris.  This is a real bummer, kinda need this soon ...
like I said, I'm real close to making it work.  I'm able to page through the
site in my new context and see all my portlet "placeholders", but their
content all comes up "Reason: null".  I'll keep trying and post to this list
if I figure out how to get it done ... this is definately some type of
initialization issue.

- Frank

-----Original Message-----
From: Chris Custine [mailto:chris.custine@gmail.com]
Sent: Wednesday, February 09, 2005 09:17 PM
To: Jetspeed Users List
Subject: Re: Changing the webapp context on J2


You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
>
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
>
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
>
> Here is what I've already tried ...
>
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
>
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
>
> Only after performing all 4 steps above was I able to view the portal in
the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ...
one
> thing is still vomiting on me ... my portlets all render as "Portlet is
not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
>
> I'm so close, yet soooo far away .... :-(
>
> - Frank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org


Re: Changing the webapp context on J2

Posted by Chris Custine <ch...@gmail.com>.
You aren't the only one looking forward to this  ;-)  This has come up
several times on the list in the past few months, but apparently this
is not a trivial task, and I believe it currently requires some
re-work to the core JS2 codebase.  Unless I am mistaken, I don't think
this has been fully implemented yet.

Chris


On Wed, 9 Feb 2005 15:05:31 -0600, Frank Villarreal
<f_...@tetco.com> wrote:
> Hello all,
> 
> I feel silly having to ask this, but this simple task hasn't been as
> straight-forward as I would like ....
> 
> How do you give Jetspeed2 a new webapp context (instead of the default
> "/jetspeed").
> 
> Here is what I've already tried ...
> 
> 1) renamed "${tomcat_home}/webapps/jetspeed" to
> "${tomcat_home}/webapps/mysite"
> 2) renamed path & docBase attributes in
> "${tomcat_home}\conf\Catalina\localhost\jetspeed.xml" to "/mysite" and
> "mysite" respectively ...
> 3) renamed the value of the CONTEXT_ROOT field in the "WEB_APPLICATION"
> table to "/mysite" for the record previously named "/jetspeed"
> 4) renamed the mapping for the jetspeed servlet in
> "${tomcat_home}\webapps\mysite\WEB-INF\web.xml" as follows ...
> 
>     <servlet-mapping>
>        <servlet-name>jetspeed</servlet-name>
>        <url-pattern>/mysite/*</url-pattern>
>     </servlet-mapping>
> 
> Only after performing all 4 steps above was I able to view the portal in the
> "/mysite" context (at least the decorators and layouts) .... BUTTTT ... one
> thing is still vomiting on me ... my portlets all render as "Portlet is not
> available: null Reason: null" without providing meaningful clues as to why
> in the logs (seems my portletDefinition objects are all null) ... hence my
> email, does anyone know why??? (Seems like I must be missing a setting
> somewhere).
> 
> I'm so close, yet soooo far away .... :-(
> 
> - Frank
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-user-help@jakarta.apache.org