DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Thread: URL Rewritting

  1. #1
    Join Date
    Feb 2005
    Posts
    55

    URL Rewritting

    In a jsp file i have the following code

    <TR>
    <TD>" + result.getString(2) </TD>
    <TD>" + result.getString(3) </TD>
    <TD>" + result.getString(4) </TD>
    <TD><a href=Comment?reviewid =" + reviewid + ">Add a comment</a></TD>
    </TR>

    In a sql i have a table with reviewID, movieTitle, review, commentID

    I want to be able to link a comment with a review. So i put the reviewID in the url and the url links to a comment.

    the servlet is used to display the comment but the commend is linked to all the reviews not a single one when i do it, the code i used to display is
    String query = "SELECT M.reviewID, M.movieTitle, M.review" + " FROM movie AS M";
    result = stmt.executeQuery(query);

    Can anyone help me correct this.

  2. #2
    Join Date
    Nov 2004
    Location
    Norway
    Posts
    1,560
    The select statement you use here will retrieve all records in the movie table,
    it has no where clause, I assume that the passed reviewID shall go into that clause.
    eschew obfuscation

Similar Threads

  1. Encypting a URL
    By John Butler in forum ASP.NET
    Replies: 0
    Last Post: 11-26-2002, 03:53 PM
  2. Replies: 0
    Last Post: 07-31-2002, 05:17 PM
  3. Caching the URL
    By gvt in forum VB Classic
    Replies: 0
    Last Post: 02-07-2001, 08:47 AM
  4. Caching the URL
    By gvt in forum VB Classic
    Replies: 0
    Last Post: 02-07-2001, 08:47 AM
  5. accessing IE 5 URL from VB
    By stephen in forum Web
    Replies: 0
    Last Post: 08-07-2000, 12:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links