T Mishra

Ranch Hand
+ Follow
since Apr 04, 2006
T likes ...
Eclipse IDE Java Ubuntu
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by T Mishra

Is it possible to change the document structure to
Then you can use $or operator in query
8 years ago
let's use the basic datatable of primefaces as shown here.
Since the values aren't null, lets try using instead <p:dataTable> of <h:dataTable>
Hi Pradeep,

Welcome to the Ranch !

What have you tried so far and the what problems have you faced ?
Welcome to the Ranch

This is how I can think of -
1. Site implements Comparator. Compare by site name.
2. Association - Emp -> TreeSet<Sites>
3. Overide Intercepor -> onLoad() for emp, Use criteria with order by clause to load sites
in this mini project, put a breakpoint at etudiant.getEtudiantList and check if the function is getting called. If yes, check if the list contains values.

The thing here is we will load the entity class as well as the respective .hbm.xml files eagerly when we load our dataAccess.xml file of Spring which contains all the .hbm.xml referenced.

. Looks like you've already externalized queries.. I think, you can load named queries of the respective dao when needed using this approach.

System.out.println("You made this database, take charge of this");
System.out.println("Failed to connect the database");

what is this condition for? Even if the connection object is created you'll get a message - Failed to connect the database
Most of the configuration I can think of is limited to lazy load during application startup. That is, the file loading is a one time activity at application statup using Configuration#addCacheableFile. But this does not fit into your requirement. If I understand correcly, you want to load named queries for the daos based on request. I am still looking into the solution. But i think its better to take suggestions from Bartenders / Marshals or an expert.

Edit - Named query loading on demand, Temporary solution to improve hibernate startup, example
Its not a good practice to create connection in init() method. Read more here ..database connection in init() of servlet
Is this defined in error.html ?

<location> /error.html </location>

is the location relative to current directory ? It looks to be present in the context root.

examples - Setting Error Pages by Using the web.xml Template, JSP isErrorPage Example

I wish to make "h.get(MANU_ID)", readOnly, so that it can't be edited.

HTML table is read-only by default. Are you missing any information here ? In the mean time, check this out.

About exception handling, think what you'd like to do in case of exception. Do you want to display a different page or an empty table or an error page.
just noticed, its incorrect method usage. Check the API docs for correct method definition here.
...which means that the driver jar file is missing from the classpath.