servlets - Accessing bean from Jsp -
i searched on forum haven't got appropriate solution. , if mistake 1 duplicate sorry. coming problem... i'm setting values 1 of html using servlet code index.html <form method="post" action="user"> what's name? <input type="text" name="username" size=20>` code servlet package test; ...... userbean ub = new userbean(); string name = request.getparameter("username"); ub.setfirstname(name); request.setattribute("user",ub); requestdispatcher rd=request.getrequestdispatcher("/getjsp.jsp"); rd.forward(request,response); both servlet , bean placed in package called test. code userbean: private string firstname; public string getfirstname() { return firstname; } public void setfirstname(string firstname) { this.firstname = firstname; system.out.println(firstname); } from bean i'm able print proper value name on server console. after setting values servlet i'...