on 05-18-2004 3:59 PM
We have a set of pages we're trying to port from a Tomcat site over to our EP 6.0 SP2 instance. It's especially the following page we just can't get to work (and which works like a charm with the Tomcat container):
index.jsp:
-
<html>
<body>
<%
if(session.isNew())
{
response.sendRedirect("http://authserver.com/authenticate.jsp");
}
else
{
// do something ...
}
%>
</body>
</html>
The JSP Compiler crashes with the following exception:
sapportalsjspindex.java:216: cannot resolve symbol
symbol : method sendRedirect (java.lang.String)
location: class com.sapportals.portal.prt.servlets_jsp.server.jsp.response.JSPResponse
response.sendRedirect("http://authserver.com/authenticate.jsp");
^
1 error
at com.sapportals.portal.prt.servlets_jsp.server.compiler.JavaCompiler.compileExternal(JavaCompiler.java:425)
at com.sapportals.portal.prt.servlets_jsp.server.compiler.JavaCompiler.compile(JavaCompiler.java:510)
at com.sapportals.portal.prt.servlets_jsp.server.jsp.JSPParser.parse(JSPParser.java:2140)
...
It's because in the portal, the response object is not the normal response used in J2EE but it is a com.sapportals.portal.prt.component.IPortalComponentResponse object. On this object there is no sendRedirect method but there is a method to access the "normal" response object by doing :
componentRequest.getServletResponse(false);
Try this.
Xavier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.