When it comes to OpenId, Yahoo has some real trust issues. Getting Yahoo to work with OpenId wasn’t  difficult at all. But when I signed-in to Yahoo from my website , this is the message that greeted me

Warning: Yahoo! cannot verify this website. We recommend you do not share any personal information with this website.

For a second, I was scared to signin to my own website !!!

So far, I have tested OpenId with Google, Yahoo, and MyopenId – this is the only provider I have found which is so touchy. (If this is for a good reason, then why don’t others care as well ???)

Anyway- this is how I fixed this…

Basically, you need to provide an XRD document to the OpenId provider. This blog post is an excellent read on this -

http://blog.nerdbank.net/2008/06/why-yahoo-says-your-openid-site.html

Another good resource I found was http://wilkinsonlab.ca/home/node/31

These two resources cover it all, but in case you are looking for grails or Acegi specific advice- following might help.
Continue reading »

 

This is a bare- bones Jboss tutorial

What will you need ?

jboss (obviously duh !!!) You can download from here (I used Jboss 4.0.5 GA )

And ANT to compile,build  and deploy

And 20 minutes of your time

What will we achieve ?

A quick on its feet Jboss tutorial which uses a stateless session bean to say hello to you

Assumptions

You are running your JBoss server on the default port number 1099.

This example was tested on windows XP platform- but should really work elsewhere as well.

Getting Started

Step 1: Download from here.

Step 2: Unzip the file to your file system. Lets say C:\JBossOne

Step 3: Start your JBoss server

Step 4: Open a  command prompt and then Go to the folder C:\JBossOne

Step 5: Edit build.properties and change the jboss.home to confirm to your deployment.

Step 6: Compile, Build the application- by giving the command ant package-ejb

Step 7: Deploy the application by giving the command ant deploy

Step 8: Confirm that the bean has been deployed correctly. It should give something like this on the jboss prompt

18:29:20,359 INFO  [EjbModule] Deploying HelloWorldBean
18:29:20,437 INFO  [ProxyFactory] Bound EJB Home ‘HelloWorldBean’ to jndi ‘Hello
World’
18:29:20,437 INFO  [EJBDeployer] Deployed: file:/C:/jboss_4_0_5/server/default/t
mp/deploy/tmp32046HelloWorld.ear-contents/HelloWorld-ejb.jar
18:29:20,484 INFO  [EARDeployer] Started J2EE application: file:/C:/jboss_4_0_5/
server/default/deploy/HelloWorld.ear

Step 9:Open a new command prompt and then Go to the folder C:\JBossOne

Step 10: Test your application by giving the command ant tests. You should see something like this

C:\Work\MyLabs\JBossOne>ant tests
Buildfile: build.xml

tests:
[junit] Running com.rajivnarula.tutorial.jboss.test.HelloWorldTests
[junit] Testsuite: com.rajivnarula.tutorial.jboss.test.HelloWorldTests
[junit] hey
[junit] log4j:WARN No appenders could be found for logger (org.jboss.securit
y.SecurityAssociation).
[junit] log4j:WARN Please initialize the log4j system properly.
[junit] Hello Boss
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.235 sec
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 2.235 sec
[junit]
[junit] ————- Standard Output —————
[junit] hey
[junit] Hello Boss
[junit] ————- —————- —————
[junit] ————- Standard Error —————–
[junit] log4j:WARN No appenders could be found for logger (org.jboss.securit
y.SecurityAssociation).
[junit] log4j:WARN Please initialize the log4j system properly.
[junit] ————- —————- —————

BUILD SUCCESSFUL

Voila !!!. That’s it

If you have trouble downlaoding or get error on running it- please leave a note here and I shall try to help you resolve it.

 

Looking for a JSF Tutorial or an easy to go  JSF example? Read on…

What you need ?

Tomcat server . You can download from here: http://tomcat.apache.org/download-55.cgi

And  20 minutes of your time…

What we will achieve ?

Your first JSF program. Nothing fancy. No bells and whistles- just a plain vanilla JSF program which will say hello to you.

Note: If you are looking for a JSF example to show you Backing Beans or JSF Navigation- then this is probably not for you. This is just to give you started real quick on JSF. Other good things about JSF will follow later.

Assumptions

That you are running your tomcat server on port 8080.

This example was tested on windows XP platform- but should really work anywhere.

Getting started

Step1 :D ownload the tutoral from here.

Step 2: Unzip the file under your webapps folder under Tomcat installation

Step 3: Copy this URL to your favourite browser

http://localhost:8080/jsftutorial/hellojsf.rn

Voila !!!

Tutorial explained

1) web.xml.

This specified the path for teh Faces-config file. the heart of a JSF application

<context-param>
<param-name>javax.faces.CONFIG_FILES</param-name>
<param-value>/WEB-INF/faces-config.xml</param-value>
</context-param>

This is to load the Faces Servlet before anything else.

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup> 1 </load-on-startup>
</servlet>

This will map any URL ending with *.rn to be routed to the Faces Servlet

<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.rn</url-pattern>
</servlet-mapping>

2) Faces-config.xml: Deliberately kept empty. Just a place holder for you to do greater things later on.

3) hellojsf.jsp : A very simple JSP.

4) hellojsf.txt: This is a simple text file. which can be loaded just like any other web resource.

http://localhost:8080/jsftutorial/hellojsf.txt

I have included this as a troubleshooting aid- if you are unable to load the JSP try loading this instead. This bypasses the whole faces servlet so has a better chance of being loaded

What’s Next ?

This JSF tutorial was just to get your feet wet .Next logical step would be to get introduced to JSF Navigation and Backing Beans. I will be posting a tutorial on that soon.

If this example doesnt work for some reason – please leave a note and I will try to assist. Also  see my other posts on troubleshooting  http://www.rajivnarula.com/blog/tags/troubleshooting/

© 2011 Technology Cafe Suffusion theme by Sayontan Sinha