JSF code
<h:dataTable value="#{requestScope.allProfile}" var="allProfile">
<h:column>
<f:facet name="header">StudentID</f:facet>
<h:inputText value="#{allProfile.studentId}"
size="10" rendered="#{allProfile.canEdit}" />
<h:outputText value="#{allProfile.studentId}"
rendered="#{not allProfile.canEdit}" />
</h:column>`
Servlet
private void doProcess(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException, Exception {
StudentManager stuManager = new StudentManager();
List<studto>allProfile = stuManager.getAllstudentProfile();
request.setAttribute("studentProfile", allProfile);
RequestDispatcher rd = request.getRequestDispatcher("/ViewPage.xhtml");
rd.forward(request, response);
}
I have been able to bring my data from database until servlet. But I can not get data in xhtml page. Do I need to create faces-config to write managed bean?