Setting Proxy for java app

hi, was playing around trying to get a rest API call to work and keep getting connection and timeout issues. Released as I am doing a HTTP request it needed to be routed via the company proxy server, here’s how I set the proxy details.

System.setProperty(”http.proxySet”, “true”);
System.setProperty(”http.proxyHost”, “130.x.x.x”);
System.setProperty(”http.proxyPort”, “80″);
System.setProperty(”http.proxyUser”, “UsernameHere”);
System.setProperty(”http.Password”, “PAsswordHere”);

Note: This was just a proof of concept to test out consuming a rest webservice, I’m not advocating this as the best way to set the proxy details.

Tags: , ,

RTC: Authentication state already initialized

Last week I got the following error message when logging in to our Rational Team Concert server [v1.0.1].

“An internal error occurred during: “Logging into 130.1.xxx.xxx”.
java.lang.IllegalStateException: Authentication state already initialized.”

Snippet from the eclipse log [Workspace\.metadata\.log]
com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invokeServiceCall(Unknown Source)
at com.ibm.team.repository.client.internal.ServiceInterfaceProxy.invoke(Unknown Source)
at $Proxy0.describe(Unknown Source)

This got me thinking about proxy server and proxy auth and figured out the problem is due to proxy server denying access due to incorrect password. The old password was cached in the General>network settings in Eclispe.

This highlighted another issue that the RTC server should be added to the “No Proxy for” list as need to go via proxy for internal network traffic.

Tags: , ,

Client side show/hide in using ibmfaces JSF components

This is a little note about showing and hiding a element(s)/control(s) from a client side event (without page refresh) using the ibm JavaServer Faces components.

The IBM documentation for the hx:behavior tag is here. But it doesn’t contain examples of how to use it and the describtion of the hx:behavior attributes is unclear in places.

behaviorAction is what you want to do (hide, show, invisible, visible etc)
targetAction requires the ID of the object you want to do the behaviorAction on.

<h:outputText style=“visibility:hidden;” id=“text7″ value=“Initially i’m hidden, “></h:outputText>
<h:outputText style=“visibility:hidden;” id=“text17″ value=“As am I! “></h:outputText>

<h:outputText styleClass=“outputText” id=“text6aa” value=“view hidden text,”>
<hx:behavior id=“behavior4″ event=“onclick” behaviorAction=“visible;visible” targetAction=“text7;text17″> </hx:behavior>

</h:outputText>

Also found that when you specify more than one targetAction you must also specify a behaviorAction for each (which is good if you want to do different behaviorActions to each target.

Note: offically hx:behavior tags aren’t supported in h:outputText, recommended to use outputlink tag.

Info from my Ibm devworks question post

Tags: , , ,

change firefox smart bar to default to google.co.uk not .com

I love new smart bar search in firefox 3 but bugged by the fact it defaults to searching google.com, so here’s what I did to make it use google.co.uk

  1. In firefox3 URL/Smart bar type: “about:config” [this brings up the adv config of firefox, don't cha know, click ok to void warrenty ;) ]
  2. Use the filter to find the property called “keyword.URL”, and change the google domain suffix from .com to co.uk, hey presto!

    keyword.URL=http://www.google.co.uk/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

all done!

Tags: , ,

YELP is avail in the UK!

Yelp is great service for reviews for resturants and bars by real people like you and I!  Hopefully they will release a UK verison of the mobile app to allow uk location base searches for pubs, resturants etc.

Check out my profile http://scottyab.yelp.co.uk/


Tags:

new years resolutions!

  • Run the Bath Half Maraton
  • Run the Bristol Half Maraton
  • Achieve BCS ISEB Software development diploma
  • IBM Web services certification
  • Complete the Action 100 bike ride for the 2nd year
  • Plan/cook healther meals [no more frozen pizza!]
  • Introduce/convince my work to join the Cycle scheme
[in no particular order]

In addtion to the normal new years resolution’s I’m planning to make a go of blogging and making relevent and useful for others to give something to the interweb ;)

Tags: ,

Running in BroadHaven

Running early satursday morning in Broad Haven on the Cosatal path.

Posted by Picasa

Running begins!

Started my running training for the commando challenge event on october 12th, by running to work, around about 2.4 miles. Only 4 weeks to train for a grueling muddy challenge.

Tags:

Action100 finished photo

picture of me finishing the action 100 ride

Tags:

Action 100 – I made it

Hi all,

I made it! After early and wet start from Bristol on Sunday morning I made it all the way to Chobham Rugby club in just less than 8hrs (cycle time), totaling a distance of 113 miles. It was a great way to see the courtyside and I really enjoyed it and raised £350 in total! :) .

Best bits:

  • Seeing the chalk white horse on the side of a hill.
  • Making it to the top of box hill and the first refreadshmnet stop and the sun coming out.
  • Getting to the lunch stop and realising only 35 miles to go.
  • Getting lost and seeing a Action 100 STOP! sign telling me to go back – really handy having those signs, the organisers know there stuff!
  • Seeing ruth waiting to pick me up when the coach got me back to bristol.

Action 100 organized it very well, signs and arrows on every junction and rest stops every 15miles or so with tasty refreshments and the lunch was a better than expected salad buffet with plenty of pasta, rice etc to stock up on!.

I’d would highly recommend doing it! in fact I will be signing up for next year as soon as they open registration. Hopefully some of you guys will join me next year? let me know if you do.

Thanks again for the sponsorship!

Scotty

Tags: ,