Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Create an Interactive HTML Page  RSS feed

 
Steve Dyke
Ranch Hand
Posts: 1775
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a web app(just starting) that displays remote data. Right now I get the data before the page displays. Can I put an input box on the page that the user can type into and then refresh the data displayed on the page.
 
Jenn Person
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve,

Yes you can do this. You'll have to make a form, containing that input box you mentioned, and have it post to a servlet. This servlet can take those parameters and refine the displayed information by submitting a query simliar to what was used to generate the page in the first place, but this time including the submitted parameters in the WHERE claus.

After retrieving the results, attach them to the request object and forward back to the JSP page and display the updated information.
 
Steve Dyke
Ranch Hand
Posts: 1775
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain? Remember I am very new to web development.

"but this time including the submitted parameters in the WHERE claus"
 
Abdulla Mamuwala
Ranch Hand
Posts: 225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey Steve could you please tell a bit more in detail what exactly you are trying to accomplish. What Jenn explained was a typical front-end development scenerio.
Are you trying to grab information from the input box, do some processing on it and display the result to the user in the same input box ?
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Steve Dyke:
Can you explain? Remember I am very new to web development.

"but this time including the submitted parameters in the WHERE claus"


Can you read a book or some web tutorials?

Let others to explain everything basic in detail when you can find them easily on a book etc. is not good.

Thanks!
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you start here?

http://www.w3schools.com/html/default.asp

The best schools on earth are FREE!!!

Thanks!
 
Steve Dyke
Ranch Hand
Posts: 1775
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess I have misunderstood what Java in General(beginner) forum is for.

Can you recommend the right tutorial. Have have read and studied many and still have trouble understanding some of the Java concepts.

I thank everyone for any help I can get.
 
Jenn Person
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Steve,

Regarding my first post, I assumed you were displaying "remote data" that was retrieved from a database which would typically be generated by submitting an SQL statement to it.

So I was proposing you make a query that will include the user's parameters.
ex.
"Select * from Some_table" would be your first query, possibly.

"Select * from Some_table Where Some_table.some_attribute = " + attribute would be something your second query could be like.


Are you in fact using a database, and servlets? Or if not, how is this original page being created?
[ May 10, 2007: Message edited by: Jenn Person ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!