Bonjour
J'ai besoin d'une orientation. Je suis sur un projet J2EE et je travail avec Glassfish, eclipse et le framework DAO generator.
lorsque je lance ma servlet j'ai ce message dans la console:
User [admin] from host 127.0.0.1 does not have administration access
Pourtant dans le fichiers properties j'ai renseigné les paramétres de connexion à la Base de donnée.
voici ma servlet:
public class GetListLivreServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public GetListLivreServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
Logger logger = Logger.getLogger(this.getClass().getName());
HttpSession session = request.getSession();
HopeAppProperties properties = HopeAppProperties.getInstance();
= DAOFactoryCreater creator = new DAOFactoryCreater();
DAOFactory factory = creator.getFactory();
LivreDAO dao = factory.createLivreDAO();
try{
ConnectionInfo conInfo = properties.getConnectionInfo();
Connection conn = ConnectionFactory.createConnection(conInfo);
System.out.println("connexion YES!");
FreeQuery.filterProjet(thematiq,myhope.getLogin(), conn);
ArrayList<Lives> Livre = new LivreDAO.Lister();
for (int i=0;i< thematiques.size();i++){
try{
request.setAttribute("nomThematique", thematiques.get(i).getThematiq_nom());
//
// break;
//
// }catch(NullPointerException e){
//
// }
}
}catch (ConnectionFactoryException e) {;
}
request.getRequestDispatcher("Thematique.jsp").forward(request, response);
}
}
code du properties:
#
# DataBase Configurations
#
BDHost = localhost
BDPort = 3306
BDName = pndp
BDUser = root
#BDPass =
BDDriver = com.mysql.jdbc.Driver
BDStartUrl = jdbc:mysql://
Merci
Partager