I am able to call a CSElement written in XML but when i try to call a CSElement written in jsp, it gives above mentioned error.
Is their any specific way to call jsp element from java code??
This is probably happening because you are calling your Java API from a system that has not initialized the servlet context properly. If there's no notion of a JSP in the context you're currently running (or if you're using a fake ICS object), your call will fail because there's no JSP engine ready to run your code.
How are you calling your java code?
Thanks for replying.
I am calling this java code in a servlet itself. Using this code, I am able to call a XML element but its fails in case for JSP element.
Do we need to set some property for calling JSP CSElement?
How are you getting your ICS object? Calling ICS from your own servlet is not formally supported, and this is one of the reasons why.
Usually this happens when you are trying to leverage ICS inside a third party MVC infrastructure. The problem is that it is not possible to properly instantiate ICS and manage its scoping without the ContentServer servlet. That means you essentially have to create your MVC controller inside the ContentServer servlet, not the other way around. That's one of the reasons we set up the GST Site Foundation. http://www.gst-foundation.org.