SSM增删改都不好使不报错也不执行sql跳转404
@RequestMapping(value = "/user")
public class UserTestController {
    @Autowired
    private UserTestService userService;

    @RequestMapping("/list")
    public String getList(ModelMap map) {
        List<Student> students = userService.getTotal();
        map.addAttribute("students", students);
        // System.out.println(userService.getTotal());
        return "/index.jsp";

    }

    @RequestMapping("/addStudent")
    public String addStudent(HttpServletRequest request,
            HttpServletResponse response) {

        Student student = new Student();

        int studentID = Integer.parseInt(request.getParameter("student_id"));
        String name = request.getParameter("name");
        int age = Integer.parseInt(request.getParameter("age"));
        String sex = request.getParameter("sex");
        Date birthday = null;
        // String 类型按照 yyyy-MM-dd 的格式转换为 java.util.Date 类
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
        try {
            birthday = simpleDateFormat.parse(request.getParameter("birthday"));
        } catch (ParseException e) {
            e.printStackTrace();
        }
        student.setStudent_id(studentID);
        student.setName(name);
        student.setAge(age);
        student.setSex(sex);
        student.setBirthday(birthday);

        System.out.println(student.getStudent_id());
        System.out.println(student.getName());
        System.out.println(student.getAge());
        System.out.println(student.getSex());
        System.out.println(student.getBirthday());

        userService.addStudent(student);

        return "redirect:index.jsp";
    }

    @RequestMapping("/deleteStudent")
    public String deleteStudent(int id) {
        Student student = new Student();
        System.out.println(student.getId());
        userService.deleteStudent(id);
        return "redirect:index.jsp";
    }

    @RequestMapping("/updateStudent")
    public ModelAndView editStudent(int id) {
        ModelAndView mav = new ModelAndView("editStudent");
        Student student = userService.getStudent(id);
        mav.addObject("student", student);
        return mav;
    }

}


<title>学生管理页面 - 添加</title>
</head>
<body>

    <h1>添加学生</h1>

    <form method="post" action="/addStudent">
        学号:<input type="text" name="student_id" placeholder="请在这里输入学号"><br>
        姓名:<input type="text" name="name" placeholder="请在这里输入名字"><br>
        年龄:<input type="text" name="age" placeholder="请在这里输入年龄"><br>
        性别:<input type="radio" class="radio radio-inline" name="sex" value="男">男
              <input type="radio" class="radio radio-inline" name="sex" value="女">女<br> 
         出生日期:<input type="date" name="birthday" placeholder="请在这里输入出生日期"><br> 
              <input type="submit" value="添加"> <input type="reset">
    </form>
</body>
</html>

ssm

2个回答

action="/addStudent">
这里应该是路径不完整吧,试一下

weixin_42344453
麦兜的光辉 是路径不对
11 个月之前 回复

没有贴其他部分的代码,这样也看不出来你哪里有问题,建议如下:1、先去掉调用service层及之下关于数据库查找的部分,return 部分直接返回 2、因为你报错404,应该是return 出错,所以你先测试一遍 request有没有问题 3、这部分没有问题了,你在测试ssm内部的语句有没有问题。 这点代码也看不出什么。 4、你分块测试一下,就知道哪里有问题了。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
事件不执行,也不报错
在ftl里面的如下语句,双击事件既不执行,也不报错   &amp;lt;TR class=&quot;tdbg&quot; id=&quot;row${bean_index}&quot; onClick=&quot;onTrClick(this);&quot; ondblclick=&quot;onGetInfo('${key}');&quot;  /&amp;gt;   最后发现上次修改的时候tr后面多了一个/,去掉就好了。 &amp;lt;TR class=&quot;tdbg&quot; i
SSM写的增删改查jsp跳转404不报错
```rn @RequestMapping("/list")rn public String getList(ModelMap map) rn List students = userService.getTotal();rn map.addAttribute("students", students);rn // System.out.println(userService.getTotal());rn return "/index.jsp";rnrn rnrn @RequestMapping("/addStudent")rn public String addStudent(HttpServletRequest request,rn HttpServletResponse response) rnrn Student student = new Student();rnrn int studentID = Integer.parseInt(request.getParameter("student_id"));rn String name = request.getParameter("name");rn int age = Integer.parseInt(request.getParameter("age"));rn String sex = request.getParameter("sex");rn Date birthday = null;rn // String 类型按照 yyyy-MM-dd 的格式转换为 java.util.Date 类rn SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");rn try rn birthday = simpleDateFormat.parse(request.getParameter("birthday"));rn catch (ParseException e) rn e.printStackTrace();rn rnrn System.out.println(userService.getTotal());rnrn student.setStudent_id(studentID);rn student.setName(name);rn student.setAge(age);rn student.setSex(sex);rn student.setBirthday(birthday);rnrn userService.addStudent(student);rnrn return "redirect:index.jsp";rn rnrn @RequestMapping("/deleteStudent")rn public String deleteStudent(int id) rn userService.deleteStudent(id);rn return "redirect:index.jsp";rn rnrn @RequestMapping("/editStudent")rn public ModelAndView editStudent(int id) rn ModelAndView mav = new ModelAndView("editStudent");rn Student student = userService.getStudent(id);rn mav.addObject("student", student);rn return mav;rn rnrnrn```rn rn```rnrnrnrn rn rn rn 学生管理页面 - 首页rn rnrnrn rn rn rn rn 学号rn 姓名rn 年龄rn 性别rn 出生日期rnrn 操作rn rn rn $s.student_idrn $s.namern $s.agern $s.sexrn $s.birthdayrnrn 修改 删除rn rn rn rn rn 添加学生rnrnrnrn```rn rn```rnrn rnrn rn rn 添加学生rn rn rnrn rn rn rn 学号:rn rn rn rn 姓名:rn rn rn rn 年龄:rn rn rn rn 性别:rn 男 女rn rn rn 出生日期:rn rn rn rn rn 提 交rn rnrn rnrn rn rn rn rn rnrn```rn rn```rn rnrn rn rn 编辑学生rn rn rnrn rn rn rn 学号:rn rn rn rn 姓名:rn rn rn rn rn 年龄:rn rn rn rn 性别:rn 男rn 女rn rn rn rn 出生日期:rn rn rn rn rn rn 提 交rn rnrn rnrn rn rn rn rnrnrnrnrn```
servlet内部跳转if语句不执行,也不报错
n else if ("shoppingCartBooks".equals(flag)) n String username = req.getParameter("username"); n System.out.println(username+"****"); n if (username != null) n List list = bs.getAllBooksInShoppingCart(username); n req.setAttribute("list", list); n req.getRequestDispatcher("jsp/shopping.jsp").forward(req, resp); n else if(username==null) n //req.setAttribute("errorMess", "请登录!"); n System.out.println("跳转了!!"); n req.getRequestDispatcher("BookServlet?flag=allBooks").forward( n req, resp); n n n 一切正常,username也为空,打出来看了,也取到了,唯独,不进入if()条件句里面,怎么回事??也没有异常!!一切正常!!
servlet跳转报错404
没有配置xml. servlet>         servlet-name>serverservlet-name>         servlet-class>com.servlet.serverservlet-class>     servlet>     servlet-mapping>         servlet-name>serverservl
ssm不执行sql,不报错且程序接着运行
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating expression 'programa.pId != null'. Cause: org.apache.ibatis.ognl.OgnlExcepti...
JSONObject.fromObject,JSONArray.fromObject不执行,也不报错
JSONObject.fromObject,JSONArray.fromObject能输出(进入了jsons),但是执行到JSONObject.fromObject就不执行了,也不报错,请指教,下面有项目的架包。
JSON问题 不执行也不报错
for(int i=0;i
quartz 不执行也不报错是怎么回事
rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn任务类rnpublic class EveryWeekTask extends QuartzJobBeanrnrn @Overridern protected void executeInternal(JobExecutionContext arg0)rn throws JobExecutionException rn System.out.println("111111"); rn rnrnrnrn不执行也不报错rn请高手指教rn
Java代码不执行也不报错(Maven项目)
        背景:厂商反馈说中间件的客户端在被调用过程中不报错也不继续往下执行。         代码:分析得出的问题代码如下,在新建SDKClient实例时,将调用第二段代码构造器,但发现第二段代码中连第一个System.out.println都不打印。 SDKClient client = new SDKClient(); public SDKClient() { Syst...
链表的add不执行也不报错
**求大神解答,products是范型为Product的List,执行到products.add(product)的时候总是停下,也不报错,这是什么原因啊?**
ASP不报错, 不执行???
整个页面如下, 竟然不报错, 把SQL查询语句写对了, 也不执行, 重装过IIS, 最后系统都重新GHOTS了, 但还是不报错, 不执行,其它的页面有相同的程序,可以正常执行rnrnrn<%set rs=server.createobject("adodb.recordset")rn sql="select * from"rn rs.open sql,conn,1,1 %>rn rn <%=rs("content")%>rn <% call closetable(rs)rn call closeconn()%>
SSM框架跳转Controller后出现404
[img=https://img-bbs.csdn.net/upload/201805/11/1526039108_102960.png][/img][img=https://img-bbs.csdn.net/upload/201805/11/1526039117_19977.png][/img]rn如上,进入controller之后,显示The requested resource (/ssm-blog/blog/blog/createBlog.jsp) is not available.rn为什么出现了两个/blog,然后报错。
记录:遇到的问题Spring跳转也页面报错404
使用的是Springmvc。跳转页面遇到404
SSM框架,请求不到Controller,后台不报错,前端404
先贴一下我的代码rn[img=https://img-bbs.csdn.net/upload/201903/25/1553484439_492917.png][/img][img=https://img-bbs.csdn.net/upload/201903/25/1553484439_761579.png][/img][img=https://img-bbs.csdn.net/upload/201903/25/1553484439_950737.png][/img]rnrnrnrn下面是我访问的时候后台打印的信息但是很奇怪不报错(post、get都试了)rn[img=https://img-bbs.csdn.net/upload/201903/25/1553484481_721274.png][/img]
404跳转
.htaccess 文件DirectoryIndex index.html index.php index.htm ErrorDocument 404 /404.html自己做一个404.html
不显示错误,也不执行????
rnrn<%rndim user_name,user_type,expiretime,moditimern user_name=trim(request.form("user_name"))rn user_type=trim(request.form("user_type"))rn expiretime =trim(request.form("expiretime"))rn newtime=dateadd("m",expiretime,date)rn rn moditime=date()rnselect case user_typern case "gc"rn conn.execute "update user_main set gc='1',moditime=moditime,expiretime=expiretime where user_name='"&user_name&"'"rn case "jc"rn conn.execute "update user_main set jc='1',moditime=moditime,expiretime=expiretime where user_name='"&user_name&"'"rn rnend selectrn response.redirect"modiuser.asp"rn Conn.closern%>rn rn
ssm访问静态资源js报错404
我已经加入配置文件了n n是不是还好什么必要的设置呀?n我的正常跳转是可以的,就是无法访问静态资源
SSM框架访问JSP页面报错404
报错信息:rnrnrn六月 02, 2018 4:16:22 下午 org.springframework.web.context.support.XmlWebApplicationContext refreshrn警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn六月 02, 2018 4:16:22 下午 org.springframework.web.servlet.DispatcherServlet initServletBeanrn严重: Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1231)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1130)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)rn at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:676)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:642)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:690)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:558)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:499)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:172)rn at javax.servlet.GenericServlet.init(GenericServlet.java:158)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1188)rn at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1132)rn at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1021)rn at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5085)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5397)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1400)rn at java.util.concurrent.FutureTask.run(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:175)rn at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:88)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1223)rn ... 29 morernCaused by: java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.(RequestMappingHandlerAdapter.java:154)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)rn at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)rn at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)rn at java.lang.reflect.Constructor.newInstance(Unknown Source)rn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)rn ... 31 morernrn六月 02, 2018 4:16:22 下午 org.apache.catalina.core.ApplicationContext logrn严重: StandardWrapper.Throwablernorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1231)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1130)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)rn at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)rn at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)rn at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)rn at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:676)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:642)rn at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:690)rn at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:558)rn at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:499)rn at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:172)rn at javax.servlet.GenericServlet.init(GenericServlet.java:158)rn at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1188)rnrnCaused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:175)rn at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:88)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1223)rn ... 29 morernCaused by: java.lang.NoSuchMethodError: org.springframework.core.ReactiveAdapterRegistry.getSharedInstance()Lorg/springframework/core/ReactiveAdapterRegistry;rn at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.(RequestMappingHandlerAdapter.java:154)rnrn ... 31 morernrnrnrnrn项目地址:链接:https://pan.baidu.com/s/16Z_EHYhlBzatvJaJGjz9mQ 密码:uvdkrnrn
javaweb servlet 跳转404 第一个测试也404
很急 唉 所有的servlet 都不行 [img=https://img-bbs.csdn.net/upload/201805/27/1527421640_961809.png][/img][img=https://img-bbs.csdn.net/upload/201805/27/1527421647_175744.png][/img]rnrnrn[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/001/face/67.gif][/img]
C#中 timer 控件不执行也不报错怎么回事?
rnprivate void timer1_Tick(object sender, EventArgs e)rn rn string strTime = "";rn //星期一rnrn if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 1)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 2)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期三rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 3)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期四rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 4)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期五rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 5)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期六rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 6)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rnrn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn //星期日rn else if (checkBox1.Checked && Convert.ToInt32(DateTime.Now.DayOfWeek) == 7)rn rn strTime = DateTime.Now.ToString("HH:mm");rn DateTime date = Convert.ToDateTime(textBox1.Text);rn if (strTime == date.ToString("HH:mm"))rn rn cv.StarKinescope(@"d:/" + DateTime.Today.Month.ToString() + DateTime.Today.Day.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + ".avi");rn rn rn rnrn面板里面 checkBox1 选中 ,在textBox1.Text 文本框里输入 比如 17:20 Interval 属性设置为 1,超过这个时间也不执行相应的代码?rn
有关row = ps1.executeUpdate();不执行也不报错的问题
我想做个注册系统,之前运行的都好好的,但把数据库清空过一次后就出问题了。代码如下rntryrn rn Connection conn = null;rn ResultSet rs = null;rn Class.forName("com.mysql.jdbc.Driver");rn String url = "jdbc:mysql://localhost:3306/jimoran";rn String name = "root";rn String pass = "85452565";rn conn = DriverManager.getConnection(url,name,pass);//此句为被执行!rn %><%="OK1"%><% //此举被运行rn rn if(conn == null)rn rn %>数据库无法连接!<%rn %><%="OK3"%><% //正确rn rn rn else if(Password.equals(Againpass) == false)rn rn %>两次密码不一致!<%rn %><%="OK5"%><% //正确rn rn rn else if(IDnumber.length()<15||IDnumber.length()>19)rn rn %>请输入正确的身份证号码!<%rn %><%="OK4"%><% //正确rn rnrn rnrn elsern rn %><%="OK2"%><% //yunxinrn String sql = "select username from RegistTable where username = '"+Username+"'";rn %><%="OK6"%><% //运行rn PreparedStatement ps = conn.prepareStatement(sql);rn %><%="OK7"%><% //运行到这里rn rs = ps.executeQuery();//运行rn %><%="OK8"%><% rn rn if(rs.next())rn rn %>用户名已经存在!<%rn rn rn elsern rn %><%="OK9"%><% rn String sql1 = "insert into RegistTable values(?,?,?,?,?,?,?,?,?)";rn %><%="OK10 "%><% rn PreparedStatement ps1 = conn.prepareStatement(sql1);rn %><%="OK11 "%><% rn ps1.setString(1,Username);rn ps1.setString(2,Password);rn ps1.setString(3,realname);rn ps1.setString(4,IDnumber);rn ps1.setString(5,age);rn ps1.setString(6,gender);rn ps1.setString(7,telephone);rn ps1.setString(8,actor);rn ps1.setString(9,major);rn %><%="OK12 "%><% rn int row = -1; rn row = ps1.executeUpdate();//不运行,也不报错rn %><%="OK13 "%><% rn if(row > 0)rn rn %><%="OK14 "%><% rn %>注册成功!<%rn rn rn rn ps.close();rn rn rs.close();rn rn rn catch(Exception e)rn rn %><%="OK15 "%><% rn %>注册失败!<%rn e.printStackTrace();rn rnrn我用"%><%=OKXX %>"找哪句话没执行的,结果显示“OK1OK2OK6OK7OK8OK9OK10 OK11 OK12 OK15 注册失败!”
sharepoint 2010 farm solution Microsoft.Office.Interop.Word.Save()不执行也不报错
本人遇到一超级奇葩问题,求大神们指点rn环境:Sharepoint2010企业版+SQLServer2008R2+Office2010 32bitrnrn下面这段代码是点击Infopath表单中一个按钮,然后执行编辑WordrnInfoPath表单是office 2010 64bit开发的rn代码:rntryrn...rn logger.LogMessage("开始打开word");rn.....rn logger.LogMessage("开始保存");rn WordDoc1.Save();rn WordDoc2.Save();rn // WordDoc1.Close();rn WordDoc1.Close(ref Nothing, ref Nothing, ref Nothing);rn WordDoc2.Close(ref Nothing, ref Nothing, ref Nothing);rn logger.LogMessage("保存结束");rn catch (Exception e)rn rn logger.LogMessage("异常:" + e.Message.ToString());rn WordApp.Quit(ref Nothing, ref Nothing, ref Nothing);rn WordApp = null;rn rn查看log信息时,rn开始打开wordrn开始保存rnrn问题出现了:竟然没有打正常日志,也没有报错误信息rnrn我将这一块的代码抽出来,建一个Winform程序,在服务器端执行,正常运行,是不是Sharepoint有什么配置没有配啊
求教:Console.WriteLine不执行,也不报错,程序直接中断
我使用了一个线程定时器,定时输出一些东西。debug下,发现在定时器里的Console.WriteLine()不仅不执行,还会引起程序中断,并不报错。rnrn[code=csharp]static void Main(string[] args)rn rn T1 t = new T1();rnConsole.ReadKey();rnrnclass T1rnrnpublic System.Threading.Timer CloseTimer = new System.Threading.Timer(StartAndClose, null, 0, 6000);rnpublic void StartAndClose(object sender)rn rn Console.Clear();//这句执行没问题rn Console.WriteLine("Now Start To Connect...");//执行到这句,程序就中断了rnint i = 3+4; //这句压根执行不到rnrnrnrnrnrn[/code]
紧急求助: Cmd.ExecuteNonQuery()死活不执行,也不报错!
asp.net 用c#写的,上传音乐文件到指定的文件夹可以,但把相关信息写到数据库时,Cmd.ExecuteNonQuery()却怎么也不执行;rnrn string StrSql = "Insert Into qm (歌曲名称,演唱者,类别,点击次数,时间,编号) values ('" + title + "'," + content + "','" + ptype + "','0','" + DateTime.Now.ToString("yyyyMMdd").ToString() + "','" + ImageName + "')";rnrn OleDbCommand Cmd = new OleDbCommand(StrSql, MyConn);rnrnrn MyConn.Open();rnrnrn Response.Write("文件开始上传之前为:" + StrSql); //这里能显示rnrn Cmd.ExecuteNonQuery();//到这里不执行了,也不报错rnrn Response.Write("文件开始上传之后为:" + exName);//这里就不显示了rn MyConn.Close();rn Response.Write(" ");rnrnrn请高手帮忙看看!rn
急求啊,setInterval不执行,firebug也不报错
rnrn rn rnrnrn rn rn rnrnrnrn rnrn
sql计划任务也不执行啊
[img=http://img.my.csdn.net/uploads/201301/12/1357934602_9551.png][/img]rn事件类型: 警告rn事件来源: SQLSERVERAGENTrn事件种类: Job Engine rn事件 ID: 208rn日期: 2013-1-12rn事件: 0:00:02rn用户: N/Arn描述:rnSQL Server Scheduled Job 'att2000.Subplan_1' (0x33B2911B858C724B988F89A4D6DBF318) - Status: 失败 - Invoked on: 2013-01-12 00:00:00 - Message: 该作业失败。 计划 3 (测试.Subplan_1) 调用了该作业。最后运行的是步骤 1 (Subplan_1)。.rnrn设置了但是sql数据库也不自动备份啊rn
程序编译,运行都不报错,调试也没问题,但是就是不执行mapper中的sql怎么办?
  在mapper中随意删掉一个无用的字符再填上或者添加然后删除一个空格,保存后重新运行程序就好了 注意:     如果编程没有任何问题,那么就是开发软件的问题了...
ssm项目中配置文件没错,启动项目报404,控制台也不报错,
这是applicationContext.xml文件 &amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt; &amp;lt;context:property-placeholder location=“classpath:database.properties”/&amp;gt; &amp;lt;!-- mapper工厂 为接口创建对象 -...
ssm架构增删改
ssm架构增删改,springmvc+spring+mybatis
ssm增删改例子
ssm例子ssm例子ssm例子ssm例子ssm例子ssm例子ssm例子ssm例子ssm例子
ssm整合2 增删改
前端页面查询页面 编号 姓名 工资 操作 ${emp.empno } ${emp.ename } ${emp.sal } 增加 编辑 删除 增加页面 编号: 姓名: 工资:
linux 命令都不好使了解决办法
      由于linux 配置环境变量修改,修改etc/profile 配置文件出现错误,导致很多linux 命令不好使,ls /ll /vim 等命令不好使,最重要的是vim 都不好使了,想修改profile都没办法,在网上搜了半天,解决办法如下:     1,在命令行中输入:export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin  ...
config.yam为啥404不跳转呢?
各位大神我的网站是:http://www.kubo365.comrn下面是config.yaml配置:rnrnhandle:rn- rewrite: if(!is_dir() && !is_file() && path~"^(.*)$") goto "index.php/$1"rn- hostaccess: if(path ~ "App") deny "all"rn- hostaccess: if(path ~ "ThinkPHP") deny "all"rn- errordoc: 404 /my-show-id-error.htmlrn- compress: if ( out_header["Content-type"] ~ "text/html" ) compressrn- compress: if ( out_header["Content-type"] ~ "text/css" ) compressrn- compress: if ( out_header["Content-type"] ~ "text/javascript" ) compressrnrn为啥404不跳转呢?rn比如访问:http://www.kubo365.com/1rn不会跳到:http://www.kubo365.com/my-show-id-error.html
spring+quartz任务调度为什么没有报错,也不执行
[code=html]rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[code=java]package test;rnrnpublic class TestQuartz rn public void Test()rn System.out.println("我是任务");rn rnrn[/code]rn
jquery为何不报错也不执行
  重要的是这一句     &quot;&amp;lt;?php return redirect('{admin/index/login}');?&amp;gt;&quot;; php即使注释起来也会影响执行
报错--404???
我想用JAVA做个网站的,刚刚做好了用户注册页面,现在正在做用户浏览界面。可是当把现成的后台框架资源引入时报404错误,不知道咋整呀。我是看着视频一步步做的,视频上引入就没有报错那,咋滴???急~~~~都弄了一天了,谁知道呀,谢谢!rn 以下是报错:rnHTTP Status 404 - /Shopping/admin/AdminIndex.htmlrn________________________________________rntype Status reportrnmessage /Shopping/admin/AdminIndex.htmlrndescription The requested resource (/Shopping/admin/AdminIndex.html) is not available.rn________________________________________rnApache Tomcat/5.5.27rnrn
SSM启动出现404
[img=https://img-bbs.csdn.net/upload/201707/28/1501221763_333527.png][/img]rn这是工程目录,login.jsp启动出现404rnxml配置中的url-pattern我改成了/,然后听说有可能是静态资源问题我也添加了mvc:default-servlet-handlerrn[img=https://img-bbs.csdn.net/upload/201707/28/1501221940_849119.png][/img]rn结果还是404
404的ssm项目
代码为ssm框架实现简单登陆。由login.sp访问controller时报404错误。
SSM框架的404问题
SSM框架中如何在地址栏随意输入后将返回的404原始页面返回到自己的特定404页面 1. 在web.xml中加入以下配置 &amp;lt;!--配置错误的输入后返回的默认404界面--&amp;gt; &amp;lt;error-page&amp;gt; &amp;lt;error-code&amp;gt;404&amp;lt;/error-code&amp;gt; &amp;lt;location&amp;gt;/WEB-INF/...
ssm整合项目报错404
ssm整合项目报错404 同样一个项目文件在别的电脑里就可以运行,在我的电脑里就报错404;别人的项目文件导入后就可以运行;请大神救救我,是我的电脑还是eclipse出问题了。 ...
相关热词 c#入门推荐书 c# 解码海康数据流 c# xml的遍历循环 c# 取 查看源码没有的 c#解决高并发 委托 c#日期转化为字符串 c# 显示问号 c# 字典对象池 c#5.0 安装程序 c# 分页算法