Saicharan velury

Greenhorn
+ Follow
since Jul 22, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Saicharan velury

hi harshal
from your query and code displayed i understand that you are trying to display the details of a particular question from the question table.

you have done one part that is displaying the details from a table which is your first doubt

solution to your second doubt is quite simple
create another Statement st1 and another ResultSet rs1
now in the same jsp after you have closed the existing st and rs
<code>
st1.executeQuery("select count(*) from question");
int count=0;
while(rs1.next())
{
count=rs1.getInt(1);
}
out.println(count);
</code>

i am sure this will give you the count of the questions in the same jsp page.
I'm working towards getting certified in Web component development(SCWCD).when i was referring the book "headfirst for jsp and servlets" by Kathy sierra i came across a concept of request dispatcher.after studying the concept i read a statement whose meaning i was unable to understand.The statement is

Depending on the class whose method creates a requestdispatcher the path to the resource to be forwarded to will change.

what's the relationship between the method of the class that created the requestdispacher and the path to the resource the requst will be forwared.
I'm working to get certified in SCWCD exam.when i was referring "headfirst for jsp and servlets" and studying RequestDispatcher concept i came across a statement whose meaning i did'nt understand. The statement is

Depending on the class whose method creates a RequestDispatcher the path to the resource to be forwarded to will change.

as far as i understood after setting request attributes and then using request dispatcher you forward the request to some other jsp or servlet,then in that destination servlet or jsp you can retrive their attributes using the attribute key.

what is the relation between the class creating the requestdispatcher and the resource to which the requst is forwarded.
16 years ago