Re: portlet property

2005-01-20 Thread Marek Nowak
Thanks David, you helped me a lot. So I understand that for each instance of 
my HtmlPortlet I can have a set of preferences. So HtmlPortlet that is 
displayed as the first one at the page can have preference "file" set to 
"a.html", the same portlet that is displayed as the second one at the page 
can have preference "file" set to "b.html". Am I right?

I want to do something like this:
MyApplication :
- creates psml file (which contains 4 instances of HtmlPortlet)
- for each instance of portlet sets "file" preference to a proper value 
< How can I do this?

Regards
Marek

- Original Message - 
From: "David Sean Taylor" <[EMAIL PROTECTED]>
To: "Jetspeed Users List" 
Sent: Wednesday, January 19, 2005 7:21 PM
Subject: Re: portlet property


Marek Nowak wrote:
Hello
I want to write a portlet for Jetspeed2. This portlet should display a 
given html page. Let's call this portlet HtmlPortlet. I want to put 4 
portlets on my page, each of them should display a given page.


++
|  | |
|  | |
|  HtmlPortlet | HtmlPortlet |
|  | |
|displays a.html   |   displays b.html   |
|  | |
|  | |
++
|  | |
|  | |
|  HtmlPortlet | HtmlPortlet |
|  | |
|displays c.html   |   displays d.html   |
|  | |
|  | |
++

Does anybody know how to set an "myUrl" property of these portlets? Is it 
possible? I know that properties of portlets are stored in database, but 
I would like to set the property "myUrl" in a file. If it is impossible, 
maybe you know how to make my application to set this property in 
database for each portlet.

Regards
Marek
Think you mean preferences.
The storage method of preferences is up to the portal impl.
You shouldn't really be concerned with the details of how the portal 
stores preferences...

Are you looking for an external link or a local file? We already have a 
web content portlet for external links in Jetspeed-2.

For a local html file, I just took 5 minutes and wrote this portlet for 
you.
I guess I should commit it to Gems if Ken doesnt already have something 
like this.
---

package com.which.idtb.portlets;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.portlet.PortletConfig;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.PortletPreferences;
import org.apache.portals.bridges.common.GenericServletPortlet;
/*
 * Copyright 2000-2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 
implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * FilePortlet
 *
 * @author mailto:[EMAIL PROTECTED]">David Sean Taylor
 * @version $Id: $
 */
public class FilePortlet extends GenericServletPortlet
{
public void doView(RenderRequest request, RenderResponse response) 
throws PortletException, IOException
{
response.setContentType("text/html");
PortletPreferences prefs = request.getPreferences();
String fileName = prefs.getValue("file", null);
if (fileName != null)
{
InputStream is = 
this.getPortletContext().getResourceAsStream(fileName);
drain(is, response.getPortletOutputStream());
is.close();
}
else
{
response.getWriter().println("Could not find file preference 
");
}
}

static final int BLOCK_SIZE=4096;
public static void drain(InputStream r,OutputStream w) throws 
IOException
{
byte[] bytes=new byte[BLOCK_SIZE];
try
{
  int length=r.read(bytes);
  while(length!=-1)
  {
  if(length!=0)
  {
  w.write(bytes,0,length);
  }
  length=r.read(bytes);
  }
  }
  finally
  {
bytes=null;
  }

}
}


jetspeed problem deployement with spring framework

2005-01-20 Thread jean charles jabouille
Hi,

I deploy jetspeed2 under Jonas server and I have this erro 
"java.lang.StackOverflowError" when deploying the bean "AuthorizationProvider". 
Somoene have an idea?


thanks for your answers


jabouille jean charles




The trace:


org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.apache.jetspeed.security.AuthorizationProvider' defined in URL 
[file:/home/jabouijc/JONAS_4_1_4/work/webapps/jonas/jetspeed/WEB-INF/assembly/jetspeed-spring.xml]:
 Instantiation of bean failed; nested exception is 
org.springframework.beans.FatalBeanException: Could not instantiate class 
[org.apache.jetspeed.security.impl.AuthorizationProviderImpl]; constructor 
threw exception; nested exception is java.lang.StackOverflowError: null
org.springframework.beans.FatalBeanException: Could not instantiate class 
[org.apache.jetspeed.security.impl.AuthorizationProviderImpl]; constructor 
threw exception; nested exception is java.lang.StackOverflowError: null
java.lang.StackOverflowError
2005-01-20 13:51:49,514 : AbstractEngine.init : 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'org.apache.jetspeed.security.AuthorizationProvider' defined in URL 
[file:/home/jabouijc/JONAS_4_1_4/work/webapps/jonas/jetspeed/WEB-INF/assembly/jetspeed-spring.xml]:
 Instantiation of bean failed; nested exception is 
org.springframework.beans.FatalBeanException: Could not instantiate class 
[org.apache.jetspeed.security.impl.AuthorizationProviderImpl]; constructor 
threw exception; nested exception is java.lang.StackOverflowError: null
2005-01-20 13:51:49,516 : AbstractEngine.init : Finished starting Jetspeed 
Engine (org.apache.jetspeed.engine.SpringEngine) at 20/01/05 13:51.  Elapsed 
time: 32 seconds.
org.apache.jetspeed.exception.JetspeedException: Jetspeed Initialization 
exception!
at 
org.apache.jetspeed.engine.AbstractEngine.init(AbstractEngine.java:146)
at org.apache.jetspeed.Jetspeed.createEngine(Jetspeed.java:64)
at 
org.apache.jetspeed.engine.JetspeedServlet.init(JetspeedServlet.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:239)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at 
org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:268)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:157)
at 
org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:110)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1024)
at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:862)
at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4013)
at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4357)
at 
org.objectweb.jonas.web.catalina50.JOnASStandardContext.start(JOnASStandardContext.java:221)
at 
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
at 
org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:121)
at 
org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at 
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
at 
org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doRegisterWar(CatalinaJWebContainerServiceImpl.java:522)
at 
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.registerWar(AbsJWebContainerServiceImpl.java:797)
at 
org.objectweb.jonas.web.AbsJWebContainerServiceImpl.doStart(AbsJWebContainerServiceImpl.java:367)
at 
org.objectweb.jonas.web.catalina50.CatalinaJWebContainerServiceImpl.doStart(CatalinaJWebContainerServiceImpl.java:258)
at 
org.objectweb.jonas.service.AbsServiceImpl.start(AbsServiceImpl.java:80)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.invoke(CatalinaJWebContainerServiceWrapper.java:156)
at 
org.objectweb.jonas.web.wrapper.CatalinaJWebContainerServiceWrapper.start(Ca

Re: Jetspeed 2 question

2005-01-20 Thread mike long
[EMAIL PROTECTED] wrote:
Thank you.  I did notice that before, and it seems to
only let me move portlets around.  I logged in as an
administrator and I see "Position" above every portlet 
with two, three arrows to allow me to move them around.
However I did not see where to add them.  Is this what
you meant by the customizer?

-Original Message-
From: Archana Turaga
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 19, 2005 3:33 PM
To: Jetspeed Users List
Subject: RE: Jetspeed 2 question

You can add a new portlet by using the customiser...if
you login in as admin, Jetspeed...you should see small
pencil icons..which when clicked will take you to a
customizer.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 12:50 PM
To: jetspeed-user@jakarta.apache.org
Subject: Jetspeed 2 question
Hi,
I installed Jetspeed 2 and build my first portlet. 
However I had to modify the PSML file to make my
portlet appear.

This is more of a beginner question and would
appreciate an answer...
I would like to know if the PSML can be modified by a
graphic tool to add new portlet on a page, remove one,
etc?  Something like an administrative portlet?
Evian
-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]

-
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

The Jetspeed-2 customizer is not currently available. As you noticed, 
you  can move portlets around but you cannot add new ones. To add new 
portlets you need to drop the war into Tomcat and then add your portlet 
to the PSML file. I have seen indications on this mailing list that the 
customizer is coming soon.  But I don't know when.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Deployment of context.xml in META-INF not done

2005-01-20 Thread Randy Watler
Xavier,

If you are speaking of J2, try "META_INF/tomcat-context.xml".

Randy 

-Original Message-
From: Xavier Lawrence
To: Jetspeed Users List
Sent: 1/20/05 3:13 AM
Subject: Deployment of context.xml in META-INF not done

Hello,

I am using a context.xml file in my wars. It is naturally put in the
META-INF directory and pacakged with the war file.

When Jetspeed deploys the war, it does not copy the context.xml file
into
the tomcat5/conf/catalina/localhost directory, so the context I specify
is
not available to my webApp. If I copy by hand that context.xml file in
the
above directory, everything works fine...

Is this a known issus ?  I beleive Jetspeed only has to copy the context
file once the deployment has been sucessful. (Note that in my case,
everything goes fine at deployment time, so it looks to me like that the
jetspeed deployer "forgets" to copy the files in the META-INF directory
to
the appropriate tomcat folder).

Xavier


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How to get Session in portlet

2005-01-20 Thread LaCasse, John
This sound very similar to the following issue that I posted on the
Pluto mailing list when I didn't get a response on this one.

I'm assuming you're using Tomcat. This is apparently a Tomcat issue. I
had to upgrade to Tomcat 5.5.4 and make the following change to
conf/server.xml

Added the attribute emptySessionPath="true" to the following tag:






Probably because of the following issue:

http://issues.apache.org/jira/browse/PLUTO-53

It turns out this is actually a problem with most servlet containers. To

date it looks like the only platform this functionality works on is 
Tomcat 5.5

-Eric Dalquist

LaCasse, John wrote:

> It is my understanding from the JSR168 spec that all application
> scoped attributes should be accessible from the HttpSession object. 
> When I redirect to a regular jsp page via a link on a portlet, the 
> HttpSession object in that JSP isn't carrying the attributes that are 
> in the Application scoped PortletSession. Based on other responses 
> from the Jetspeed mailing list I've gotten; I want to be clear that 
> because I'm redirecting via a link or a response.sendRedirect that the

> PortletSession attribute does not exist in the request attributes. 
> Because of this it is very difficult if not impossible to communicate 
> data between portlets and there supporting jsp's or servlets. I don't 
> have this issue in Weblogic or WebSphere; in both those containers the

> PortletSession attributes are accessible via the standard HttpSession.

> Am I missing something or is there some configuration that needs to 
> take place?
>
> Thanks for any help on this,
>
> Jpl
>


-Original Message-
From: Amit Soni [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, January 18, 2005 4:27 AM
To: jetspeed-user@jakarta.apache.org
Subject: How to get Session in portlet

Hi all,

Here i have problem to get session which i have set in servlet and want
to get this session in portlet...

here i have made on file call login.jsp which has acton security

then i modify jetspeed's  web.xml lik ::



jetspeed
org.apache.turbine.Turbine

properties

WEB-INF/conf/TurbineResources.properties


resources
   
org.apache.jetspeed.services.resources.JetspeedResourceServ
ice


logging
   
org.apache.jetspeed.services.logging.JetspeedLoggingService


1



 
controller
   
com.netcore.sso.controller.SSOController
 
 
   controller
  /security
  



   jetspeed
   /portal/*


   jetspeed
   /jetspeed/*




now in controller servlet i set my session and give redirection like ::

String url = "/portal?action=JLoginUser&username="+userName+
 "&password="+password;

getServletContext().getRequestDispatcher(res.encodeRedirectURL(url)).inc
lude(req,res);


and in my class i write 

session = data.getRequest().getSession();

session.getAttribute("session_name");

But it gives me null;;

so any one of u have idea for this then pls help me..

Regards,
Amit





--
Netcore's New Website
http://www.netcore.co.in
--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: paid Support for Jetspeed 2

2005-01-20 Thread Bharat Nagwani
I am looking for Technical Support, Training, Consulting etc.

Basically if there are any major issues, what is your approach for
resolving it, turnaround time etc?

Also when is the first commercial release expected?

Thanks much

-Original Message-
From: Ate Douma [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 19, 2005 1:31 PM
To: Jetspeed Users List
Subject: Re: paid Support for Jetspeed 2

Possibly yes.

I myself and several, if not most, of the other Jetspeed(-2) committers
are professional consultants
not only working on Jetspeed(-2) for the greater benefit of all but also
during their paid
jobs and contracts.

You have to be more specific though I think to get a positive response.
A lot of us are already cramped in work ;-)


Bharat Nagwani wrote:
> Hi,
> 
>  
> 
> Is it possible to get paid support for jetspeed-2?
> 
>  
> 
> thanks
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



disable max/min buttons

2005-01-20 Thread Carlos Ortiz
Hi all,

 I'm just browsing through jetspeed2, is there anyway that I can disable the
max/min buttons or configure them not to be shown?

Thanks,

Carlos.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: disable max/min buttons

2005-01-20 Thread Randy Watler
Carlos,
In an individual portlet or globally?
Randy
Carlos Ortiz wrote:
Hi all,
I'm just browsing through jetspeed2, is there anyway that I can disable the
max/min buttons or configure them not to be shown?
Thanks,
Carlos.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Seeking company/developer for web site development

2005-01-20 Thread Peter Dunn
Hello,

We are looking for a company/developer for developing our non-profit's
web site.  Our organization's mission is to bring high quality news
and information from around the web to the public.  

We were part-way through developing the site and the developer at the
two-person company we hired to do it recently left to work at another
company.  As a result, the project is basically stalled, and we are
looking to find a company/developer to either assist with the project
or take it over completely.

If you are interested, we would be interested to hear about your
skills, experience and portfolio - particularly with Jetspeed 1 and
Java in general.

We are also happy to tell you more about our project.  You can read
more about it and also see a mockup of what the front page of the site
will look like at this link - http://www.dailys.info/.

Besides placing emphasis on accuracy, fairness, depth and context in
the stories we include, the Daily Source will be oriented towards
making the world a better place by focusing on important topics and
constructive themes.  We aim to attract a large audience over time,
and think the site will be a feather in the cap of the company that
develops it.

You can see the original RFP and working mockups of what we call the
Reviewed Content Area and the Publishing Area at this link -
http://dailys.info/workingmockups/?N=D.  There are several other
supporting documents that I can send later on, and we can also let you
view the current state of the site online.

Also, if you are not interested in this, yet know someone else who
might be - we would appreciate it if you either email us their contact
information or forward this to them.

Thanks and we look forward to hearing from you,

Peter Dunn

The Daily Source Limited
25 Stearns Rd. #2
Watertown, MA 02472
617-501-0516
[EMAIL PROTECTED]

p.s.  our current vendor is open to either having another company take
over the project entirely or work in tandem with him on it - in which
case he could either play an active day-to-day role or a smaller
consulting type of role.

p.p.s.  dailys.info is a temporary domain - we eventually will use
another, as we already own dailysource.org and other domains.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: disable max/min buttons

2005-01-20 Thread Carlos Ortiz

individual

-Original Message-
From: Randy Watler [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 20, 2005 1:19 PM
To: Jetspeed Users List
Subject: Re: disable max/min buttons

Carlos,

In an individual portlet or globally?

Randy

Carlos Ortiz wrote:

>Hi all,
>
> I'm just browsing through jetspeed2, is there anyway that I can disable
the
>max/min buttons or configure them not to be shown?
>
>Thanks,
>
>Carlos.
>
>
>
>-
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
>  
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: IDE for Portlets?

2005-01-20 Thread Adrian Nadeau
Hello,

We are currently using Eclipse 2.1.1 with the Pluto Plugin
(http://plutoeclipse.sourceforge.net/) and Tomcat 4.1.x.  Things seem to be
working quite well for developing Portlets and then exporting them to
Tomcat.  We are new to Ant... and would like to find out if anyone could
direct us to a resource on how to create a build.xml file so that when we
are ready to deploy our Portlets to Jetspeed 2 we can create a war file (our
portlet) and drop it in to the Jetspeed deploy folder?  Any help would be
great, thank you.

Adrian

-Original Message-
From: Aleksandr Vushkan [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 19, 2005 8:03 PM
To: Jetspeed Users List; [EMAIL PROTECTED]
Subject: Re: IDE for Portlets?


Adrian Nadeau <[EMAIL PROTECTED]> wrote  Wed, Jan 19, 2005 at
07:56:10PM -0400,Adrian Nadeau, To Aleksandr Vushkan :
> Thanks for the update.  We've been looking at Eclipse.  Is it possible to
> actually test portlets inside of Eclipse?  Is there a special plugin for
> this?  I'd love to use Eclipse if we can figure out the process.
>
> Also, I'm a bit new to Ant, is there somewhere to find a build.xml file
for
> creating .war files?  Thanks for any information.
I'll send my build.xml file to you tomorrow.
>
> Adrian
>
> -Original Message-
> From: Aleksandr Vushkan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 19, 2005 6:51 PM
> To: Jetspeed Users List; [EMAIL PROTECTED]
> Subject: Re: IDE for Portlets?
>
>
> Adrian Nadeau <[EMAIL PROTECTED]> wrote  Wed, Jan 19, 2005 at
> 06:33:44PM -0400,Adrian Nadeau, To jetspeed-user@jakarta.apache.org :
> > Is anyone aware of any Java IDE's out there that have good support for
> > developing, testing and deploying JSR 168 Portlets?  Open Source would
be
> > preferred although not necessary?  Thank you.
> I use Eclipse + Ant. But I'm beginner...:)
>
> --
> С Уважением, Александр Вушкан
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

--
С Уважением, Александр Вушкан

"Great minds discuss ideas. Average minds discuss events. Small minds
discuss
people."  - Admiral Hyman Rickover


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]