Solved

JSP QueryString Problem

Posted on 2001-07-21
4
255 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 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

896 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now