Search Results

Search found 3 results on 1 pages for 'javarc'.

Page 1/1 | 1 

  • Using Java method to display HTML code

    - by javArc
    Hey folks, ok so this is my problem, I need to display HTML code in a jsp, which wouldn't be a problem, except a requirement for this project is that we place all the code in a public class file and have seperate methods for each chunk(header, sidebar footer, etc). Now here's where i'm confused: "Your method should take the PrintWriter as a parameter to print out each line of HTML, and should have a return type of void" What does that mean? How do I pass the PrintWriter into a method? Does this make sense to anyone?

    Read the article

  • 2 table SQL Query weird results

    - by javArc
    Ok this is driving me nuts, I need to write an SQL query that will grab product information from 2 tables. The first table 'products' contains the productId, productname, quantityperunit and unitprice. Now I can search by productname and categoryname individually, but when I try to combine the 2 I get crazy results, Here's the query: "SELECT DISTINCT productId, productname, quantityperunit, unitprice FROM products pr, categories ca WHERE pr.categoryID = ca.categoryID AND ProductName LIKE '%" + searchTerm + "%' OR CategoryName LIKE '%" + searchTerm + "%' excuse the java style in there, here it is formatted better: SELECT DISTINCT productId, productname, quantityperunit, unitprice FROM products pr, categories ca WHERE pr.categoryID = ca.categoryID AND ProductName LIKE 'Tofu' OR CategoryName LIKE 'Tofu' any help would be appreciated.

    Read the article

1