|
Home > Archive > WebSphere Portal Server > February 2006 > unable to Resolve renderRequest
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
unable to Resolve renderRequest
|
|
|
| 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
| |
| karan malhi 2006-02-17, 10:35 pm |
| anamika.gupta@hcl.in wrote:
> 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
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
| |
|
| 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 "http://java.sun.com/portlet" 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(JspParseEventList
ener.java:1382)
at org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:949)
at org.apache.jasper.compiler.ConfigurableParseEventListener. handleDirective(ConfigurableParseEventLi
stener.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 s
till 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
|
|
|
|
|