Hello.
It's my first time developing a spring, so I'm very inexperienced.
I want a new pop-up window to appear when I click the video tag.
I put a click event in the video tag with JavaScript, and a new window appears when I click, but I can't find the pop-up page.
I think it's a path problem, but no matter how many times I change window.open's "/daily/ListPopup," it doesn't show up as I want.
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page session="false" %>
<html>
<head>
<title>Home</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <!-- jquery -->
</head>
<body>
<video id="videoPlay" width="100%" height="100%" controls autoplay muted onclick="nwindow()"></video>
<script>
function nwindow(){
window.open("/daily/ListPopup", "_blank", "toolbar=ues, menubar=yes, width=700, height=500").focus();
}
</script>
</body>
</html>
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
@RequestMapping("/daily/*")
public class PopupController {
@RequestMapping(value="/ListPopup", method=RequestMethod.GET)
public void popupGet(Model model) throws Exception {
System.out.println("Popup");
}
}
Leave a tree, too.
The error is "The requested resource [/daily/ListPopup] is not available.Page " pops up or " not found." appears.
spring
I'm not sure if this is right, but a pop-up page appears.
@RequestMapping(value="/daily/ListPopup", method=RequestMethod.GET)
public ModelAndView popupGet(Model model) throws Exception {
ModelAndView mav = new ModelAndView();
mav.setViewName("ListPopup");
System.out.println("Popup1");
return mav;
}
585 PHP ssh2_scp_send fails to send files as intended
618 GDB gets version error when attempting to debug with the Presense SDK (IDE)
624 Uncaught (inpromise) Error on Electron: An object could not be cloned
925 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.