query-parameters

When to use query parameters versus matrix parameters?

Query parameters: http://example.com/apples?order=random&color=blue Matrix parameters: http://example.com/apples;order=random;color=blue When should one use query parameters versus matrix parameters? Why can matrix parameters be used in the middle of a URL but query parameters cannot? For example: http://example.com/apples;order=r...

My SQLParameter isn't passing NULL correctly.

I have this C# webform that has has a date picker box. If the date is set to nothing (the default) I want it to pass NULL to the database. This happens inside my parametrized query. SqlParameter CMActionDate = new SqlParameter(); CMActionDate.ParameterName = "@ActionDate"; if (ActionDate.Equals("")) { CMActionDate.Value = Syste...

Passing CGI arguments to an executable in Apache on Windows

I was under the impression that I could put any old executable program in the cgi-bin directory of Apache and have it be used as a CGI script. Specifically, if I have a C# program static class TestProg { static void Main(string[] args) { Console.Write("Content-type: text/plain\r\n\r\n"); Console.WriteLine("Argum...

Any justification for an IT policy that query parameters should not be used?

My company, which builds ad server, affiliate network, contact form and CRM software was acquired last year, and we are now in the process of reworking our technology to fit the IT policies and guidelines of the parent corporation. One of these policies is a tremendous sticking point and causing all sorts of problems for us: No quer...

JSF adding query parameters

I am using JSF and I have a backing bean method which does some processing and sets a variable 'outcome' which then decides the next page to navigate to depending on the faces-config.xml navigation rules. What I want to do is add parameters to the URL (in the backing bean?) when the next page is navigated to. However in the Handler wh...

Parameters in a report

I am using microsoft reporting 2008 and I would like to set parameters in this report. I do not want to pull back a list that contains the same...such as year...I pull up my parameter and I have a hundred 2010...I just want one to appear in the parameter but I want my report to show all hundred. How do I do this? ...

When to use a routing rule vs query string parameters with asp.net mvc

We're considering moving forward with a ASP.NET MVC project and the subject of routing versus parameters came up. Seeing as how you can easily set up either or a combination of both in ASP.NET MVC, are there any considerations that I should be aware of when using one or the other? ...

How to properly encode "[" and "]" in queries using Apache HttpClient?

I've got a GET method that looks like the following: GetMethod method = new GetMethod("http://host/path/?key=[\"item\",\"item\"]"); Such a path works just fine when typed directly into a browser, but the above line when run causes an IllegalArgumentException : Invalid URI. I've looked at using the URIUtils class, but without success...

use a variable for table name in mysql sproc

I'm trying to pass a table name into my mysql stored procedure to use this sproc to select off of different tables but it's not working... this is what I"m trying: CREATE PROCEDURE `usp_SelectFromTables`( IN TableName varchar(100) ) BEGIN SELECT * FROM @TableName; END I've also tried it w/o the @ sign and that just tells me ...

How passa parameter to IN Operator in NHibernate?

HI, I'm Trying, pass a long array for a named query (native sql) for to use in a IN STATEMENT: Like this: (...) WHERE Identificator IN (:pIdes) I tried pass my ides as long[]: ctx.GetNamedQuery("NamedQueryName") .SetParameter<long[]>("pIdes", Identificators) ...

UriBuilder incorrectly encoding Query Parameters value ?

Lets consider the following code sample where a path and single parameter are encoded... Parameter name: "param" Parameter value: "foo/bar?aaa=bbb&ccc=ddd" (happens to be a url with query parameters) String test = UriBuilder.fromPath("https://dummy.com"). queryParam("param", "foo/bar?aaa=bbb&ccc=ddd"). ...

Is it valid to have more than one question mark in a URL?

I came across the following URL today: http://www.sfgate.com/cgi-bin/blogs/inmarin/detail??blogid=122&amp;entry_id=64497 Notice the doubled question mark at the beginning of the query string: ??blogid=122&entry_id=64497 My browser didn't seem to have any trouble with it, and running a quick bookmarklet: javascript:alert(document.l...

Apache log analyzer that can handle URL parameters?

Hi, I have a web site that uses IBM Websphere Portal technology with an Apache web server inside. The content for the web site is stored in Oracle's UCM (the web content management system). When a user of the web site asks for a web page, a request like this is logged in the Apache log 10.32.3.111 - - [26/Jun/2010:11:16:09 +1000] "GE...

How to make Spring MVC Controller error out if given a query param that is not valid or with a different case?

Title pretty much says it all. One of the requirements of a web service I'm working on is that if a query param name is given that is either invalid or not case-exact with what's expected, it should give an error saying so. Is there anything in Spring MVC that can do this via configuration or some kind of setting? I imagine it's possib...

How to display full URL when setting report parameters

Hello, I have a report (in SQL Server Reporting Services 2008) that has multiple parameters, but works very well. However, one of my users (my boss, of course) wants to be able to e-mail a link to the report using the parameters they have specified. They do not want to send the report itself, but just a link to it. However, as you se...