File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP java bean

 
veena bijur
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
















Please tell me what has gone wrong, have checked but not getting.
Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's a lot of code with no explanation. Please TellTheDetails.
 
veena bijur
Ranch Hand
Posts: 67
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes i agree.
Explanation:

1. Accept the department number from the user and match department number in department table in database and fetch the corresponding id,name,salary,deptno and display to user.

2. i am using java bean to carry out the task.

3. class Employee is used to store details fetched from database.

4. class DBconnection is uesd to make database connection.

5. DAO class used to get the details from department table from database.

6.employeedetails.jsp used to display contents to user, in this page i am getting error.

Thanks.

 
harish shankar
Greenhorn
Posts: 18
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What error are you getting?
 
veena bijur
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

hi,

in the last page of code, as have commented you can see, that line is causing error.


compile time error Error: dao cannot be resolved.
 
Swastik Dey
Rancher
Posts: 1601
5
Android Java Java ME
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Veena,

First of all avoid using java codes inside jsp, it was used long back. Use JSTL/Custom tags etc. No as far as your error is concerned, there is not variable called exist in your code. You need to create that variable of type
com.usebean.DAO.

 
veena bijur
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, Swastik.


As you said correct, i have used java bean tag to create the object



As you said made changes in the code. When i run the the file and enter the department number
here is the error
HTTP Status 500 - /StandardActions/empdetails.jsp (line: 15, column: 6) Invalid standard action

Could you please tell where it went wrong?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Case counts. Pay attention to detail.

And why are you using Java scriptlets in a JSP over 12 years after they have been replaced by the JSTL and EL?
 
veena bijur
Ranch Hand
Posts: 67
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes, i agree. As i am learning i just want to know how it works.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64190
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The you should be learning the right way to do things. Be sure to use the JSTL and EL in all new code.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic