Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

unable to Resolve renderRequest

45 views
Skip to first unread message

anamik...@hcl.in

unread,
Feb 15, 2006, 5:15:32 AM2/15/06
to
Hi,

I am new to Websphere Portal. I am using RAD 6.0 .When I create a Portlet using wizard "New Project->Portlet Project (JSR 168)"

Its giving error cannot resolve renderRequest object. I have imported portlet.jar and std-portet.tld in WEB-INF/tld. The code is given below.

TestingPortletView.jsp

<%@ page session="false" contentType="text/html" import="java.util.*,javax.portlet.*,testing.*" %>
<%@taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
<portlet:defineObjects/>

<%
TestingPortletSessionBean sessionBean = (TestingPortletSessionBean)renderRequest.getPortletSession().getAttribute(TestingPortlet.SESSION_BEAN);
%>

<DIV style="margin: 6px">

<H3 style="margin-bottom: 3px">Welcome!</H3>
This is a sample <B>view mode</B> page. You have to edit this page to customize it for your own use.<BR>
The source file for this page is "/WebContent/testing/jsp/html/TestingPortletView.jsp".

<H3 style="margin-bottom: 3px">Order entry</H3>
This is a sample form to test action handling.

<DIV style="margin: 12px; margin-bottom: 36px">
<% /******** Start of sample code ********/ %>
<%
String formText = sessionBean.getFormText();
if( formText.length()>0 ) {
%>
Order details for order id '<%=formText%>' should be displayed here.
<%
}
%>
<FORM method="POST" action="<portlet:actionURL/>">
<LABEL for="<%=TestingPortlet.FORM_TEXT%>">Enter order id:</LABEL><BR>
<INPUT name="<%=TestingPortlet.FORM_TEXT%>" type="text"/>
<INPUT name="<%=TestingPortlet.FORM_SUBMIT%>" type="submit" value="Submit"/>
</FORM>
<% /******** End of sample code *********/ %>
</DIV>

</DIV>

I haven't added even a single line of my own in the code is Wizard generated.

Thanks
Anamika

Joyce

unread,
Feb 15, 2006, 5:52:11 AM2/15/06
to
hmm. Let me tell you the truth. Since you have the
<portlet:defineObjects/> tag, renderRequest object is available to the
jsp. But for some reasons, that too only sometimes RAD shows this
error. But, though RAD shows this error, the portlet runs perfect in
the Portal server or the Test Environment.

karan malhi

unread,
Feb 16, 2006, 1:46:03 AM2/16/06
to
Dont worry about it. The JSP editor doesnt know what this variable
means. It only recognizes the standard jsp variables like request,
response etc. Even though the editor shows it is an error, the page
should run fine

anamik...@hcl.in

unread,
Feb 16, 2006, 2:43:28 AM2/16/06
to
Thanks Karan

I tried running the jsp file (after ignoring the same). But still getting error as shown below :

[2/16/06 12:52:39:314 IST] 38be566d WsServer A WSVR0001I: Server server1 open for e-business
[2/16/06 12:52:50:672 IST] 7d29166c WebGroup E SRVE0026E: [Servlet Error]-[File &quot;http://java.sun.com/portlet&quot; not found]: org.apache.jasper.JasperException: File "http://java.sun.com/portlet" not found
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:330)
at org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1382)
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:949)
at org.apache.jasper.compiler.ConfigurableParseEventListener.handleDirective(ConfigurableParseEventListener.java:161)
at org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:125)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:255)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1155)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1113)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1109)


in web.xml the taglib defintion was given as :

<taglib id="PortletTLD">
<taglib-uri>http://java.sun.com/portlet</taglib-uri>
<taglib-location>/WEB-INF/tld/std-portlet.tld</taglib-location>
</taglib>

but there was no tld folder in WEB-INF. so I put created one folder and put std_portlet.tld ver 1.0 after that i gave me the error saying class not found "org.apache.pluto.tags.DefineObjectsTag" so I imported External jar pluto1.0.jar in lib folder. But still I got the error "Unable to load class com.ibm.wps.pe.pc.legacy.tags.InitTag "

I unable to get the package for the same. Its not there in "wp.pe.api.legacy.jar". I know there is some blunder.

Thanks and Regards
Anamika


Joyce

unread,
Feb 16, 2006, 4:28:34 AM2/16/06
to
Hi Anamika,

WEB-INF refered in this web.xml actually refers to the folder "<<portal
install>>\shared\app\WEB-INF\tld" You should be having the tld file in
this folder.

Regards.

JavaJoe

unread,
Mar 8, 2006, 6:19:38 PM3/8/06
to
Hi Anamika,

I'm having the exact same problem with RSA 6.0.1-generated JSR-168 JSF
Portlets. When deployed onto the server, the Portlet gacks on a JSP
Processing Error and renders as a large dump of the problem ("Cannot
resolve symbol: variable renderRequest" along with 100 lines of trace).

Did you manage to find a resolution? I found that reverting to JSR 168
"Basic" Portlets avoided the problem, but that's not of much use since
I need the JSF components.

Thanks,

-Joe

0 new messages