src/main/java/js/http/captcha/Captcha.java
@Remote
	@RequestPath("image")
	public Resource getImage(String token) throws IllegalArgumentException, NoSuchResourceException {
		Params.notNullOrEmpty(token, "Image token");
		for (Challenge challenge : getChallenges().values()) {
			File image = challenge.getImage(token);
			if (image != null) {
				return new FileResource(image);
			}
		}
		throw new NoSuchResourceException();
	}
@Remote
	@RequestPath("image")
	public Resource getImage(String token) throws IllegalArgumentException, NoSuchResourceException {
		Params.notNullOrEmpty(token, "Image token");
		for (Challenge challenge : getChallenges().values()) {
			File image = challenge.getImage(token);
			if (image != null) {
				return new FileResource(image);
			}
		}
		throw new NoSuchResourceException();
	}
@ Remote @ RequestPath ( "image" ) public Resource getImage ( String token ) throws IllegalArgumentException , NoSuchResourceException { Params . notNullOrEmpty ( token , "Image token" ) ; for ( Challenge challenge : getChallenges ( ) . values ( ) ) { File image = challenge . getImage ( token ) ; if ( image != null ) { return new FileResource ( image ) ; } } throw new NoSuchResourceException ( ) ; }
Get the image identified by given token so that client is able to display it. In order to protect against recording
attack, a challenge image is identified by a token that is valid only once.
<p>
If given token does not identify a valid challenge image this method throws {@link NoSuchResourceException} and container
responds with 404 Not Found.

@param token challenge image identifier.
@return requested challenge image.
@throws IllegalArgumentException if <code>token</code> argument is null or empty.
@throws NoSuchResourceException if there is no challenge on session or token does not identify a challenge image.
Get the image identified by given token so that client is able to display it . In order to protect against recording attack a challenge image is identified by a token that is valid only once . <p > If given token does not identify a valid challenge image this method throws { @link NoSuchResourceException } and container responds with 404 Not Found .