Hello Friends,
I want to show the output return by the below given servlet into jsp page .
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class GetAllProgrammesServlet extends HttpServlet { public void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { PrintWriter pw = response.getWriter(); Transactions tr = new Transactions(); try { String programmes = tr.getProgrammes(); if(programmes.length() > 0) { [B] pw.println(programmes); [/B] return; } else { pw.println("NULL"); } } catch(Exception ex) { pw.println("exception"); ex.printStackTrace(); } } }
where
programmes="P0001,MCA,0$P0002,MBA,1";
in jsp page i want to split it into different pieces and want to show them in tabular form
for that i want to contain the output return by this servlet into a variable.
Please put some light..Its urgent.
i had tried various ways.i am able to show the content into jsp by using include scriplet , but unable to store into variable.