I\'m learning java and try to pass some variable from servlet to jsp page. Here is code from servlet page
@WebServlet(\"/Welcome\")
public class WelcomeServl
You should avoid scriptlets because they are java code in HTML, they break MVC pattern, they are ugly, odd and deprecated.
Simply replace :
<%
Object sss = request.getAttribute("MyAttribute");
String a = "22";
%>
with simply using EL ${MyAttribute}
But if you want to stick with scriptlets, you should get the attribute from the proper scope which is session in your case.