Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search Coderanch
Advance search
Google search
Register / Login
jayachandra madopothula
Greenhorn
+ Follow
news
4
Posts
1
Threads
since Jan 08, 2008
Merit badge:
grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads
Recent posts by jayachandra madopothula
Data getting saved in session, but not being persisted in table.
see the structure shown in the picture.
after arranging the whole structure just update resource mapping tag in hibernate.cfg.xml with absolute path of the hbm.xml
show more
17 years ago
Object Relational Mapping
Arraylist in bean cant be displayed in jsp
I have used h:dataTable and also i used #{Database} but still i didnt find the display of list. please tell where do i do mistake.
<%@ page contentType="text/html"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> this is experiment only <f:view> <html> <head><title>JSF Simple Login Example</title></head> <body> <h:dataTable id="dbtable" value="#{Database.calToDatabase}" var="ll"> // List in database class <h:column> <f:facet name="header"> </f:facet> <h:outputText value="#{ll}" id="dbname" />// List in database class </h:column> </h:dataTable> </body> </html> </f:view>
show more
17 years ago
JSF
Data getting saved in session, but not being persisted in table.
Possible corrections you have to have work
1.If you are working in eclipse please check the application structure
2. remove the
<generator class="assigned"/>
and run it.
show more
17 years ago
Object Relational Mapping
Arraylist in bean cant be displayed in jsp
I have bean with an list property which will returning list of values, i want to display this list values on ep.jsp. can anybody help me. thanks in advance.
Database.java
public class Database { List al=new ArrayList(); public List calToDatabase; private String loginname=null; private String password=null; public String temporaryMethos() { System.out.println("Contents in the List#########"); al.add("jaya"); al.add("chandra"); al.add("raheem"); al.add("balu"); System.out.println("Contents in the List"+al); Database db= new Database(); db.setCalToDatabase(al); return "success"; } public String temporary() { System.out.println("@@@@@@@@@@@@@ in the jupimg"); return "jump"; } public String getLoginname() { return loginname; } public void setLoginname(String loginname) { this.loginname = loginname; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public List getCalToDatabase() { return calToDatabase; } public void setCalToDatabase(List calToDatabase) { this.calToDatabase = calToDatabase; System.out.println("This is at Setter"+calToDatabase); } }
faces-config.xml
<?xml version="1.0"?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <faces-config> <managed-bean> <managed-bean-name>Database</managed-bean-name> <managed-bean-class>com.persistent.parashar.database.Database</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> </managed-bean> <navigation-rule> <from-view-id>/jsp/login.jsp</from-view-id> <navigation-case> <from-action>#{Database.temporaryMethos}</from-action> <from-outcome>success</from-outcome> <to-view-id>/jsp/resultforsuccess.jsp</to-view-id> </navigation-case> <navigation-case> <from-action>#{Database.temporaryMethos}</from-action> <from-outcome>fail</from-outcome> <to-view-id>/jsp/resultforfail.jsp</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>*</from-view-id> <navigation-case> <from-action>#{Database.temporary}</from-action> <from-outcome>jump</from-outcome> <to-view-id>/jsp/ep.jsp</to-view-id> </navigation-case> </navigation-rule> </faces-config>
ep.jsp
<%@ page contentType="text/html"%> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%> this is experiment only <f:view> <html> <head><title>JSF Simple Login Example</title></head> <body> <c:forEach var="ll" items="${Database.getCalToDatabase}"> // List in database class <c:out value="${ll}"/><br> // ArrayList item </c:forEach> </body> </html> </f:view>
show more
17 years ago
JSF