I try to run an Java Agent in XPage. The Agent runs in the beforePageLoad Event to manipulate the current document.
<xp:this.beforePageLoad><![CDATA[#{javascript:
var agent:NotesAgent =database.getAgent("RedirectGroups")
agent.runWithDocumentContext(currentDocument.getDocument())
}]]></xp:this.beforePageLoad>
For testing the agent prints a simple message to the console.
If I run the XPage in Browser I get an error 500 message. I'm using Notes 9.01 on an Domino 9 Server
Will I have to run the agent in an other event of the XPage?
The agent has to have
As the agent might run with this options it's not good practice to call a Java agent in an XPage. Better call/use the Java code direct in your XPage.