Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Error msg : 'pageContext' cannot be resolved in tag file....

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Error msg : 'pageContext' cannot be resolved in tag file....

    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 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: <![endif]-->
    58:
    59: <!-- Scripts -->
    60: <%= nextgen.webui.framework.aggregator.IncludeControll er.createJSDeclarations((HttpServletRequest)reques t,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


  2. #2
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Error msg : 'pageContext' cannot be resolved in tag file....

    Hello,

    You need to make sure that jsp-api.jar is on your classpath of your tomcat. So make sure you either supply it in your web-inf/lib folder or in the catalina-home/lib folder.

    // Json

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Error msg : 'pageContext' cannot be resolved in tag file....

    Hi Json,

    jsp-api.jar is already there in tomcat's classpath i.e Tomcat 5.0/common/lib.



  4. #4
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Error msg : 'pageContext' cannot be resolved in tag file....

    Open the jar and make sure it has the PageContext class in it.

    // Json

  5. #5
    Junior Member
    Join Date
    Sep 2009
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Error msg : 'pageContext' cannot be resolved in tag file....

    Hi Json,
    I have checked the jar and it has PageContext class in it.

    Regards
    Saikrishna

  6. #6
    Super Moderator Json's Avatar
    Join Date
    Jul 2009
    Location
    Warrington, United Kingdom
    Posts
    1,274
    My Mood
    Happy
    Thanks
    70
    Thanked 156 Times in 152 Posts

    Default Re: Error msg : 'pageContext' cannot be resolved in tag file....

    So when is the jasper compiler running, is it when you first try to go to the page?

    // Json

Similar Threads

  1. Error while deploying .ear file
    By urslalitha in forum Exceptions
    Replies: 1
    Last Post: August 18th, 2009, 02:56 AM
  2. Truncated class file error
    By Koâk in forum Exceptions
    Replies: 4
    Last Post: June 23rd, 2009, 11:23 AM