Hi, now i am writing a servlet to write into a jsp file. which mean i execute the servlet program, the program will write the data(html and others) and save in a jsp file. how do i display the jsp file after i execute the servlet without giving a link to link to that jsp page?? thanx in advance...
Balaji Loganathan
author and deputy
Bartender
Joined: Jul 13, 2001
Posts: 3150
posted
0
Originally posted by Ann Toh: the program will write the data(html and others) and save in a jsp file. how do i display the jsp file after i execute the servlet without giving a link to link to that jsp page?? thanx in advance...
Its not good idea to the dynamic content into a jsp file and display it. You can directly display the output the same servlet that you used to capture/process data!.. If you still want to use jsp option, then you can use the redirect() function to direct to the jsp from the servlet.
Hi Balaji Loganathan, thank for ur help. actually, i have written the program to display the jsp page but it does not display, so i have to write and save it as a jsp file then i need to point to the jsp file and display it. can u tell me how to write a redirect() function in the servlet to point to that jsp file?? thanx in advance...
Praful Thakare
Ranch Hand
Joined: Feb 10, 2001
Posts: 613
posted
0
response.sendRedirect("urjspname.jsp"); Praful
All desirable things in life are either illegal, banned, expensive or married to someone else !!!
Ann Toh
Ranch Hand
Joined: Jul 18, 2003
Posts: 45
posted
0
Hi Praful Thakare, thanx for ur help. i can get to link to my jsp page.