本帖最后由 sky2434550330 于 2013-12-30 09:37:12 编辑

解决方案 »

  1.   

    这项目搭建无非就是加一些包,写一些配置,主要就是繁琐。如果你对springMVC不熟悉就更难了,在网上看例子也就是搭对了也云里雾里,做开发的时候会发现好多问题,莫句其秒的问题。我这个的springMVC视频,一共5个小时的吧,不用全部看,里面从xml配置到annocation配置都有详细介绍springMVC教程springMVC。这两个都不错的,很详细
      

  2.   


    好像是路径问题,我改了一不管用,报404
    十二月 30, 2013 10:16:49 上午 org.springframework.web.servlet.DispatcherServlet noHandlerFound
    WARNING: No mapping found for HTTP request with URI [/0miss1/hello.html] in DispatcherServlet with name 'spring'
      

  3.   


    我粘贴错了!HTTP Status 404 - /0miss1/hello.jsptype Status reportmessage /0miss1/hello.jspdescription The requested resource is not available.
    Apache Tomcat/6.0.37要看看我的配置吗
      

  4.   

    ip:端口/项目名/xxx.jsp   你看看是什么问题。
      

  5.   

    404错误和你用springMVC关系不大。你看看是不是路径输入不对
      

  6.   

    我把代码贴上吧index.jsp<html>
    <head>
    <title>Spring 3.0 MVC</title>
    </head>
    <body>
    <a href="hello.jsp">SAY HELLO</a>
    </body>
    </html>
    hello.jsp<html>
    <head>
    <title>Spring 3.0 MVC Series:Hello World</title>
    </head>
    <body>

    ${message}
    </body>
    </html>spring-servlet.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.0.xsd"> 
        <context:component-scan
            base-package="net.viralpatel.spring3.controller"/> 
        <bean id="viewResolver"
            class="org.springframework.web.servlet.view.UrlBasedViewResolver">
            <property name="viewClass"
                value="org.springframework.web.servlet.view.JstlView"/>
            <property name="prefix" value="/WEB-INF/jsp/" />
            <property name="suffix" value=".jsp"/>
        </bean>
    </beans>
    web.xml<?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
        id="WebApp_ID" version="2.5">
        <display-name>0miss1</display-name>
        <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
        </welcome-file-list> 
        <servlet>
            <servlet-name>spring</servlet-name>
            <servlet-class>
    org.springframework.web.servlet.DispatcherServlet
            </servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>spring</servlet-name>
            <url-pattern>*.html</url-pattern>
        </servlet-mapping>
    </web-app>
            
      

  7.   

    http://blog.csdn.net/u010469432/article/details/17587699你可以看看这篇文章,我里面写的有源码,是我在工作中开发商业项目用的框架。用的就是springMVC 数据库使用的是SQLServer  。里面写好的有登陆功能。如果你用的不是SqlServer,只需要更改jdbc.properties文件的配置即可。
      

  8.   

    404找不到文件,如跳转到的某个html、jsp文件
      

  9.   

    建议别去百度搜那些乱七八糟的复制不知道多少遍了的教程,去官方网站直接用maven搞一个样例好好研究下