Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Struts
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Struts
get data from database when jsp page load
Alan Jeri
Greenhorn
Posts: 4
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I want to known how to get data from database when the
jsp
page first load on the WebServer,but I don't want to user JSTL tag
Bharadwaj Adepu
Ranch Hand
Posts: 99
posted 15 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
you can use the scriptlet tags i.e.
<% 'your
Java
Database connection and data fetching stuff here' %>
SCJP 1.5
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
If you follow modern web application best practices, this is the type of thing you'd do in the page controller
servlet
before the JSP is invoked.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Alan Jeri
Greenhorn
Posts: 4
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have start my project with struts2 + spring + hibernate ,
I don't want to use scriptlet ,because I think it is hard to vindicate.
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes, avoid scriptlets.
If you are using
Struts
, the pages prep action is the perfect place to delegate this type of activity.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Alan Jeri
Greenhorn
Posts: 4
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
but I don't know how to go to the action when the jsp page first load,This is my problem
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
You go to the action first.
Since this has become about Struts, I've moved it to the Struts forum.
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
Alan Jeri
Greenhorn
Posts: 4
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
but Do it like this, look not very good ,thank you all the same!
They gave me pumpkin ice cream. It was not pumpkin pie ice cream. Wiping my tongue on this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
request.getAttribute from servlet on jsp page load
How to create a drop down on pageload with data from a db
Iterate a Arraylist on onclick event.
how to refresh the jsp page when onload?
Loading once with values onload
More...