Link to home
Start Free TrialLog in
Avatar of KNVB HK
KNVB HKFlag for Hong Kong

asked on

JSP and JDBC paging proble

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
Avatar of girionis
girionis
Flag of Greece image

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?
Avatar of KNVB HK

ASKER

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.






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?
Avatar of KNVB HK

ASKER

HTTP_URL=>Returns base portion of the URL (same as UNENCODED_URL).

URL=>Gives the base portion of the URL.

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.
Avatar of KNVB HK

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of girionis
girionis
Flag of Greece image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial