File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/com/acme/search Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 44import org .springframework .web .bind .annotation .GetMapping ;
55import org .springframework .web .bind .annotation .RequestParam ;
66
7+ import javax .servlet .http .HttpServletResponse ;
8+ import java .io .IOException ;
9+ import java .io .PrintWriter ;
10+
711@ Controller
812public final class SearchController {
913
@@ -16,8 +20,10 @@ public String searchFederal(@RequestParam String q) {
1620
1721 /** Change the code given. */
1822 @ GetMapping ("/search/federify" )
19- public String createFedSearchToken (@ RequestParam String searchCode ) {
20- return "<html><body>FEDSEARCH:" + searchCode .toUpperCase ().trim () + "</body></html>" ;
23+ public void createFedSearchToken (HttpServletResponse response , @ RequestParam String searchCode ) throws IOException {
24+ PrintWriter writer = response .getWriter ();
25+ String html = "<html><body>FEDSEARCH:" + searchCode .toUpperCase ().trim () + "</body></html>" ;
26+ writer .write (html );
2127 }
2228
2329}
You can’t perform that action at this time.
0 commit comments