Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Parameters and JSP includes

 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Again
I'm confused about something..
I have 2 pages..a home page and a search page.

In the home page, I included the search page
the homepage has the address



I want the search page to be able to read get variables from the address bar..that was why i include a <jsp:param>
so that in the search page i can just go

But instead of typing
in the search.jsp page..I accidentally typed the actual variable in the get




And it worked, it was only after I realized the slip! :S..
I thought when you send a form to a certain page..only that certain page should be able to read param values..hence home.jsp should only be able to read the get variables...That was i added the jsp:param
But if search page could read it..without sending a direct post or get request to it..does that mean the variables in the param are global?

Or is it because I included the search in the homepage so it was able to read directly the variables? I am going more for params variables are global..
Would be grateful if someone can clear this fog up.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grab the JSP Spec and read up on the rules of dispatcher include.
 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
em...ok this might sound like a ridiculous question...but where do I get that?
It probably contains lot of complicated stuff, doesn't it..? lol
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65111
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See the JSP FAQ.

If you are writing JSP, you need to be familiar with the specification and how to look up information within it.
 
Eman Adenola
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
very well, I shall.
Thanks for your help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic