This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I am trying to connect to the database and I tested as an java application and it was ok but no success as a Web app. I am using eclipse with it and MS Access.
This is my code for the login:
This is the process.jsp page:
Should I put request or session??
This is the class:
DO I have to create a session in the class like and then set the atributes like :
But that means I have to use a Servlet?? Is that the only solution to my problem to use a Servlet Or Can I put declare this in the process page?? As it is only for testing anyway.
I have another way to do to where I create and 2 methods in the class to open and close the connection in the process.jsp page.
Anyone opinion woulb be welcome ok
Thanks
campos teixeira
Ranch Hand
Joined: May 23, 2004
Posts: 51
posted
0
The above method if(myBean.validate()) in the jsp page is authenticate not validate.
Also Can I put this in the code to instantiate the bean like: import java.util.ResourceBundle; and inside the authenticate method ResourceBundle bandle = ResourceBundle.getBundle("data04");
Is that the way to do it?? The code compiles but only calls the process.jsp page and doesnt connect to the database??
Bauke Scholtz wrote:There are too much and I am not motivated enough to point them all out.
But I would say, this one really, really, surprised me:
I can spot at least 5 (think)faults in here.
Hahah! I guess I'm not getting very logical here. I do a dummy copy and paste here and there, so I guess that's one of the reasons why it isn't correct.
I get the idea from here:
I don't understand this line as you put:
The other one was:
And due to the rule of using the dispatcher servlet, I can't use these servlets in my program.