Link to home
Start Free TrialLog in
Avatar of ramadevimandala
ramadevimandalaFlag for India

asked on

Getting compile error because of RequestDispatcher class in JServ

Hi,
I am getting following error in my jsp and its not getting compiled:
Servlet Error: OracleJSP: oracle.jsp.provider.JspCompileException: <H3>Errors compiling:/ed22/oracle/eld2comn/_pages/_oa__html/_eisrs/_jsp/_dashboard/_BasicChart.java cannot resolve symbol symbol  : method getRequestDispatcher (java.lang.String) location: interface javax.servlet.http.HttpServletRequest                 RequestDispatcher rd=request.getRequestDispatcher("/OA_HTML/eisrs/jsp/dashboard/FCHTMLRenderer.jsp"+par1);        

see the code in my JSP below:                                    
RequestDispatcher rd=request.getRequestDispatcher("/OA_HTML/eisrs/jsp/dashboard/FCHTMLRenderer.jsp"+par1);
          rd.include(request,response);

Open in new window

Avatar of ramadevimandala
ramadevimandala
Flag of India image

ASKER

servlet .jar files also there in classpath of jserv.properties file:
wrapper.classpath=/ed22/oracle/eld2ora/iAS/lib/servlet.jar
wrapper.classpath=/ed22/oracle/eld2ora/iAS/lib/servlet-api.jar
ASKER CERTIFIED SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for ur help , thats working :)
I'm surprised by the B grade.  It's the right answer, and it worked for you.  A B is for cases where you aren't helped, but documentation was provided.  It doesn't cost you anything to give the highest rating, and it makes a difference to the experts who help you (more points with higher grades).
Hi,

I am sorry for that, I am new to this forum and don't know how to give all these things.
Coming to your solution in my JSP I am using the JSP:include now instead of RequestDispatacher as
the version of Jserv which I have is having the older version of servlet jar files , so my RequestDispatacher  is not getting compiled I tried to add new version of jar but it was not supporting
so I changed my logic to use Jsp include. I didn't try to use the servlet context solution you have provided as my requirement was very urgent I changed it to JSP:include . After that I have used servlet context and with this also it was working fine.

Thank you very much for your help.
Thanks,
Rama
Avatar of ahsan-jaffery1985
ahsan-jaffery1985

Hello all,

I got this issue as well. Except for I am a linux guy trying to help an Oracle guy. I see your answer but how does one apply that?

Please let me know asap.

Regards
Ask a question directly.  That will get you more help than inserting more questions in the middle of an answered question.