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 Michael Hufnagl <mi...@salzburgresearch.at> on 2002/03/22 10:45:24 UTC
invoke a URL
Hello!
I tried to invoke a URL by a portlet to reuse our existing Servlet. Regardless
of the invoked URL, i got ownly a text message:
"JSPPortlet: Could not include the following URL: http://www.google.com : null"
displayed in the portlet
The portlet code looks like this
...........
public void init() {
servletURL = this.getPortletConfig().getInitParameter("servlet_url");
}
public ConcreteElement getContent(RunData data) {
PortletConfig pc = this.getPortletConfig();
try {
ElementContainer base = new ElementContainer();
CapabilityMap map = CapabilityMapFactory.getCapabilityMap(data);
System.out.println("SERVLET PORTLET URL: " + servletURL);
EcsServletElement e = new EcsServletElement(data, servletURL);
e.base.addElement(new EcsServletElement(data, servletURL));
}catch() {
}
return ( base);
...........
I am using:
Tomcat 3.2.1
with xerces 1.2
jetspeed 1.3a1
Can anybody help me with the solution of this problem?
Kindest regards
_________________________________________________
Michael Hufnagl
Salzburg Research Forschungsgesellschaft m.b.H.
SunTREC
Jakob- Haringer- Strasse 5/III
A-5020 Salzburg
Austria
Phone +43 (0)662 2288 464
Fax +43 (0)662 2288 222
mailto: michael.hufnagl@salzburgresearch.at
http://www.salzburgresearch.at
_________________________________________________
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: invoke a URL
Posted by Chris Kimpton <ki...@yahoo.com>.
Hi,
--- Michael Hufnagl <mi...@salzburgresearch.at> wrote:
>
> I tried to invoke a URL by a portlet to reuse our existing Servlet.
> Regardless
> of the invoked URL, i got ownly a text message:
>
> "JSPPortlet: Could not include the following URL:
> http://www.google.com : null"
>
> displayed in the portlet
>
> The portlet code looks like this
>
>
> ...........
> public void init() {
> servletURL =
> this.getPortletConfig().getInitParameter("servlet_url");
> }
>
> public ConcreteElement getContent(RunData data) {
> PortletConfig pc = this.getPortletConfig();
> try {
> ElementContainer base = new ElementContainer();
> CapabilityMap map =
> CapabilityMapFactory.getCapabilityMap(data);
>
> System.out.println("SERVLET PORTLET URL: " +
> servletURL);
>
> EcsServletElement e = new EcsServletElement(data,
> servletURL);
> e.base.addElement(new EcsServletElement(data,
> servletURL));
> }catch() {
> }
>
> return ( base);
> ...........
>
> I am using:
>
> Tomcat 3.2.1
> with xerces 1.2
> jetspeed 1.3a1
>
>
Generally, I would suggest using a more recent Tomcat - 3.3 is quite
good and at least the latest alpha of jetspeed 1.3a2 - although the
code from CVS is probably better.
As to your particular problem, it sounds like you have an existing
site (servlet) that you want to put into a portlet.
Looking at the EcsServlet code, it logs any errors to the
jetspeed.log file - have you looked in their - any stack
traces/messages that help you further?
Other ways to do this include:
The quick way would be to use the webpageportlet in the latest
jetspeed code to wrap your url, like you have done. Or use an iframe
containing your url.
If you want to integrate things more closely, you can change your
servlet to be a portlet - the same things are available - namely the
http request and response (via RunData).
HTH,
Chris
=====
http://www.soccer2002.org.uk - join in and win CA$H!
__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards�
http://movies.yahoo.com/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>