Spring Pop-up Floating

Asked 2 weeks ago, Updated 2 weeks ago, 2 views


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" %>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <!-- jquery -->
<video id="videoPlay" width="100%" height="100%" controls autoplay muted onclick="nwindow()"></video>
function nwindow(){
    window.open("/daily/ListPopup", "_blank", "toolbar=ues, menubar=yes, width=700, height=500").focus();
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

public class PopupController {
    @RequestMapping(value="/ListPopup", method=RequestMethod.GET)
    public void popupGet(Model model) throws Exception {

Leave a tree, too.

The error is "The requested resource [/daily/ListPopup] is not available.Page " pops up or " not found." appears.


2022-09-20 16:00

1 Answers

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();

        return mav;

2022-09-20 16:00

If you have any answers or tips

© 2022 pinfo. All rights reserved.