• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Using <jsp:include page='<%=request.getAttribute("variable")%>'/> in Tomcat 6.0.35

 
Ranch Hand
Posts: 72
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
We have a jsp include tag like :



We have deployed our code to Tomcat 6.0.35 recently. This tag gives below exception :

An error occurred at line: 86 in the jsp file: /jsp/cntnt/Index.jsp
The method include(ServletRequest, ServletResponse, String, JspWriter, boolean) in the type JspRuntimeLibrary is not applicable for the arguments (HttpServletRequest, HttpServletResponse, Object, JspWriter, boolean)
84: </div>
85:
86: <jsp:include page='<%=request.getAttribute("variable")%>'/>

How can I fix this issue? Please help. Thanks in advance!
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you still using scriptlets 10 years after JSP2 has been introduced?
 
Ranch Hand
Posts: 344
Oracle Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bear Bibeault wrote:Why are you still using scriptlets 10 years after JSP2 has been introduced?


Sadly, I still often see Java extensively being used inside JSP pages, even on fairly new applications. Only a couple times I've worked on an app that was developed back when JSP 0.9 or 1.0 just came out, so I guess at the time using Java code inside the JSP was OK.
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My guess would be that the OP has some of the servlet classes in their WEB-INF/lib directory.

Check the WEB-INF/lib directory and remove any of:
jsp-api.jar
servlet-api.jar

and similar classes.
These libraries are provided by your Servlet container. You should find them in the Tomcat/lib directory.
Adding them into your own application only creates errors.
reply
    Bookmark Topic Watch Topic
  • New Topic