I have primitive spring project for learning Spring framework. In my .jsp file I'm getting exception below:
But in my controller class I have @ModelAttribute("student")
:
Bellow is my project structure:
In my web.xml
file I have exception too:
Will be glad to any help. Thanks.
If you have same problem like me, you have to configure dispatcher servlet
and mapping like in my web.xml
. Resolving symbol error in web.xml means that in your pom.xml you shoul write: <packaging>war</packaging>
. It works for me.
My pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.spring</groupId>
<artifactId>SpringgMVC</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies></dependencies>