Does Joffrey know who his father really is? Are there no facts for this in the later books? (I have read just the first.) Does he know about the rumors of who his father is?
He's certainly aware of the rumours as they've been shouted at him in the street and Stannis Baratheon publicises them to justify his claim to the Iron Throne. Although not dim-witted I get the impression that Joffrey is so self-centred he's never really confronted himself with the truth. Both Jaime and Cersei have admitted it to several others by the end of A Clash of Kings so I don't think it's viable to think he could remain wilfully ignorant for ever. He probably just doesn't care much either way.
My answer to this is going to be rather similar to the related question of whether Tywin Lannister knew who Joffrey's real parents were, for similar reasons. Namely, he might suspect, and might eventually have figured it out, but is in no way stupid enough to admit it out loud.
To start with, he most certainly knew by the end of Game of Thrones that his parentage was in dispute. The entire reason he had Ned Stark beheaded was for claiming that Joffrey was Jaime's son, not Roberts. Beyond that, he's at war with his "uncle" Stannis over the same rumors. Stannis has very vocally and openly proclaimed Joffrey (and the other children) to be bastard children of Cersei and Jaime, thus removing them from any claim to the throne.
It's less clear if Joffrey believes these rumors to be true. While he's not nearly as intelligent as Tywin, he's definitely smart enough to know that his only claim to the throne, and thus all the power that comes with it, is through Robert's line. He's also been shown to be rather arrogant and deluded in regards to how much he "deserves" to be king, meaning he may refuse to believe any such rumors, not on their merits, but simply because his brain can't comprehend the idea that he's not really king.
Nothing Joffrey ever says or does indicates that he believes Jaime to be his father. He continues to refer to Robert as his father, and styles himself Joffrey Baratheon, for the rest of the series. (He does try to have Bran killed, but it turns out that was not to protect the "secret", but just because his "father" Robert said it would be more merciful that way.) There are no scenes with Joffrey in them where his real parentage comes up, or where he was even in a position to overhear. I also find it unlikely that Cersei told him the truth off-screen for any reason.
Unfortunately, as he dies near the end of Storm of Swords, we'll never see a POV scene from him and we'll never know for sure.
By the end of A Storm of Swords, he has almost certainly heard the rumors (Although it is at least possible he is isolated enough that he doesn't know the truth), but he still refers to Robert as "Father", and doesn't seem to have any particular interest in Jaime, especially not as a father figure. If he is aware, he is hiding it from everyone, including Cersei.
As already stated, Joffrey must have been aware of the rumors flying about his incestuous parentage however there is no evidence that he ever knew them to be true or spared them a thought. One thing is missing however, who did Joffrey believe to be his father?
We see the following in conversation between Jaime and Cersei:
Cersei frowned. "Joffrey had no love for Robb Stark, but the younger boy was nothing to him. He was only a child himself."
"A child hungry for a pat on the head from that sot you let him believe was his father." He had an uncomfortable thought. "Tyrion almost died because of this bloody dagger. If he knew the whole thing was Joffrey's work, that might be why . . ."
ASOS - Jaime IX
So Jaime, who had been around Joffrey for all his life, states here that Joffrey was hungry for attention and affection from Robert, the man he believed to be his father. This attention-seeking behavior can be linked to Robert's negligence but why should Joffrey develop it unless he truly believed Robert to be his father? This is not the only instance where we see this complex. Joffrey had killed a pregnant cat and took unborn kittens out of the womb which I suspect is because he thought that would make Robert give him some attention. He got the attention, not quite the kind he was expecting however.
"And what were you telling him, pray? I did not fight a war to seat Robert the Second on the Iron Throne. You gave me to understand the boy cared nothing for his father."
"Why would he? Robert ignored him. He would have beat him if I'd allowed it. That brute you made me marry once hit the boy so hard he knocked out two of his baby teeth, over some mischief with a cat. I told him I'd kill him in his sleep if he ever did it again, and he never did, but sometimes he would say things . . ."
ASOS - Tyrion VI
A smart guy like Tywin immediately figures out that Joffrey actually cares about his Daddy or at least likes him enough to be proud of him. Of course Cersei glosses over the actual mischief out of fear of Lord Tywin's reaction.
Stannis gave us more details into the event:
"I suppose not." The king ran his fingers across the table. "Joffrey . . . I remember once, this kitchen cat . . . the cooks were wont to feed her scraps and fish heads. One told the boy that she had kittens in her belly, thinking he might want one. Joffrey opened up the poor thing with a dagger to see if it were true. When he found the kittens, he brought them to show to his father. Robert hit the boy so hard I thought he'd killed him." The king took off his crown and placed it on the table. "Dwarf or leech, this killer served the kingdom well. They must send for me now."
ASOS - Davos VI
Moreover before that, we find Joffrey's own statements where he shows pride in his father Robert as compared to his Grandfather.
Joffrey had that sullen, sulky look he got. Cersei had him firmly by the shoulder, but perhaps she should have had him by the throat. The boy surprised them all.
Instead of scuttling safely back under his rock, Joff drew himself up defiantly and said, "You talk about Aerys, Grandfather, but you were scared of him."
Oh, my, hasn't this gotten interesting? Tyrion thought. Lord Tywin studied his grandchild in silence, gold flecks shining in his pale green eyes.
"Joffrey, apologize to your grandfather," said Cersei. He wrenched free of her.
"Why should I? Everyone knows it's true. My father won all the battles. He killed Prince Rhaegar and took the crown, while your father was hiding under Casterly Rock. " The boy gave his grandfather a defiant look. "A strong king acts boldly, he doesn't just talk."
ASOS - Tyrion VI
So based on all this we can conclude:
- Joffrey knows the rumors.
- Joffrey actually believed that he was Robert's son.
YES...In season 3 episode 8 "Second Sons", during the wedding feast of Sansa and Tyrion, Joffrey gets up and flanked by his Kingsguard, taunts Sansa that she's still found a way to marry a Lannister. Joffrey then ponders that it doesn't matter which Lannister gets her pregnant, and openly says he might want to rape her after Tyrion is done with her, while the Kingsguard hold her down.