package com.tian.cotrller; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import com.tian.entity.Song; import com.tian.service.SongService; import com.tian.service.impl.SongServiceImpl; /** * 查询歌曲 * @author Administrator * */ public class SearchSong extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("gbk"); //获取歌曲信息 String songName = request.getParameter("show"); //调用SongService对象 SongService sService = new SongServiceImpl(); List<Song> list = sService.getAllSongInfo(songName); HttpSession session = request.getSession(); session.setAttribute("list",list); if(list != null){ System.out.println("已有数据"); }else{ System.out.println("没有数据"); } } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doGet(request, response); } }

过桥次米线 LV2
2022年12月7日
liqingzhao6 LV12
2022年9月12日
gaojia993 LV1
2022年5月14日
听雨轩丿 LV10
2022年3月14日
我在家喝小叮当 LV2
2022年1月5日
cc52013 LV1
2021年12月13日
gfg1313 LV1
2021年11月2日
cc123456RR LV5
2021年10月27日
小狮子12 LV1
2021年1月5日
2391490703 LV7
2020年12月27日