Aymen Benhmida

Greenhorn
+ Follow
since Jun 24, 2011
Aymen likes ...
Hibernate Spring Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aymen Benhmida

hi,
have any one ever used the hibernate-envers framework? any feedback is appreciated
verfiy your classpath it seems that you have two version of the same librairy. I think it's dbcp
12 years ago
spring roo is a RAD (Rapid Application Development), it's just a tool to help you reduce the time of setting up your java web project, configuring your spring configuration, writing your DAOs and a lot of cool stuff.
of course you don't have to use it or you can use it just as a first step in setting up a standard spring web application and for configuring database and the like.
12 years ago
actually i don't have an error but the page on the browser stays the same

when i click on submit nothing change still the same page
12 years ago
hi guys,

i have a login servlet which is supposed to extract (login/password) from database in order to authenticate a user, and a jsp containing the form to fill the data how can i make my servlet intercept the submit action from my form to do its work

in the web.xml i've done the following configuration

but this does not seem to work. What i'm doing wrong?
12 years ago
thanks for the respons,

i have also other jsp files where i have to verify that the user is still logged before doing any action. for example, the user has created some article when logged in and then he passes to the welcome page so i have to verify that he is still logged in in order to let him some other actions. And there some other pages which must respond to the same senario. So do i have to verify that he is still logged in every page or there's a more clean way to do this.
and if this is the best way how can you advice me to do it the best possibly way.
12 years ago
JSP
hi guys,

i'm a newbie in jsp development and web development in general. I need to keep track of the user logged in my web application information (login, password, IP)
what is the best way to do such thing?
12 years ago
JSP
hi,

i have two type of xml files

and

what i want is reading both types of xml files in a generic way without having to use all of an hierrachy of if statement because as you see there's a difference in the "id" attribute between both file on e is spelled id and the other is Id
any one has an idea?
hi guys,

i developed a utility jar which converts a proprietary XML file into an Excel file and vice verse. When i begun the development i was using a version 1.2 of that XML but now i'm told to make it compatible with the version 1.1.
the difference between both version is that one have different spelling for some tag or attributes and have some extra tags that the other don't have(and for which the utility was developed in the first place)
I used the sax parser for reading and DOM for writing data of the XML file.
also used the Jexcel API for Excel file.

Now i have to do some modification which i want it to have as little impact as possible on what we have now.

can anybody advise me on how to handle the desing for this utility to make it as generic as possible and if there's any design patterns which i can implement?

thank you
12 years ago
you have two choices here:
either you make hibernate order the result using the orderBy in the hql query or the the criteria whatever you are using.
or you can extract the result then put it in an orderedSet using a comparator.
but the first solution is best either for performance and for application quality. Since you delegate to db what it is doing best.
of corse the first solution is the best. Why creating a lot of objects to do some work while you need only one.
12 years ago
what you need here is what is called a separation of concerns. you have to isolate your components from each other which will make your design more flexible in case of change for example.
your servlet doesn't have to instantiate your daos. It more likely have to be done in another "class" representing your business process.
also it seems combersome for the servlet to open connections, open and close resultsets and so on, these operation have to be done in another Pojo which is responsible for them. Think of the single responsibility principle.
and as mentionned above, clearly you have to use a serviceLocator for JNDI.
12 years ago