Re: File Upload

2005-02-01 Thread Alan Chiang
http://64.233.167.104/search?q=cache:c-b-JjQJntcJ:www.mail-archive.com/jetspeed-user%40jakarta.apache.org/msg10114.html+commons+fileupload+portlet+tutorialhl=en

Grabbed this from the Jetspeed archives; the classes are deprecated,
but it has thus far worked for me on J1.6.

Hope this helps!

Alan

On Mon, 31 Jan 2005 18:59:14 -0300, Carlos Torres [EMAIL PROTECTED] wrote:
 Hello all,
 
 Anybody made a page(portlet) with file upload using JetSpeed 1.5 ?
 
 Please help me.
 
 Thanks.
 
 Carlos Torres
 
 


-- 
Calling Canadian beef unsafe is like calling your twin sister ugly
~ Mark Dopp

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



Re: File Upload

2005-02-01 Thread Alan Chiang
I pretty much followed the instructions in the link I sent you.  I
created a JSP page with a form, and used Turbine's parameter parser to
snag the FileItem.

If you read the FileItem's api, its very easy to use.  I just call a
write on the FileItem when I can confirm its all good.

Don't be afraid to read the API's, they can help you immensely.

I haven't converted my portlet to use commons-upload (or whatever its called) 

Alan


On Mon, 31 Jan 2005 19:07:17 -0300, Carlos Torres [EMAIL PROTECTED] wrote:
 Can you explain how you did it? Which classes you used, if any change was
 necessary.
 
 Thanks.
 
 - Original Message -
 From: [EMAIL PROTECTED]
 To: 'Jetspeed Users List' jetspeed-user@jakarta.apache.org
 Sent: Monday, January 31, 2005 6:02 PM
 Subject: AW: File Upload
 
 Yeah, I did it ;)
 
 -Ursprüngliche Nachricht-
 Von: Carlos Torres [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 31. Januar 2005 22:59
 An: Apache JetSpeed User; Apache JetSpeed Dev
 Betreff: File Upload
 
 
 Hello all,
 
 Anybody made a page(portlet) with file upload using JetSpeed 1.5 ?
 
 Please help me.
 
 Thanks.
 
 Carlos Torres
 
 
 -
 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]
 
 


-- 
Calling Canadian beef unsafe is like calling your twin sister ugly
~ Mark Dopp

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



Returning binary data through portlet

2005-01-14 Thread Alan Chiang
Hi all,
  Wondering if anyone knows how to get a portlet to return binary
data, or get Jetspeed to return binary data.  I have a JSP that reads
files for download, coupled with the JSP portlet, but any data
returned seems to be intercepted and interpreted as text and is dumped
to the portlet window.

  All the response headers have been correctly set and this JSP works
outside of the portlet;
so either the response headers are being swallowed, or the data is
being converted.  Any quick and dirty way to get files to download
through portlets?

Thanks
-- 
Calling Canadian beef unsafe is like calling your twin sister ugly
~ Mark Dopp

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



HttpServletRequest and Response items for portlet

2004-12-13 Thread Alan Chiang
Hi all,
  I've been trying to get an upload portlet working with Jetspeed for
a while now, and I have a question about the Request and Response
items returned from RunData.

  I have a simple servlet that uses the O'Reilly upload servlet, and
it works fine with tomcat 5.0.28, and through Apache with mod_jk2. 
The problem is when I try to call the servlet from within a portlet;
it throws a premature ending exception.

  I have also tried to use commons fileupload, and I get a:

org.apache.commons.fileupload.FileUploadBase$InvalidContentTypeException:
the request doesn't contain a multipart/form-data or
 multipart/mixed stream, content type header is null

when I try to pass the request object retreived from RunData. 

I've got a JSP form that has simple file browse and submit items that
calls the associated JSP action class, which I know is being called
from the logs.

Am I doing something wrong? It seems to be that the request obtained
from RunData doesn't contain the request object I thought I wanted to
get.  Where is the servlet request that is associated with the
portlet?

Thanks in advance

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



JSR-168 portlet problem

2004-12-10 Thread Alan Chiang
Hi,
  I'm getting this stack trace when attempting to deploy what I
believe to be a JSR-168 portlet.

org.apache.jetspeed.pipeline.PipelineException:
org.apache.jetspeed.aggregator.FailedToRenderFragmentException: Unable
to render fragment because: javax.portlet.PortletException: Failed to
find Servlet context for Portlet Application: /rdq-portlet at
org.apache.jetspeed.aggregator.PortletValve.invoke(PortletValve.java:50)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)
at org.apache.jetspeed.container.ContainerValve.invoke(ContainerValve.java:76)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)
at 
org.apache.jetspeed.fusion.security.impl.FusionSecurityValveImpl.invoke(FusionSecurityValveImpl.java:73)
at 
org.apache.jetspeed.pipeline.JetspeedPipeline.invokeNext(JetspeedPipeline.java:209)
at 
org.apache.jetspeed.capabilities.impl.CapabilityValveImpl.invoke(CapabilityValveImpl.java:137)
---snip-
Caused by: javax.portlet.PortletException: Failed to find Servlet
context for Portlet Application: /rdq-portlet at
org.apache.jetspeed.container.invoker.ServletPortletInvoker.invoke(ServletPortletInvoker.java:184)
at 
org.apache.jetspeed.container.invoker.ServletPortletInvoker.render(ServletPortletInvoker.java:124)
at 
org.apache.pluto.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:103)
at 
org.apache.jetspeed.container.JetspeedPortletContainerWrapper.renderPortlet(JetspeedPortletContainerWrapper.java:88)
at 
org.apache.jetspeed.aggregator.impl.PortletRendererImpl.renderNow(PortletRendererImpl.java:110)
... 164 more

The portlet is the one found in Building Portals with the Java Portlet
API book by Jeff Linwooed and Dave Minter.  It's a simple one:

---FirstPortlet.java--

package ca.bell.rdq.portlets.test;

import java.io.IOException;
import java.io.Writer;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;

public class TestFirstPortlet extends GenericPortlet {

protected void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {

response.setContentType(text/html);
Writer writer = response.getWriter();
writer.write(Finally it working!);


}

}
---web.xml---
?xml version=1.0 encoding=UTF-8?
!DOCTYPE webapp PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN

http://java.sun.com/dtd/web-app_2_3.dtd;
web-app
display-nameFirst Portlet/display-name
descriptionThe test portlet/description
/web-app


---portlet.xml
?xml version=1.0 encoding=UTF-8?
portlet-app xmlns=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd;
version=1.0 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

xsi:schemaLocation=http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd;
portlet
description First Portlet for the Apress Portlet 
book/description
portlet-nameFirstPortlet/portlet-name
display-nameFirst Portlet/display-name

portlet-classcom.portalbook.portlets.FirstPortlet/portlet-class
expiration-cache-1/expiration-cache
supports
mime-typetext/html/mime-type
portlet-modeVIEW/portlet-mode
/supports
portlet-info
titleFirst Portlet/title
short-title1st Portlet/short-title
keywordsFirst, Portlet/keywords
/portlet-info
/portlet
/portlet-app

There was another email regarding this subject, but there was no
answer to the person's question.

Any help is appreciated

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



LateInitCastorRegistryService

2004-11-24 Thread Alan Chiang
Hi,
  I'm having a problem where Jetspeed 1.6 dev craps out after tomcat
is reloaded, stopped and/or started multiple times.  This also happens
when I use Tomcat's manager to reload, stop and start Jetspeed
multiple times

Using J2 pre_portalurl_refactor_20041015, Jetspeed 1.6 Fusion as of
Nov 5, JDK 1.4.2_05b4, Tomcat 5.0.28

This shows up on the main page:
 org.apache.turbine.services.InstantiationException: Service Registry
failed to initialize
...
org.apache.turbine.services.InitializationException: Unable to
initialize LateInitCastorRegistryService, missing config keys
at 
org.apache.jetspeed.services.registry.LateInitCastorRegistryService.init(LateInitCastorRegistryService.java:368)
at 
org.apache.turbine.services.BaseServiceBroker.getService(BaseServiceBroker.java:304)
rethrown as org.apache.turbine.services.InstantiationException:
Service Registry failed to initialize
at 
org.apache.turbine.services.BaseServiceBroker.getService(BaseServiceBroker.java:322)
at org.apache.jetspeed.services.Registry.getService(Registry.java:63)
at org.apache.jetspeed.services.Registry.get(Registry.java:81)

...

I have tried looking through Jira and Bugzilla, and I can't find a
solution to this issue.  I don't want to have to rebuild the war every
time because I lose all the configurations I made.

There is also the outstanding issue of Fusion stack traces in the logs:

jetspeed-2.log:
 ERROR org.apache.jetspeed.engine.AbstractEngine -
org.springframework.beans.factory.BeanDefinitionStoreExcepti
on: Error registering bean with name 'PortalServices' defined in URL
[file:/jakarta-tomcat-5.0.28/webapps/rdqportal/WEB-INF/conf/assembly/jetspeed-spring.xml]
: Bean class [org.apache.jetspeed.services.JetspeedPortletServices]
not found; nested exception is java.lang.ClassNotFoundException:
org.apache.jetspeed.servi
ces.JetspeedPortletServices

And a crap load of Fusion Engine failed in the rest of the logs

Any help is appreciated.

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



Re: jdbc driver error

2004-11-10 Thread Alan Chiang
Perhaps Maven doesn't like spaces (eg Program Files).  Perhaps you
should also try adding it in your class path.

AC


On Wed, 10 Nov 2004 05:46:24 -0800 (PST), nafise hassani
[EMAIL PROTECTED] wrote:
 I really don'nt know why maven can't find my mysql driver
 I put this driver in these palces:%user.home% and also in D:\Program 
 Files\maven-1.0\lib\mysql-connector-java-3.0.10-stable-bin.jar
 
 my pc belongs to a local network with proxy server url=192.168.0.1
 and mysql server run on anoyher pc with url=192.168.0.120
 ***my build.properties :
 
 # jetspeed 2 home required for build
 org.apache.jetspeed.project.home = D:\Program Files\jakarta-jetspeed-2
 # jetspeed required properties
 org.apache.jetspeed.server.home = D:\Program Files\tomcat5.0
 org.apache.jetspeed.catalina.version.major = 5
 org.apache.jetspeed.server.shared = 
 ${org.apache.jetspeed.server.home}/shared/lib
 org.apache.jetspeed.deploy.war.dir = 
 ${org.apache.jetspeed.server.home}/webapps
 org.apache.jetspeed.services.autodeployment.user = j2deployer
 org.apache.jetspeed.services.autodeployment.password = j2deployer
 # jetspeed db build properties example for Hsqldb
 # Override the database connection and driverproperties in your
 ${USER_HOME}/build.properties appropriately
 # See:
 # http://portals.apache.org/jetspeed-2/database.html
 #org.apache.jetspeed.test.database.default.name=mysql
 org.apache.jetspeed.test.database.url = jdbc:mysql://192.168.0.120:3306/j2test
 org.apache.jetspeed.test.database.driver = com.mysql.jdbc.driver
 org.apache.jetspeed.test.database.user =root
 org.apache.jetspeed.test.database.password =
 org.apache.jetspeed.test.jdbc.drivers.path=D:\Program
 Files\maven-1.0\lib\mysql-connector-java-3.0.10-stable-bin.jar
 org.apache.jetspeed.test.database.default.name=mysql
 #org.apache.jetspeed.test.database.ojb.platform=Hsqldb
 org.apache.jetspeed.production.database.url = 
 jdbc:mysql://192.168.0.120:3306/j2
 org.apache.jetspeed.production.database.driver = com.mysql.jdbc.driver
 org.apache.jetspeed.production.database.user =root
 org.apache.jetspeed.production.database.password =
 org.apache.jetspeed.production.jdbc.drivers.path=D:\Program
 Files\maven-1.0\lib\mysql-connector-java-3.0.10-stable-bin.jar
 org.apache.jetspeed.production.database.default.name=mysql
 #org.apache.jetspeed.production.database.ojb.platform=Hsqldb
 maven.proxy.host=192.168.0.1
 maven.proxy.port=4480
 org.apache.jetspeed.fusion=true
 
 **what I get:
 
 D:\Program Files\jakarta-jetspeed-2maven db.execute
  __  __
 |  \/  |__ _Apache__ ___
 | |\/| / _` \ V / -_) ' \  ~ intelligent projects ~
 |_|  |_\__,_|\_/\___|_||_|  v. 1.0
 
 BUILD FAILED
 File.. D:\Program Files\jakarta-jetspeed-2\maven.xml
 Element... sql
 Line.. 355
 Column 39
 Class Not Found: JDBC driver  could not be loaded
 Total time: 3 seconds
 Finished at: Wed Nov 10 17:04:59 IRST 2004
 
 any suggestion???
 
 
 -
 Do you Yahoo!?
  Check out the new Yahoo! Front Page. www.yahoo.com


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



Jetspeed-spring.xml problem: portletFactoryProxy unsatisfied dependency

2004-11-09 Thread Alan Chiang
Hi,
  has anyone encountered this error? It's similar to the ones in the
jetspeed-dev archive (see   jetspeed fusion running with
org.springframework.beans.factory.UnsatisfiedDependencyException),
but I'm not sure how to solve this.  I'm running J2
pre-portalurl_refactor... and the head from J1 as of Nov 5

Thanks for any help you can provide



2004-11-09 11:35:09,656 [http-8080-Processor22] ERROR
org.apache.jetspeed.engine.AbstractEngine -
org.springframework.beans.factory.UnsatisfiedDependencyExcep
tion: Error creating bean with name 'portletFactoryProxy' defined in
URL 
[file:/jakarta-tomcat-5.0.27/webapps/jetspeed/WEB-INF/conf/assembly/jetspeed-spring.x
ml]: Unsatisfied dependency expressed through constructor argument
with index 0 of type [org.apache.jetspeed.factory.PortletFactory]: Did
you specify the corr
ect bean references as generic constructor arguments?
2004-11-09 11:35:09,668 [http-8080-Processor22] ERROR
org.apache.jetspeed.Jetspeed - Unable to create Engine
org.apache.jetspeed.exception.JetspeedException: Jetspeed
Initialization exception!
at 
org.apache.jetspeed.engine.AbstractEngine.init(AbstractEngine.java:154)
at org.apache.jetspeed.Jetspeed.createEngine(Jetspeed.java:64)
at 
org.apache.jetspeed.fusion.services.fusion.FusionServiceImpl.startFusion(FusionServiceImpl.java:154)
at 
org.apache.jetspeed.fusion.services.fusion.FusionServiceImpl.init(FusionServiceImpl.java:96)
at 
org.apache.turbine.services.TurbineBaseService.init(TurbineBaseService.java:108)
at 
org.apache.turbine.services.BaseInitableBroker.initClass(BaseInitableBroker.java:149)
at 
org.apache.turbine.services.BaseServiceBroker.doInitService(BaseServiceBroker.java:224)
at 
org.apache.turbine.services.BaseServiceBroker.initServices(BaseServiceBroker.java:193)
at org.apache.turbine.Turbine.init(Turbine.java:257)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
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.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.java:830)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:991)
at 
org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
at 
org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:530)
at 
org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:104)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

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



FusionAccessController: Null pointer exception in j1.6

2004-11-06 Thread Alan Chiang
Hi,
  I'm getting this error using j2 pre_portalurl_refactor_20041015 and
J1.6 Head as of nov 5, 2004.


2004-11-06 13:12:45,316 [TP-Processor3] ERROR FusionAccessController -
error in fusion access controller
java.lang.NullPointerException
at org.apache.jetspeed.Jetspeed.getComponentManager(Jetspeed.java:139)
at 
org.apache.jetspeed.fusion.modules.actions.FusionAccessController.doPerform(FusionAccessController.java:90)
at org.apache.turbine.modules.Action.perform(Action.java:87) 
 etc etc

Is there a quick and easy way to solve this?  I have used mail-archive
to search, but it does not return results for this problem after June
or July 2004

Thanks

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



Using Jetspeed's Torque service

2004-11-04 Thread Alan Chiang
Hi,
  I'm trying to create a portlet with the assistance of Torque.  I've
created a new Action class for a Velocity portlet, and I've created a
new set of Torque OM's for my database.  The Torque OM's are generated
properlly, but when I go to import the OM's and try to perform a
doSelect, it doesn't seem to work; the velocity template doesn't
appear with any information from my Action class.

I have tried to trace back the GroupBrowser and mimic that
(TurbineGroupManagement) and I see no reference to Torque.init or what
not.  Can someone please point me in the right direction to get a
Torque connection going?

Thanks.

AC

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



Re: Problem building Jetspeed 1.5 war

2004-10-27 Thread Alan Chiang
Add -Dmaven.test.skip=true ?

You can also add maven.test.ignore.failure=true or
maven.test.skip=true in the properties file.

http://maven.huangdong.com/reference/plugins/test/properties.html

AC


On Wed, 27 Oct 2004 11:34:25 +0200, Daniel Pardo [EMAIL PROTECTED] wrote:
 I think that you can exclude any test in the file project.xml
 
 ...
 unitTest
 includes
 
 excludes
...
 
 Daniel Pardo (Un ex isoco :) )
 
 
 
 - Original Message -
 From: Jesus Sanchez Gonzalez [EMAIL PROTECTED]
 To: ham; [EMAIL PROTECTED]
 Sent: Wednesday, October 27, 2004 11:15 AM
 Subject: Problem building Jetspeed 1.5 war
 
 
 Hi.
 
 I'm trying to build the jetspeed 1.5 war file but I'm getting
  problems  after the unit tests and I cannot get the war.
 
 I'm using Maven 1.0, ant 1.6.1, jdk 1.4, Tomcat 5 and Windows XP.
 
 I'm getting the following error when the build stops.
 
  BUILD FAILED
  File.. C:\Documents and
  Settings\Administrador\.maven\cache\maven-test-plugi
  n-1.6.2\plugin.jelly
  Element... fail
  Line.. 181
  Column 54
  There were test failures.
  Total time: 771 minutes 8 seconds
  Finished at: Wed Oct 27 10:10:19 CEST 2004
 
 Is there any way to launch the build without doing all the unit tests?
 
 I'm running 'maven war' to get the jetspeed war file.
 
 
 Thanks.
 
  jess .-
 
 
 
 
 
 
 
  -
  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]



Dynamically Generate PSML/Menus

2004-10-27 Thread Alan Chiang
Hi all,
   I'm a bit new to Jetspeed, portals, and the surrounding
technologies, but I'm slowly taking it all in.

  I would like to create a menu similar to the PSML menus, but they
need to be dynamically generated from a database.  The menu would list
items, for example cars, and as you click on each different car, the
portlets in the card would be populated with more information about
the car - that is, when I select BMW from the menu, the portlets are
asked to refresh with information about BMW, and when I select
Toyota the portlets would again refresh.  So each menu item contains
the exact same set of portlets, just that they display information
based on the state of the menu (either PSML OR Velocity, which is what
I'm dabbling in now)

  The last thing I'd like is for this menu to maintain its current
selection across tabs, so if I have different tabs - low, mid, high -
and I select BMW then as I click through the tabs, the menu
selection remains the same, and the portlets are populated with the
corresponding information

Thanks to all for your help in advance,

AC

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