I have problem with passing an object from servlet to jsp.
Servlet.java
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Controller test = new Controller();
test.setObjects();
request.getSession().setAttribute("item", test.node_1);
request.getRequestDispatcher("index.jsp").forward(request, response);
}
index.jsp
<title> ${item.firstName} </title>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
<servlet>
<servlet-name>Servlet</servlet-name>
<servlet-class>socialgraphui.Servlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet</servlet-name>
<url-pattern>/Servlet</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Tomcat output
okt 25, 2014 6:17:14 PM org.apache.catalina.startup.HostConfig deleteRedeployResources
INFO: Undeploying context []
okt 25, 2014 6:17:14 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor /Library/Java/Servers/apache-tomcat-7.0.42/conf/Catalina/localhost/ROOT.xml
okt 25, 2014 6:17:14 PM org.apache.catalina.util.LifecycleBase start
INFO: The start() method was called on component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]] after start() had already been called. The second call will be ignored.
In browser console is no error or warning message. Could you please help me how can i find out what is wrong?