请问java web软件登陆后转到的jsp页面一片空白是什么原因啊?

这个登陆页面是没有问题的,
然后跳转的页面就什么都没有。。。

没配置好,跳转后,应该转到设置、管理界面里。
而能跳转,说明数据库连接是正确的。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2015-04-23
这原因很多,可能已报错,或者页面无元素。或者有多个index.jsp。你挑错了一个,搞不定可留下q追问

你好,我QQ是1548886218,可否指点一下

追答

谢谢土豪打赏!

本回答被提问者采纳
第2个回答  2018-11-14
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
"http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>

<constant name="struts.devMode" value="false" />
<package name="shop" namespace="/" extends="struts-default">

<!-- 配置首页访问的action -->
<action name="index" class="indexAction">
<result name="index">/WEB-INF/jsp/index.jsp</result>
</action>

<!-- 配置访问注册的action -->
<action name="user_*" class="userAction" method="{1}">
<result name="registPage">/WEB-INF/jsp/regist.jsp</result>
</action>
</package>
</struts>

这个是applicationContext的配置

<!-- Action的配置 ===========================-->

<!-- 首页访问的Action -->
<bean id="indexAction" class="in.itcast.shop.index.action.IndexAction" scope="prototype">

</bean>

<!-- 配置验证码Action -->

<!-- 用户模块的Action -->
<bean id="userAction" class="in.itcast.shop.user.action.UserAction" scope="prototype">
<!-- 注入Service -->

</bean>

这是web.xml配置
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<!-- 配置Spring的核心监听器 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext.xml</param-value>
</context-param>

<!-- 配置Struts2的核心过滤器 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<display-name></display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>

package in.itcast.shop.index.action;

import com.opensymphony.xwork2.ActionSupport;

/*
* 引入首页访问Action
*/
public class IndexAction extends ActionSupport{

/**
*
*/
private static final long serialVersionUID = 1L;

public String execute(){

return "index";
}

}