@GET
	@Path("/serachItems")
	@Produces(MediaType.APPLICATION_JSON)
	public Response serachItems(@QueryParam("itemId") String itemId,
			@QueryParam("itemType") String itemType,
			@Context HttpServletRequest request) {

		HttpSession session = request.getSession(true);
		System.out.println("in serch" + itemId);
		SearchProcess searchProcess = new SearchProcess();
		
		//resetting
		session.setAttribute("likedTrackFound", null);
		session.setAttribute("likedAlbumFound", null);
		session.setAttribute("likedArtistFound", null);
		session.setAttribute("likedGenreFound", null);
		//resetting endsw
		
		List<Tracks> tracksList = new ArrayList<Tracks>();
		List<Albums> albumList = new ArrayList<Albums>();
		List<Artists> artistList = new ArrayList<Artists>();
		List<Genre> GenreList = new ArrayList<Genre>();
		
		
		String isTrackFound = null;
		String isAlbumFound = null;
		String isArtistFound = null;
		String iskedGenreFound = null;
		
		
		
		session.setAttribute("searchedTracks", tracksList);
		session.setAttribute("searchedAlbums", albumList);
		session.setAttribute("searchedArtist", artistList);
		session.setAttribute("searchedGenre", GenreList);
				
		
		
		
		session.setAttribute("isTrackFound", isTrackFound);
		session.setAttribute("isAlbumFound", isAlbumFound);
		session.setAttribute("isArtistFound", isArtistFound);
		session.setAttribute("isGenreFound", iskedGenreFound);
				
		
		
	//track	
		if (itemType.trim().toLowerCase().equals("track")) {
			tracksList = searchProcess.serachtracks(itemId);
			session.setAttribute("searchedTracks", tracksList);
			session.setAttribute("isTrackFound", "true");
		}
		// request.setAttribute("searchedTracks", tracksList);
		
		for (Tracks track : tracksList) {
			System.out.println(track.getTrackId() + " " + track.getAlbumId()
					+ " " + track.getPrice());
		}

		
	//album	
		if (itemType.trim().toLowerCase().equals("album")) {
			albumList = searchProcess.searchAlbums(itemId);
			session.setAttribute("searchedAlbums", albumList);
			session.setAttribute("isAlbumFound", "true");
		}
		// request.setAttribute("searchedAlbums", albumList);
		
		for (Albums album : albumList) {
			System.out.println(album.getAlbumId() + " " + album.getPrice());
		}
		
	//Artist
		if (itemType.trim().toLowerCase().equals("artist")){
			artistList = searchProcess.searchArtist(itemId);
			session.setAttribute("searchedArtist", artistList);
			session.setAttribute("isArtistFound", "true");
		}
		for (Artists artist : artistList) {
	
			System.out.println(artist.getArtistId() + " " + artist.getRating());
		}
		
	//Genre
		if (itemType.trim().toLowerCase().equals("genre")){
			GenreList = searchProcess.searchGenre(itemId);
			session.setAttribute("searchedGenre", GenreList);
			session.setAttribute("isGenreFound", "true");
			
		}
		for (Genre genre : GenreList) {
			System.out.println(genre.getGenreId() + " " + genre.getRating());
		}
		
		
		
		System.out.println("test git");
		return Response.status(200).entity(new User(1, "amol")).build();
	}