A few things you may want to look into are:
1. Put the bean in a package i.e. The first line of your code should be something like:
package SomeDirName.bean;
This could be a required -but I'm not 100% sure... To get this to work, you have to create the dir SomeDirName. Place your bean code in it. Change directory to the one that contains SomeDirName. Then, you must then execute javac with the relative path your bean code. Something like:
javac -d ./SomeDirName/DataBean.java
Your JSP code should look like:
<jsp:useBean id="Data" class="SomeDirName.DataBean" scope="request" />
2. Carefull with the scope attribute. Should it be session instead of request?
And the answer is no, you need not declare the bean in your web.xml.
Hope it helps!
