spring - java.lang.ClassNotFoundException: org.apache.jsp.WEB_002dINF.pages.LandingPage_jsp -


i'm getting 2 odd errors when opening project. if open landing page , keep refreshing it, error messages alternate between 2 below.

either this:

org.apache.jasper.jasperexception: /web-inf/pages/landingpage.jsp (line: 2, column: 0) absolute uri: http://www.springframework.org/security/tags cannot resolved in either web.xml or jar files deployed application 

or this:

http status 500 - java.lang.classnotfoundexception: org.apache.jsp.web_002dinf.pages.landingpage_jsp 

what on earth happening?

because:

cause 1: parsing jsp file error. example: error jsp page (due syntax error or missing dependencies):

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@page session="false" %> <html> <head>     <title>home</title> </head> <body> <h1>hello world!</h1> <p>the time on server ${servertime}.</p> </body> </html> 

make correct:

<%@page session="false" %> <html> <head>     <title>home</title> </head> <body> <h1>hello world!</h1> <p>the time on server ${servertime}.</p> </body> </html> 

cause 2: missing dependencies. fix add these dependencies:

<dependency>     <groupid>javax.servlet.jsp.jstl</groupid>     <artifactid>jstl-api</artifactid>     <version>1.2</version> </dependency> <dependency>     <groupid>javax.servlet</groupid>     <artifactid>javax.servlet-api</artifactid>     <version>3.1.0</version>     <scope>provided</scope> </dependency> <dependency>     <groupid>javax.servlet.jsp</groupid>     <artifactid>jsp-api</artifactid>     <version>2.2</version>     <scope>provided</scope> </dependency> 

you must set scope above.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -