calling servlet from action class
I am calling a servlet from an action class by using forward. It is then going to the servlet but it is not showing the output.
Actually I have create a PDF file which I need to show it on runtime. If I run that servlet only on server then it is showing the PDF file I want to. But if I forward it from the action class it is not not showing anything. I have given a simple condiiton on the action class like this:
if(id.equals("SGSY"))
{
forward = mapping.findForward("SGSY");
}
else
开发者_运维知识库 {
forward = mapping.findForward("fail");
}
After this it is going to servlet but not actually showing the output. I don't understand why. Am I doing something wrong?
Try response.sendRedirect 1st instead of forward mapping,if it works it means there must be problem with your path
精彩评论