[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

JSP QueryString Problem

Posted on 2001-07-21
4
Medium Priority
?
294 Views
Last Modified: 2006-11-17
Hello,
I am using Tomcat 3.21 for JSP.
I am facing a problem with jsp. I want to send some information to other jsp page.
When I use a url like this in frame src:

<FRAME SRC="displayMessages.jsp#current?rn=<%=roomname%>" name="MessageWin">

other page is unable to retrive querystring value and
request.getParamter("rn") returns null

Then I have to use url like this to get that querystring value

<FRAME SRC="displayMessages.jsp?rn=<%=roomname%>" name="MessageWin">

I have to remove #current from the src attribute.
I want to include #current becuase I want to scroll page down to appropriate
place on displayMessage.jsp.

Is there any solution to this problem.

Sukhwinder Singh  
 

 


   

0
Comment
Question by:Sukhwinder Singh
  • 2
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
a.marsh earned 150 total points
ID: 6305403
I would recommend leaving the #current out.

What you can do is add this to the <body> tag of the page displayed after the form submission:

onload="window.location.hash = 'current';"

:o)

Ant
0
 

Author Comment

by:Sukhwinder Singh
ID: 6305461
It means there is problem with JSP engine....
Is it?

OK I'll try it and then tell you I think it'll work.........
0
 
LVL 15

Expert Comment

by:a.marsh
ID: 6305827
Not sure - but if you think about it there should never be this kind of "situation" with a URL as you would normally submit details via a form and then there would never be a #current.

:o)

Ant
0
 

Author Comment

by:Sukhwinder Singh
ID: 6319700
Your method work but I have also found a solution to my problem...
It will work if we write like this
<FRAME SRC="displayMessages.jsp?rn=<%=roomname%>#current" name="MessageWin">
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses
Course of the Month18 days, 14 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question