|
||||||
| Java Help Java Help forum discussing all Java platforms - J2ME, J2SE and J2EE - as well as relevant standards, APIs and frameworks such as Swing, Servlets, JSPs, Applets, Struts, Spring, Hibernate, ANT, EJB, and other Java-related topics. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
JSP error?
Hi,
I have a web app that uses jsps. I have a database to store a 'users' table and a 'cars' table i have 2 pages, one to view all the cars and one to view all the users. The code for the two is near identical apart from the database table entities. The 'viewcars.jsp' works perfect and displays everything but the 'viewusers.jsp' page gives the following error in Netbeans Code:
javax.servlet.ServletException: org.apache.jasper.el.JspPropertyNotFoundException: /viewUsers.jsp(76,36) '#{users.userid}' Property 'userid' not found on type business.User
javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
users - is the array to hold the users
userid - is the field for the userid
Below is the JSP that manages the 'viewusers' page. Code:
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%--
This file is an entry point for JavaServer Faces application.
--%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>View Users</title>
<link href="../css/mystyles.css" rel="stylesheet" media="screen"/>
</head>
<body>
<f:view>
<h:form>
<div id="header">
<f:subview id="header" >
<jsp:include page="header.jsp"/>
</f:subview>
</div>
<div id="menu">
<f:subview id="menu">
<jsp:include page="menu.jsp"/>
</f:subview>
</div>
<div id="container">
<div id="content">
<h:form>
<h:dataTable value="#{UserBean.users}" var="users"
styleClass="users"
headerClass="usersHeader"
columnClasses="column1,column2,column3"
rowClasses="oddRow,evenRow">
<h:column>
<f:facet name="header">
<h:outputText value="User ID" />
</f:facet>
<h:outputText value="#{users.userid}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Password" />
</f:facet>
<h:outputText value="#{users.password}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Email" />
</f:facet>
<h:outputText value="#{users.email}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
<h:outputText value="#{users.name}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Contact" />
</f:facet>
<h:outputText value="#{users.contact}" />
</h:column>
<h:column>
<f:facet name="header">
<h:outputText value="Balance" />
</f:facet>
<h:outputText value="#{users.balance}" />
</h:column>
</h:dataTable>
</h:form>
</div>
</div>
<div id="footer">
<f:subview id="footer">
<jsp:include page="/footer.jsp"/>
</f:subview>
</div>
</h:form>
</f:view>
</body>
</html>
The test of the method used to find and display all the users works fine even with the userid but its when it goes to translate it into the JSP something goes wrong Anyone any ideas? Thanks |
![]() |
| Tags |
| jsp |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with singleton patern!!(pool management project) | KivraS | C and C++ | 8 | 06-10-2009 03:26 PM |
| [C] Fuctions compiler error | Scupham | C and C++ | 3 | 12-09-2008 11:54 AM |
| c++/cli - irritating compilation error | jwa | Managed C++ | 2 | 01-20-2008 09:43 PM |
| need urgent help finding parce error!!! | siren | C and C++ | 3 | 09-13-2007 10:45 AM |
| can someone help me with my c librarys? | bobwrit | C and C++ | 4 | 04-27-2007 07:19 PM |
All times are GMT -5. The time now is 11:18 AM.
Amrosama.cc
Arekbulski.cc
Debtboy.cc
Guest.cc
Jaan.cc
James.cc
Mathx.cc
Tsz.cc
Vswe.cc