Hi
I am working on a task where i have to generate and display reports in the same page when the user clicks Run Report commandButton.
In a
servlet i wrote all the jasper coding to generate the report.
To call sevlet from my
jsf page i used a method called callMyServlet().
In callServlet method i have used context.getExternalContext().dispatch(url) to call my servlet.
In my JSF page i called callMyServlet method in action of a commandButton
This generates the report but not in the same page.
I would like to know how to call my servlet from jsf without using dispatch url
Code of servlet
Code of callMyServlet Method
JSF Code of commandButton
I have mapped my servlet in web.xml
Please help me out how to get my task done.
any sample code will also help.
Cheers,
Sreelekha