Skip to main content

Posts

Showing posts from January, 2007

Cookies empty after <cflocation> (and similar)

I just ran into an interesting issue.  I've actually seen this issue before, and fixed it before, but have never documented it before.Here is the issue:You have a page that initiates a session and maybe sets session variables.  At the end of the page, you <cflocate> somewhere else.On that "somewhere else" page, the session variable will not be set (not even defined).  This only seems to happen in some browsers (it seems [maybe] to be slower or older computers? -- haven't been able to confirm this)In order to really understand this, you need to know that when you set any cookies (and sessions set several -- most notably the CFID and CFTOKEN), the server sends a header to the page to set the cookie value.  That is main way your browser can know to set a cookie.  (you can also set cookies using javascript, however this is not applicable to the current discussion) So, when you have a page that initiates a session or sets a session variable, it needs to send somethi…

CF United 2007

Well i've been invited to come back to CF United again in 2007 to speak.  This year I will be talking about XML and specifically about ColdFusion's built in functions for creating and manipulating XML constructs.If you are a ColdFusion developer, this really is a fantastic conference and no matter what skill level you are, you always learn a ton of new things.I personally am looking forward to learning more about integrating CF and Flex 2.  For more info and registration info, click the nice picture below.

Flex 360: I'm Headed to San Jose in March

In case you haven't picked up on the excitement about Flex 2 yet, its worth checking out.  Go to www.flex.org and see what its all about.  In my efforts for self improvement, I have signed up to go to flex360 in San Jose California March 5-7 2007.Last I checked, it was filling up like crazy, so if you wants it... you better register post haste.

vchkrcpt.sh - my kick butt script for vpopmail

This script is for those who have build a qmail+vpopmail server (including qmr and some of the other distributions).This script also requires the vchkrcpt patch, which you may need to mangle to work with your config.  It seems that this patch fell through the cracks and didn't get into most of the main distributions.  It is a terrible shame, because almost all default qmail setups have a severe security issue:  they accept all email for a domain, and if an account doesn't exist, they bounce it later.  This is terrible, what with the age of SpamCop and other "spam trap" and realtime black hole lists out there.  Ponder this batman:  Somebody spams you at your domain with a bad recipient address like not_there@yourcompany.com and forges the sender to be some spamtrap like qazwsx123@spamcop.net.  If your server accepts all mail for "yourcompany.com" and then bounces it later, then it will accept this message.  It will then generate a bounce message, which it se…

Server side HTTP Post using JSP

Ok, so I use a rapid application development technology (ColdFusion or PHP) most of the time because customers demand such quick turnaround.  This time I needed to go back to goold old Java and do some integration.Our email list management service (Sound-Off 3) manages people's email lists and lets them schedule mailings, etc.  I needed to integrate a website build on JRun (using Java Server Pages aka jsp) so that when people register, it relays the info to Sound-Off 3.In ColdFusion, you can easily do this with a CFHTTP tag.  In JSP it is a little more involved.  My struggle is your benefit, b/c here is the code that does it in JSP.This code will do an HTTP POST from the WEB SERVER to the remote site, all behind the scenes on the server.  The "parameters" string contains the form values that will be sent to the remove server.  Note the leading/trailing &'s and that the form values must be URL encoded.try

{

    String stuff = null;

    String pagecontent = "&q…