Hi Besson,
This is covered in the Jahia webapp developer guide available here :
http://www.jahia.org/jahia/webdav/site/jahia_org/shared/documentation/WebAppGuideDRAFT1.pdf
Basically you can't access the Jahia API from a webapp because it is not
in the same context (Tomcat forbids this). So if you want deep
integration with the Jahia API you will have to work within the Jahia
context either with additional servlets (harder) or templates (easier).
Regards,
Serge Huber.
besson baptiste wrote:
Hello,
I was just wondering what is the best way to import jahia packages
from my webapp classes, for instance to get the Jahia user names :
<%
JahiaUserManagerService jums =
ServicesRegistry.getInstance().getJahiaUserManagerService();
Vector v = jums.getUserList();
Iterator it = v.iterator();
while(it.hasNext()){
out.println(jums.lookupUser((String)i.next()).getName());
}
%>
Do I have to create a new template just for that, so that it is in
Jahia context and get the Jahia Api ?
Also do I put in the jar (the one containing agenda.class in
template guide chap 7)
only the classes of my webapp or all the directory (WEB-INF,
web.xml, jsp...) ?
I read quickly the template guide (I don't need to create new
templates) but I'm not very sure about it...
Thank you.
Baptiste