Solved

JSP and JDBC paging proble

Posted on 2004-08-10
7
964 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
  • 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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array11 challenge 16 51
JAVA part two 5 39
Java and GPO 11 46
eclipse java  build path 6 18
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…
This video teaches viewers about errors in exception handling.

708 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

16 Experts available now in Live!

Get 1:1 Help Now