Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

db connection with jstl

 
Sunflower Lala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

anyone now how to search data in mysql using jstl tag. I've tried few but it seemms didn;t work at all..no error but not working. My scenerio is, one textfield for user to enter bookid and one submit button to display selected id they search in the database. For your information i'm using netbeans 5.0 and not any jsp 2.0 or 2.1 server. I really appreciate your help, and please give me complete, simple and most important working code..if it need to work with javabeans also fine, Thanks.





 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sunflower Lala",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please give me complete


You are mistaking the purpose of JavaRanch. JavaRanch is a learning site, not a code mill. No one here is going to do your work for you. You can come here for lots and lots of great help with with your code, but you have to put in the effort.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Java Ranch

Sunflower lala I know it�s not your name and peoples not calling you by this name
Please follow the rule Java Ranch what Bear Bibeault suggested you.

By the way this question is already discussed in Java Ranch you can see that thread by this link.


JSTL tag

Or more help just go to Google and do googling.
[ August 09, 2006: Message edited by: saif uddin ]
 
Sunflower Lala
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, i know here is to discuss code not to ask anyone to do my work, i seek help. to saif, i already referred to that code (jstl search) long ago before i decide to write in here, but it didn't work it seems. I couldn't simply copy and paste my code on this site, so it hard for me to explain.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65535
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Sunflower Lala", My request that you change your display name to adhere to JavaRanch standards was not a suggestion. Valid display names are mandatory for participation on the Ranch. Please change your display name as instructed prior to your next post.

Be aware that accounts with invalid display names are removed.

bear
JavaRanch Sheriff
 
Joshua Cloch
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basically,two ways are used a lot to connect database in jsp.
one is good for prototype,what you need is to define the parameters in web.xml
of your web application and use it in your jsp page without any declaration.like this:
<context-param>
<param-name>
javax.servlet.jsp.jstl.sql.dataSource
</param-name>
<param-value>
jdbc:mysql://localhost:3306/databasename,com.mysql.jdbc.Driver,username,password
</param-value>
</context-param>


the other way is using JNDI with connection pool support.

I am sure you can find a lot of resource even in Apache website.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!