OPINION OF THE COURT
PER CURIAM.John W. Tate appeals pro se from the District Court’s order dismissing his second amended complaint and denying his motion for entry of a default judgment. For the following reasons, we will affirm.
I.
At all relevant times, Tate was a New Jersey state pre-trial detainee. In 2006, he filed suit against the Morris County Prosecutor’s Office and related parties alleging various misconduct in relation to his pending criminal charges. The District Court dismissed Tate’s complaint pursuant to 28 U.S.C. § 1915(e)(2)(B) for failure to state a claim, and Tate appealed. We affirmed in part, vacated in part, and remanded. See Tate v. Morris Cnty. Prosecutors Office, 284 Fed.Appx. 877 (3d Cir.2008). We agreed with the District Court that Tate had failed to state a claim, but we were concerned from his multiple incomplete filings that he was attempting to state claims of denial of access to the courts and unconstitutionally inadequate medical care. Thus, in light of Tate’s pro se status, we remanded for the District Court to give him an opportunity to file a single, concise amended complaint on those claims only. See id. at 880 & n. 2. In doing so, we “emphasize[d] that Tate [was] not to reassert claims that the District Court has already addressed” or “reallege the conduct allegedly giving rise to those claims.” Id. at 880.
On remand, the District Court entered an order providing Tate with a period of time to file an amended complaint and notifying him that it would screen any amended complaint for possible dismissal under § 1915(e)(2)(B). Tate filed a 48-page amended complaint, which consisted largely of allegations that we had directed him not to repeat and otherwise failed to comply with Rule 8 of the Federal Rules of Civil Procedure. On the defendants’ motion, the District Court struck Tate’s amended complaint for those reasons and gave him one more opportunity to amend. Tate then filed a second amended complaint, which is materially indistinguishable from his first. The District Court initially took no action on the complaint, *645and Tate later filed a motion for a default judgment. By order entered August 10, 2010, the District Court denied that motion and dismissed the second amended complaint with prejudice for failure to state a claim. Tate appeals.1
II.
The District Court thoroughly reviewed Tate’s second amended complaint and concluded that it does not state a claim for denial of access to the courts or deliberate indifference to Tate’s medical needs. In particular, the District Court concluded that Tate has not identified any non-frivolous legal claim that defendants’ alleged conduct prevented him from pursuing. See Monroe v. Beard, 586 F.3d 198, 205 (3d Cir.2008) (citing Christopher v. Harbury, 536 U.S. 403, 415, 122 S.Ct. 2179, 153 L.Ed.2d 413 (2002)). The District Court also concluded that Tate’s mere allegation that he has been “exposed” to inmates with HIV and other contagious diseases does not give rise to an inference that Tate (as a pre-trial detainee) was “punished” in violation of the Fourteenth Amendment. See Stevenson v. Carroll, 495 F.3d 62, 67-68 (3d Cir.2007). For the reasons more fully explained by the District Court, we agree. We also agree that the District Court properly dismissed the complaint with prejudice and without leave to amend because no further opportunity to amend was warranted.
Tate argues that the District Court should have granted his motion for a default judgment because the defendants did not file a responsive pleading and should not have dismissed his complaint in the absence of such a pleading. We reject both arguments. On remand, the District Court notified Tate that it would screen any amended complaint pursuant to § 1915(e)(2)(B), and that is what we construe it to have done in its order of dismissal. Thus, the District Court did not err in denying Tate’s motion for a default judgment or in dismissing his complaint in the absence of a responsive pleading. See Roman v. Jeffes, 904 F.2d 192, 195 (3d Cir.1990) (“[T]he appropriate time to make a decision to dismiss a case pursuant to [former § 1915(d) ] is before service of a complaint.”).
Accordingly, we will affirm the judgment of the District Court.
. We have jurisdiction pursuant to 28 U.S.C. § 1291. We interpret the District Court’s sua sponte dismissal of Tate’s second amended complaint as a dismissal before service under § 1915(e)(2)(B), and our review of that ruling is plenary. See Allah v. Seiverling, 229 F.3d 220, 223 (3d Cir.2000). We review the District Court’s denial of a motion for a default judgment for abuse of discretion. See Chamberlain v. Giampapa, 210 F.3d 154, 164 (3d Cir.2000). In addition to filing a second amended complaint, Tate filed a purported mandamus petition directed at New Jersey state officials, which the District Court dismissed on June 16, 2009. Tate did not appeal from that order and raises no issue regarding it on appeal.