try something like this in your second servlet:
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
{
String name = (String)session.getAttribute("name");
System.out.println("welcome" +name);
}