Urlscrapper & Cookies

We've configured a web server to run non-portal application following the instructions in SP3 release notes. We have a jsp such that when a user is logged in to the portal, the jsp can use portal API to get profile informatin and display them. It works if the jsp is ran from the browser, but if I put the jsp in a URLScrapper, we get "com.iplanet.portalserver.session.SessionException: Invalid service host name" exception.

I also tested with a jsp to retrieve all the cookies. When the jsp is run by itself, it returns the iPlantPortalServer cookie, but when it's in the urlscrapper, it does not return it.

The web server's hostname is added to the Forward Cookie URL list in the Portal Admin's Gateway configuraton. The forward cookies to non-portal server is enabled. The Create Session Listener is also enabled in the policy--> session, with a "*" in the allow list.

Not sure if this is related, the web server is not in the same domain as the portal server. In the Gateway's DNS Domain list, we have

domain1.ca|*

domain2.ca|*

Originally, we also got the "Invalid Service Host Name" error when the jsp is ran from the browser until we aliased the web server to something that's on the same domain as the portal server.

This is the jsp we used:

%@page import="java.util.*,

javax.servlet.*,

javax.servlet.http.*,

com.iplanet.portalserver.session.*,

com.iplanet.portalserver.profile.*,

com.iplanet.portalserver.util.*"

%>

<%

Cookie[] cookies = request.getCookies();

for (int i=0;i<cookies.length;i++) {

out.println(cookies.getName()+ ":" + cookies.getValue());

}

try{

SessionID sid = new SessionID(request);

Session sess = Session.getSession(sid);

Profile p = sess.getUserProfile();

String profileLocale = p.getAttributeString("iwtUser-locale");

out.println("locale is " + profileLocale);

}

catch(com.iplanet.portalserver.session.SessionException se) {

out.println(se.toString());

}

%>

[2143 byte] By [708804] at [2007-11-25 4:38:36]
# 1
did you add the fqdn of your web server or just the hostname forward cookie url domain list ? You might need to add the web server domain in cookie domain list. Make sure that is added.
Karthik_Krishnamoorthy at 2007-6-29 3:11:02 > top of Java-index,Web & Directory Servers,Portal Servers...