I have a requirement to add several meta tags to Connections profile pages, and the meta tags must show profile data for the user whose profile I'm viewing.
I've found two possible solutions, but have hit problems with both.
Both solutions involve changes to a layout JSP used for profile pages.
For the first solution, I've added this to the layout JSP:
- <meta name="uid" content="${uid}" />
<meta name="Name" content="${displayName}" />
<meta name="Email" content="${email}" />
<meta name="Title" content="${jobResp}" />
<meta name="Work" content="${telephoneNumber}" />
<meta name="Mobile" content="${mobileNumber}" />
<meta name="Location" content="${officeName}" />
The first three meta tags correctly show the data for the user whose profile I am viewing.
The other four have no data, regardless of what's in the profile.
Some of the data I want seems to have several different attribute names in different parts of the Connections Info Centre, but I've tried different attribute names and can't get them to work.
What attribute names might work in this case?
The second solution involves using Java code in the JSP to query the DB2 database.
I have verified I can connect to a data source and get some person information. E.g. this query gives me a list of first names:
- "SELECT PROF_GIVENNAME FROM EMPINST.GIVEN_NAME"
The trouble with that solution is that I need to make a query to get several fields for only the user whose profile I am viewing, so I need that user's UID (or some other unique identifier) in the Java code.
For basic query testing, I tried defining a function like this:
- void dsTest(String uid)
- "SELECT * FROM EMPINST.EMPLOYEE WHERE PROF_UID='"+uid+"'"
- <% dsTest(uid); %>
That didn't work. The "uid" object doesn't exist. How can I get the UID in Java code in a JSP?

How can I show profile data in meta... (Scott Leis 29.Nov.10)
. . 