Jsp Pagecontext Error
Contents |
here for a quick overview of the site Help Center Detailed answers to javax.servlet.jsp.jspexception cannot be resolved to a type in eclipse any questions you might have Meta Discuss the workings and javax.servlet.jsp.pagecontext jar policies of this site About Us Learn more about Stack Overflow the company Business Learn more javax.servlet.jsp.jspwriter cannot be resolved to a type about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community
Pagecontext Cannot Be Resolved In Tag File
Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up JspException and PageContext cannot be resolved up vote 13 down vote favorite 4 This is a follow up to a question on accessing resources in jsp page of jsp-api maven spring mvc app Thanks to @kmb385 I was able to resolve that problem but now I get the following eclipse errors in my JSP file javax.servlet.jsp.JspException cannot be resolved to a type and javax.servlet.jsp.PageContext cannot be resolved to a type as suggest by kmb385, here is my controller: @Controller public class AdminController { @RequestMapping("/") protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { ModelAndView model = new ModelAndView("index"); model.addObject("msg", "hello world"); return model; } } and here is my index.jsp page just in case: <%@ page language="java" contentType="text/html; charset=ISO-8859-1"pageEncoding="ISO-8859-1"%>
My Project - MainPage
an image should be here
I have come across "soluhere for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About the import javax.servlet.jsp.jspexception cannot be resolved Us Learn more about Stack Overflow the company Business Learn more about hiring
Javax.servlet.jsp.jspexception Jar
developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join
The Type Javax.servlet.jsp.pagecontext Cannot Be Resolved. It Is Indirectly Referenced From
the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to get rid of http://stackoverflow.com/questions/13377396/jspexception-and-pagecontext-cannot-be-resolved “javax.servlet.jsp.PageContext cannot be resolved to a type” in jsp page with Eclipse? up vote 4 down vote favorite I have this weird error in a .jsp page in eclipse: javax.servlet.jsp.PageContext cannot be resolved to a type My project is a maven project imported into "as an existing maven project" into juno with m2e and m2e-wtp plugins installed. Is this a bug of the m2e plugins ? http://stackoverflow.com/questions/16194143/how-to-get-rid-of-javax-servlet-jsp-pagecontext-cannot-be-resolved-to-a-type-i If yes, what's a possible workaround to get rid of this error (and the red mark in the workspace explorer) ? Otherwise, do I need to "tell" to maven that my project contains jsp pages ? And hopefully, the m2e plugin will add the right library to the classpath. If yes, how ? jsp eclipse-juno m2e m2e-wtp share|improve this question asked Apr 24 '13 at 14:06 Samuel Rossille 6,78393874 add a comment| 2 Answers 2 active oldest votes up vote 7 down vote The solution that worked for me, is given in this answer. Go to project properties > Targeted runtimes > Select the checkbox for a runtime (Apache Tomcat 7 in my case). That's all. Just build the project now and everything will be fine. share|improve this answer answered Aug 28 '14 at 4:04 Nav 6,072134887 Had to make sure that "only" Tomcat 7 is selected. I had Tomcat 6 too selected along with Tomcat 7 and it kept on giving this error. –rkrishnan Aug 30 '15 at 15:46 add a comment| up vote 1 down vote accepted After upgrading to Kepler and updating all plugins, the issue disapeared. It was probably
Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: JSP Error msg : https://coderanch.com/t/461139/JSP/java/Error-msg-pageContext-resolved-tag 'pageContext' cannot be resolved in tag file saikrishna vuddagiri Greenhorn Posts: 2 posted 7 years ago Hi All, I have my web application deployed on WebSphere Application server 6.0 ,which is running fine.Now my task is to move the web application to tomcat 5.5(also included JDK 1.4 compatibility package), as the code is compiled using cannot be jdk 1.4.In one of the tag files , i have used jsp implicit object 'pageContext' , which is giving error. Code : pageContext.get ServletContext(); Error in tomcat: org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 60 in the jsp file: /WEB-INF/tags/javascriptdeclarations.tag pageContext cannot be resolved 57: 58: 59: 60: <%= nextgen.webui.framework.aggregator.IncludeController.createJSDeclarations((HttpServletRequest)request,pageContext.getServletContext()) %> 61: I have been searching for any suggestions in Google ,but remained clueless.Any help would be greatly appreciated. Thanks in advance Saikrishna Vuddagiri saurav sarkar Ranch Hand Posts: 180 I like... posted 7 years ago I am not very sure but could you please check if servlet.jar is in your classpath as PageContext comes from that jar. Be Objectively Oriented.Explore the power of OOPs. My Blog, Eclipse EMF Query committer. Bear Bibeault Author and ninkuma Marshal Posts: 65272 95 I like... posted 7 years ago saurav sarkar wrote:I am not very sure but could you please check if servlet.jar There is no need for this. The Servlet jar is automatically provided by Tomcat. It should never be copied anywhere. [Asking smart questions] [About Bear] [Books by Bear] Bear Bibeault Author and ninkuma Marshal Posts: 65272 95 I like... posted 7 years ago If you are using tag files, that means that you are using JSP 2.0.