You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Shapiro <ds...@nc.rr.com> on 2005/09/01 13:40:57 UTC
Real basic question - scope
I have a jsp page that uses a class I wrote to connect to a database (mysql)
and pull up some information based on what the user fills in one of three
text boxes. I understand why if I fill in a text box once and press submit
I get my result, but I do not understand why if I press enter again without
filling in the textbox if brings up the same response again. In that, if I
type in a user's last name and press enter, I get the user's info. If I
press enter again, I get the same user's info even though I did not fill in
the text box. My mysql code opens a connection, fills an rs, displays the
results, and closes the connection. If I do not have a bean I am calling,
how do I set scope for the page to be for example just request? Is the
reason I see info even though I did not supply anything in the text box
because of the browser caching stuff, or is it tomcat? I am just a bit
confused about the whole thing and would appreciate a brief description of
what I am seeing and a good response to it.
Note: jstl is installed.
Sincerely,
David
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Real basic question - scope
Posted by Anto Paul <an...@gmail.com>.
On 9/2/05, David Shapiro <ds...@nc.rr.com> wrote:
>
> It is just a jsp page Pretty much html accept for the class for processing
> the mysql query. It uses basic jsp to display the rs data in a table with
> a
> little bit of css to snaze it up.
>
>
It will be useful if you post the relevant JSP/Java code fragments.
--
rgds
Anto Paul
RE: Real basic question - scope
Posted by David Shapiro <ds...@nc.rr.com>.
It is just a jsp page Pretty much html accept for the class for processing
the mysql query. It uses basic jsp to display the rs data in a table with a
little bit of css to snaze it up.
-----Original Message-----
From: Anto Paul [mailto:antopaul@gmail.com]
Sent: Thursday, September 01, 2005 7:50 AM
To: Tomcat Users List
Subject: Re: Real basic question - scope
On 9/1/05, David Shapiro <ds...@nc.rr.com> wrote:
>
> I have a jsp page that uses a class I wrote to connect to a database
> (mysql)
> and pull up some information based on what the user fills in one of
> three text boxes. I understand why if I fill in a text box once and
> press submit I get my result, but I do not understand why if I press
> enter again without filling in the textbox if brings up the same
> response again. In that, if I type in a user's last name and press
> enter, I get the user's info. If I press enter again, I get the same
> user's info even though I did not fill in the text box. My mysql code
> opens a connection, fills an rs, displays the results, and closes the
> connection. If I do not have a bean I am calling, how do I set scope
> for the page to be for example just request? Is the reason I see info
> even though I did not supply anything in the text box because of the
> browser caching stuff, or is it tomcat? I am just a bit confused about
> the whole thing and would appreciate a brief description of what I am
> seeing and a good response to it.
>
> Note: jstl is installed.
>
What is processing the request ? A servlet, Struts Action, JSP ?. Does it
have any instance variable that stores the input data ?.
--
rgds
Anto Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Real basic question - scope
Posted by Anto Paul <an...@gmail.com>.
On 9/1/05, David Shapiro <ds...@nc.rr.com> wrote:
>
> I have a jsp page that uses a class I wrote to connect to a database
> (mysql)
> and pull up some information based on what the user fills in one of three
> text boxes. I understand why if I fill in a text box once and press submit
> I get my result, but I do not understand why if I press enter again
> without
> filling in the textbox if brings up the same response again. In that, if I
> type in a user's last name and press enter, I get the user's info. If I
> press enter again, I get the same user's info even though I did not fill
> in
> the text box. My mysql code opens a connection, fills an rs, displays the
> results, and closes the connection. If I do not have a bean I am calling,
> how do I set scope for the page to be for example just request? Is the
> reason I see info even though I did not supply anything in the text box
> because of the browser caching stuff, or is it tomcat? I am just a bit
> confused about the whole thing and would appreciate a brief description of
> what I am seeing and a good response to it.
>
> Note: jstl is installed.
>
What is processing the request ? A servlet, Struts Action, JSP ?. Does it
have any instance variable that stores the input data ?.
--
rgds
Anto Paul