Solved

JSP and JDBC paging proble

Posted on 2004-08-10
7
967 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
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet requestdispatcher include and forward differences 1 30
replace a word with other 1 44
oracle 11g 23 73
Convert from a json string array to a Java object 3 28
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…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
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…

813 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

18 Experts available now in Live!

Get 1:1 Help Now