This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use Meta Refresh Tag  RSS feed

 
arun mahajan
Ranch Hand
Posts: 305
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Everybody,
I was writing some codes in JSp and I tried using Meta Refresh Tags for redirecting. The purpose is to let user wait for some seconds and than redirect to next JSp file automatically.
But when I pass the parameters with the same it only accepts the parameter till it get space with it. e.g.:
if I use
<META HTTP-EQUIV=Refresh CONTENT="2; URL=<%= http://www.xyz.com/test/test.jsp?var1=xyz&msg=this is test&telno=919810245076 %>"/>
Now problem is my next JSp is just able to accept var1=xyz
nsg=this
that means it leaves everything after the space.
If i try using following tag:
<META HTTP-EQUIV=Refresh CONTENT="2; URL=<%= http://www.xyz.com/test/test.jsp?var1=xyz&msg=this&telno=919810245076 %>"/>
My next Jsp able to get all parameters i.e:
var1=xyz
msg=this
telno=919810245076

Can yo help me to find what exactly is the problem?
regards,
Arun
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll have to encode the data into the URL by replacing spaces by %20.
Otherwise, everything after the first space will be dropped.
When you request the value of the parameter, you'll get spaces again automatically ... (it's just an encoding to avoid spaces in the URL)
Hope this helps.
Regards,
G�nther
http://www.javacoding.net
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!