ujjwal soni wrote:Hi,
The code seems to be working. Well, here are the answers to your questions.
1) How to I change this to datasource?
A) You can create a datasource by clicking on startmenu -> run -> type odbcad32.exe
If you are having an existing datasource then simply change the bolded word with the name of your datasource
connect=DriverManager.getConnection("jdbc:odbc:MyDataSource","sa","");
Ankit Garg wrote: There must be no scripting in JSPs.
ArAsh Dex wrote:Mr/Ms Campos Teixeira
I'm new in JSP and JSF too
but i think your solution is not cool
I think it's better that use JPA (an entity bean) for Database connection with a simple JSP page with JSTL or a servlet
it's really cool and secure use JSF for authorizing users
good luck mi amigo
seetharaman venkatasamy wrote:
Jia Bin Tang wrote: I'm not using MVC 2 Model
There is no such thing called MVC2 . Model2 design is nothing but MVC
Ankit Garg wrote:I am talking about this thing
<FORM ACTION="dispatcher" METHOD="POST">
There must be a servlet mapped to dispatcher URL, just post the code of that. If you can't, then it's simple to do if you understand my instructions. Your page will give you the quantity and ID of the medicine. You can take that to get the medicine that the user chose and add it to the session as an attribute. To do this I would recommend that you build a List and add it as an attribute to the session. Whenever a new item is added to the cart, just take out the list from the session and update it. I think you'll understand what I am trying to say...
Ankit Garg wrote:Well I think you need to provide one more code and that is of the action which is handling the form of the first page. In the first page you have written the action of your form as dispatcher. You code for listEmp2.jsp is also wrong I think. There you have used an object order in line 48. But I can't find that object declared in the file. Also in line 74 you are using the object item but you have commented that object on line 97.
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.
campos teixeira wrote:data04 is the bean myBean ok