Solved

JSP and JDBC paging proble

Posted on 2004-08-10
7
969 Views
Last Modified: 2013-11-24
I am converting several .asp files to .jsp.

As you know, ADO provide paging function for displaying data page by page.
However, Does JDBC support this function?
Or Can you tell me how can I implement that in JSP?

By the way, would you tell me how can I translate the following ASP statements to JSP?

Request.ServerVariables("http_url")
Request.ServerVariables("url")

Here is my environment:
DataBase server:Microsoft SQL Server2000
web server:tomcat 4.1.29
JDK:Sun Micro JDK1.3
0
Comment
Question by:cstsang
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 11761417
Check this out: http://jsptags.com/tags/navigation/pager/ it is a tag library that helps you do paging.

>By the way, would you tell me how can I translate the following ASP statements to JSP?
>
>Request.ServerVariables("http_url")
>Request.ServerVariables("url")

Can you tell us what they do in ASP?
0
 
LVL 7

Author Comment

by:cstsang
ID: 11762321
Please refere:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iissdk/iis/servervariables.asp

In most case, their the same.
However, when the user browse the root directory of web site, they different.

For
Request.ServerVariables("http_url"),
it return "/index.asp"

For
Request.ServerVariables("url"),
it return "/" only.






0
 
LVL 35

Expert Comment

by:girionis
ID: 11762368
It seems that it redirects me to this:

http://msdn.microsoft.com/library/shared/deeptree/bot/bot.asp?dtcnfg=/library/deeptreeconfig.xml

Can you tell me very briefly what they do?
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 7

Author Comment

by:cstsang
ID: 11768416
HTTP_URL=>Returns base portion of the URL (same as UNENCODED_URL).

URL=>Gives the base portion of the URL.

0
 
LVL 35

Expert Comment

by:girionis
ID: 11769947
Try to use:

request.getRequestURI()

If this is not what you want then take a look here: http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/http/HttpServletRequest.html and see if any of the methods help you.
0
 
LVL 7

Author Comment

by:cstsang
ID: 11770118
Ok!
I will try this command.
By the way,I downloaded the WAR file from  http://jsptags.com/tags/navigation/pager/ ,
however I don't understand the sample code.
It is because the sample code using array (not a resultset) as a datasource.
Would you give another sample code(which is using resultset) to me for reference?

thank you very much
0
 
LVL 35

Accepted Solution

by:
girionis earned 50 total points
ID: 11770150
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
maven module vs maven project 3 110
ejb entity bean example 2 56
Print Rhino Java Array in Javascript 1 55
spring maven example issues 3 97
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

739 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