KNVB HK
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("h ttp_url")
Request.ServerVariables("u rl")
Here is my environment:
DataBase server:Microsoft SQL Server2000
web server:tomcat 4.1.29
JDK:Sun Micro JDK1.3
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("h
Request.ServerVariables("u
Here is my environment:
DataBase server:Microsoft SQL Server2000
web server:tomcat 4.1.29
JDK:Sun Micro JDK1.3
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("h ttp_url"),
it return "/index.asp"
For
Request.ServerVariables("u rl"),
it return "/" only.
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("h
it return "/index.asp"
For
Request.ServerVariables("u
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?
http://msdn.microsoft.com/library/shared/deeptree/bot/bot.asp?dtcnfg=/library/deeptreeconfig.xml
Can you tell me very briefly what they do?
ASKER
HTTP_URL=>Returns base portion of the URL (same as UNENCODED_URL).
URL=>Gives the base portion of the 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.
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.
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>By the way, would you tell me how can I translate the following ASP statements to JSP?
>
>Request.ServerVariables("
>Request.ServerVariables("
Can you tell us what they do in ASP?