Announcement Announcement Module
Collapse
No announcement yet.
I can't view the jsp page.please help me. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • I can't view the jsp page.please help me.

    My problem of program is :The requested resource (/resume/WEB-INF/jsp/name.jsp ) is not available.

    Below is my web.xml:

    <?xml version="1.0" encoding="ISO-8859-1"?>

    <!DOCTYPE web-app PUBLIC
    "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
    "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <display-name>Resume</display-name>
    <description>This is a Resume Application</description>
    <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>resume.root</param-value>
    </context-param>

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/dataAccessContext-local.xml /WEB-INF/applicationContext.xml
    </param-value>
    </context-param>
    <listener>
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
    </listener>
    <servlet>
    <servlet-name>resume</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>resume</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    ********************************
    below is my resume-servlet.xml:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>

    <bean id="viewResolver" class="org.springframework.web.servlet.view.Resour ceBundleViewResolver">
    <property name="basename">
    <value>views</value>
    </property>
    </bean>
    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/name.do">ViewNameController</prop>
    </props>
    </property>
    </bean>

    <bean name="ViewNameController" class="web.controller.ViewNameController">
    <property name="resumeInter" ref="resumeInter"/>
    <property name="viewPage" value="name"/>
    </bean>
    </beans>
    ***************************8
    below is my view.properties:
    name.class=org.springframework.web.servlet.view.Js tlView
    name.url=/WEB-INF/jsp/name.jsp
    ******************************
    below is my controller ViewNameController.java :
    package web.controller;

    import java.util.HashMap;
    import java.util.Map;

    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.springframework.beans.support.PagedListHolder;
    import org.springframework.web.servlet.ModelAndView;
    import org.springframework.web.servlet.mvc.Controller;
    import domain.logic.ResumeInter;

    public class ViewNameController implements Controller{
    private ResumeInter resumeInter;
    private String viewPage;
    public void setResumeInter(ResumeInter resumeInter) {
    this.resumeInter = resumeInter;
    }

    public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response) throws Exception {
    Map model = new HashMap();
    PagedListHolder nameList = new PagedListHolder(this.resumeInter.getResumeList());
    nameList.setPageSize(4);
    request.getSession().setAttribute("ViewName", nameList);
    model.put("nameList", nameList);
    return new ModelAndView(getViewPage(),model);
    }
    public void setViewPage(String viewPage) {
    this.viewPage = viewPage;
    }

    public String getViewPage() {
    return viewPage;
    }
    }
    ***************************
    below is my index.html,when i click the "welcome to the person resource library ",the problem is appear

    <td align="center"width="358" background="ffff"><h1><strong> <a href="name.do" class="STYLE1">Welcome to the person resource library</a> </strong></h1></td>

    Thank you very much!
    Last edited by hanshuang; Oct 4th, 2006, 11:40 AM.
Working...
X