JSP woes
Hello,
I'm trying to access portal variables from a JSP that runs on the same
webserver as
the portal server. In that JSP I would like to have access to eg
SessionID.
Since I use the same webserver, I assume that my JSP should have the
same access
as described in "Running applications on a non-ipplanet portal server"
of the SP2-docs?
However, it doesn't work and the error message is cryptic as always:
Internal error: exception thrown from the servlet service function
(uri=/public/index5.jsp): javax.servlet.ServletException, Stack:
javax.servlet.ServletException
This is the code I use:
<%@ page import="com.iplanet.portalserver.providers.jsp.JSPProvider,
java.util.*,com.iplanet.portalserver.session.*,netscape.ldap.*"
%>
<%
JSPProvider p =
(JSPProvider)pageContext.getAttribute("JSPProvider");
Session sess=p.getSession();
%>
Session ID : <%= sess.getClientID()%>
Any suggestions?
thanks
Bob
[1139 byte] By [
708768] at [2007-11-25 4:28:27]

Is your JSP a regular JSP that you access via a URL or a JSP for a JSP-based
channel in the desktop? Only the latter can use the code you have below.
The JSPProvider attribute in the pageContext is only there for JSPs that are
used in JSP-based channels.
Tom
Bob Lannoy wrote:
>
> Hello,
>
> I'm trying to access portal variables from a JSP that runs on the same
> webserver as
> the portal server. In that JSP I would like to have access to eg
> SessionID.
> Since I use the same webserver, I assume that my JSP should have the
> same access
> as described in "Running applications on a non-ipplanet portal server"
> of the SP2-docs?
>
> However, it doesn't work and the error message is cryptic as always:
> Internal error: exception thrown from the servlet service function
> (uri=/public/index5.jsp): javax.servlet.ServletException, Stack:
> javax.servlet.ServletException
>
> This is the code I use:
>
> <%@ page import="com.iplanet.portalserver.providers.jsp.JSPProvider,
>java.util.*,com.iplanet.portalserver.session.*,netscape.ldap.*"
> %>
> <%
> JSPProvider p =
> (JSPProvider)pageContext.getAttribute("JSPProvider");
> Session sess=p.getSession();
> %>
> Session ID : <%= sess.getClientID()%>
>
> Any suggestions?
>
> thanks
>
> Bob
I copied your code in my JSP file and it worked fine, so
the code seems to be OK.
Twan
"Bob Lannoy" <bob.lannoy@smals-mvm.be> wrote in message
news:3B5694BB.2B4A40C2@smals-mvm.be...
> Hello,
>
> I'm trying to access portal variables from a JSP that runs on the same
> webserver as
> the portal server. In that JSP I would like to have access to eg
> SessionID.
> Since I use the same webserver, I assume that my JSP should have the
> same access
> as described in "Running applications on a non-ipplanet portal server"
> of the SP2-docs?
>
> However, it doesn't work and the error message is cryptic as always:
> Internal error: exception thrown from the servlet service function
> (uri=/public/index5.jsp): javax.servlet.ServletException, Stack:
> javax.servlet.ServletException
>
> This is the code I use:
>
> <%@ page import="com.iplanet.portalserver.providers.jsp.JSPProvider,
>java.util.*,com.iplanet.portalserver.session.*,netscape.ldap.*"
> %>
> <%
> JSPProvider p =
> (JSPProvider)pageContext.getAttribute("JSPProvider");
> Session sess=p.getSession();
> %>
> Session ID : <%= sess.getClientID()%>
>
> Any suggestions?
>
> thanks
>
> Bob
>