Re: A question regarding accessing parameters after the ? ina URL

2003-03-06 Thread Erik Price


p niemandt wrote:
As far as I know you should separate parameters with an ampersand ...

Build up your query string, end this with a question mark and append
your parameters with the ampersand ...
ie. Something like 

MyFavourite.JSP?id=2path=myprojectparam1=2param2=3

etc, etc...
Don't forget to use an entity ( amp; ) if you're hardcoding any of 
these paths into your JSPs or HTML pages, /especially/ if you're 
outputting XML.



Erik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: A question regarding accessing parameters after the ? ina URL

2003-03-06 Thread Kwok Peng Tuck
So you want to catch parameters eh ? Ok , take this for a example:

http://localhost/webapps/index.jsp?param1=Rubbishparam2=More+Rubbish

In index.jsp if you use the following command in a scriplet ,
  
   String temp = request.getParameter(param1) ;

You will get the string value of  the parameter param1, null if no such 
parameter exists. You don't need to take the entire string and parse it.
You can repeat this for param2.

You could also get a enumeration of the paramaterNames and  attribute 
values as well. 
Hope it helps.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]