About question enthuware.jwpv6.2.936
Posted: Wed Aug 10, 2011 3:30 pm
Consider the code fragment of a servlet's doGet method. .
public void doGet(HttpServletRequest request, HttpServletResponse response)
{
...
ArrayList tableNamesVector = getTablesSomehow(); // 1
request.setAttribute("tableNames", tableNamesList); // 2
request.getRequestDispatcher("Reporter.jsp").forward(request, response);
...
}
I'm assuming that the tableNamesVector in //1 should match the tableNamesList in //2 since the question is really about using it in the Reporter.jsp.
Correct?
public void doGet(HttpServletRequest request, HttpServletResponse response)
{
...
ArrayList tableNamesVector = getTablesSomehow(); // 1
request.setAttribute("tableNames", tableNamesList); // 2
request.getRequestDispatcher("Reporter.jsp").forward(request, response);
...
}
I'm assuming that the tableNamesVector in //1 should match the tableNamesList in //2 since the question is really about using it in the Reporter.jsp.
Correct?