This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

simple doubt in jsp  RSS feed

 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody ,
i am new to jsp . i have a simple doubt .
i have a jsp page ( index.jsp ) that has one link 'extra option'
when i put my cursor on it , it show me the url at the bottom of browser that is , http://www.test.com/index.jsp?extraoption=true
my problem is , how this link will get resolve . like i have made a simple project previously in which i gave this link like this
http://www.test.com/next.jsp
i hope my doubt is clear to you , how this type of link works :
http://www.test.com/index.jsp?extraoption=true

thanks in advance .
pooja .
 
Rajendar Goud
Ranch Hand
Posts: 220
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pooja,
am not sure of your doubt ,but the extraOption and etc options are called as QueryStrings. ie,the portion starting after the '?'.in your case
'extraoption=true'.

If you wanted to make sure that the Browser doesnt show these options, when u put the cursor on a link or so ,then you need to handle it with javaScript Window options function.


Thanks
Raj
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pooja,
It means you are requesting a dynamic resource with one or more parameters. Infact your mentioned URL uses doGet() method of HTTP.

In your case your index.jsp would be the JSP resource, and
extraoption would be your request parameter.

cheers.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pooja,

It sounds like you're new to web programming altogether.
You should really work your way through some tutorials or pick up some books on both HTML and JSP/Servlets/Java before posting questions here.

There is a nice chapter on HTML forms in this JSP/Servlet book:
http://csajsp-ch

Good-Luck,
-Ben
 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No ben , I am not that much new to it .
As I told you that previously I have made a college project but that has only JSP pages and I gave link as I told you .
But this thing I am not able to understand :
http://www.test.com/index.jsp?extraoption=true
please help .
thanks .
pooja .
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name/value pair after the question mark '?' is a query string variable.
Your asking about them is what leads me to believe that your still somewhat new to web programming. They're a fundamental part of it. They're not specific to JSP or Java.

http://www.google.com/search?hl=en&q=query+string+variables+tutorial&btnG=Google+Search
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am new to jsp


I am not that much new to it .


Which is it?

Ben is correct in that, if you do not understand basic HTTP URL structuring, that you have some learing to do.

The portion after the ? in the URL indicates the request parameters that are passed to the named resource. In this case, index.jsp.
[ January 17, 2005: Message edited by: Bear Bibeault ]
 
rangam
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jsp is good compared to Servlets
 
pooja jain
greenhorn
Ranch Hand
Posts: 213
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what was that ?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What we used to call line noise in the old days of analog electronics.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi pooja ,
Although Its late but helpful .

http://www.test.com/index.jsp?extraoption=true

http -> protocol
www.test.com -> host & port -> ( 100.21.01.21:9002 )
index.jsp -> path ( particular location )
extraoption=true -> extra string ( parameter name : extraoption & parameter value = true )
[ January 24, 2005: Message edited by: rathi ji ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!