Solved

JSP QueryString Problem

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
stringclean challenge 26 55
Modeling a class in java 5 31
Unable to start eclipse ? 17 83
compre toata in where clue oracle 4 41
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

707 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

20 Experts available now in Live!

Get 1:1 Help Now