on 06-14-2006 3:54 PM
Hello,
I wrote a little class that inherits from AbstractPortalComponent. The doContent()-method looks like this:
IResource jspResource = request.getResource(IResource.JSP, "jsp/output.jsp");
response.include(request, jspResource);
In the JSP file "output.jsp", I'd like to use the componentRequest object, but I always get an error, when displaying the page. Therefore I think, there is no "componentRequest" object. The JSP file looks like this:
<%= componentRequest.getValue("testkey") %>
Do you have any suggestions?
Kind regards, Lars
Hi Lars,
Can you please tell us how you solved the problem? Can you paste here the code with all the required imports? I have the exact same problem and I wasnt able to find any solution.
Thanks,
Cosmin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Cosmin,
my reply might be a little too late, but if you still have the problem:
These are my imports in my JSP-file:
<%@ page import="com.sapportals.portal.prt.component.IPortalComponentURI" %>
<%@ page import="com.sapportals.portal.prt.component.IPortalComponentRequest" %>
<%@ page import="com.sapportals.portal.prt.pom.NodeMode" %>
<%@ page import="com.sapportals.portal.prt.event.IPortalRequestEvent" %>
To put something in the request, I used:
request.getNode().putValue("testkey", "testvalue");
To access the value inside the JSP again, I used the following code:
componentRequest.getNode().getValue("testkey");
I hope, that this might help you.
Kind regards, Lars
Message was edited by:
Lars Leibner
I just solved the problem by myself: I did forget ti import the required classes into the JSP file.
Regards, Lars
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.