刚学Struts2,访问index.jsp页面正常,访问login.jsp页面就报错

我用的是通配符的方式访问,输入
http://localhost:8088/TestStruts/TestStruts_index.action时可以跳转到index.jsp页面,
但输入http://localhost:8088/TestStruts/TestStruts_login.action时,
就报There is no Action mapped for namespace [/] and action name [TestStruts_login] associated with context path [/TestStruts].

struts.xml代码如下:

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC

"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"

"http://struts.apache.org/dtds/struts-2.5.dtd">


<constant name="struts.i18n.encoding" value="UTF-8"></constant>

<constant name="struts.action.extension" value="do,action"></constant>

<constant name="struts.serve.static.browserCache" value="false"></constant>

<constant name="struts.configuration.xml.reload" value="true"></constant>

<constant name="struts.devMode" value="true"></constant>

<constant name="struts.enable.DynamicMethodInvocation" value="false"></constant>


<package name="default" namespace="/" extends="struts-default">
    <action name="*_*" method="{2}" class="com.test.action.{1}" >
        <result name="login">/login.jsp</result>
        <result name="index">/{2}.jsp</result>
    </action>


</package>

麻烦大神解惑~

5个回答

问题已解决,应该是Struts2版本问题,把原来的

加上一句strict-method-invocation="false",就可以了

谢谢楼上的解答,虽然还没看^_^

恩?怎么代码出不来,就是在struts.xml的package加一句strict-method-invocation="false",即

对了我的Struts2版本是2.5.5的,有碰上这个问题的朋友可以参考下

struts2好像由于安全问题用的不多了,不过学习框架入门还是很有必要的

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
struts2 不能访问index.JSP
[color=#FF0000]出现:[/color]rnHTTP Status 404 - rnrn--------------------------------------------------------------------------------rnrntype Status reportrnrnmessage rnrndescription The requested resource () is not available.rnrnrn[color=#FF0000]但是:[/color]rnrnrnrnrn rn index.jsprn rn rn rn encodingrn com.labci.javamail.filter.CharacterEncodingFilterrn rn encodern gbkrn rn rn rn rn encodingrn /*rn rn rn rn rn rn struts2rn org.apache.struts2.dispatcher.FilterDispatcherrn rn rn struts2rn *.dorn rn rn rn rn 1440rn rn rnrnrnrn把struts的过滤器去掉就可以访问了
页面访问报错
我现在的项目在本地访问 这个页面没有问题rn但是我布置在外网后 在没有数据的情况下访问都会报Index was outside the bounds of the arrayrnrn我没有用到数组啊。怎么会这样rn而且在没有数据的情况下 页面只是一个静态的显示页面。根本没有请求数据库为什么会报数组越界呢?
dorado 访问页面报错!
页面错误!rn[code=HTML] rn9: rn10: rn11: rn[/code]rn部署信息:rn2012-10-9 17:02:15 org.apache.catalina.core.AprLifecycleListener initrn信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Soft\MyEclipse 8.5\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;D:\apache-tomcat-6.0.14\binrn2012-10-9 17:02:15 org.apache.coyote.http11.Http11Protocol initrn信息: Initializing Coyote HTTP/1.1 on http-8080rn2012-10-9 17:02:15 org.apache.catalina.startup.Catalina loadrn信息: Initialization processed in 309 msrn2012-10-9 17:02:15 org.apache.catalina.core.StandardService startrn信息: Starting service Catalinarn2012-10-9 17:02:15 org.apache.catalina.core.StandardEngine startrn信息: Starting Servlet Engine: Apache Tomcat/6.0.14rn2012-10-9 17:02:15 org.apache.catalina.loader.WebappClassLoader validateJarFilern信息: validateJarFile(D:\apache-tomcat-6.0.14\webapps\HelloDorado\WEB-INF\lib\servlet-api.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.classrn2012-10-9 17:02:16 org.apache.coyote.http11.Http11Protocol startrn信息: Starting Coyote HTTP/1.1 on http-8080rn2012-10-9 17:02:16 org.apache.jk.common.ChannelSocket initrn信息: JK: ajp13 listening on /0.0.0.0:8009rn2012-10-9 17:02:16 org.apache.jk.server.JkMain startrn信息: Jk running ID=0 time=0/20 config=nullrn2012-10-9 17:02:16 org.apache.catalina.startup.Catalina startrn信息: Server startup in 455 msrnrn后台报错:rn2012-10-9 17:04:23 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet jsp threw exceptionrnjava.lang.NullPointerExceptionrn at com.bstek.dorado.common.log.Log.getLevel(Log.java:93)rn at com.bstek.dorado.view.taglib.AbstractViewTag.doStartTag(AbstractViewTag.java:44)rn at org.apache.jsp.index_jsp._jspx_meth_d_005fView_005f0(index_jsp.java:98)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:71)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn
sharepoint页面访问报错
[color=#FF0000]已终止操作 (异常来自 HRESULT:0x80004004 (E_ABORT)) [/color]rn说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 rnrn异常详细信息: System.Runtime.InteropServices.COMException: 已终止操作 (异常来自 HRESULT:0x80004004 (E_ABORT)) rnrn源错误: rnrnrn行 23: site.CatchAccessDeniedException = false; rn行 24: SPWeb web = site.OpenWeb(); rn行 25: foreach (SPUser user in web.Users) rn行 26: rn行 27: if (user.LoginName.ToLower() == account.ToLower()) rn rnrn源文件: c:\Inetpub\wwwroot\forum\aspx\1\forum_login.aspx.cs 行: 25 rnrn堆栈跟踪: rnrnrn[COMException (0x80004004): 已终止操作 (异常来自 HRESULT:0x80004004 (E_ABORT))] rn Microsoft.SharePoint.Library.SPRequestInternalClass.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage) +0 rn Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage) +323 rnrn[SPException: 已终止操作 (异常来自 HRESULT:0x80004004 (E_ABORT))] rn Microsoft.SharePoint.Library.SPRequest.OpenWeb(String bstrUrl, String& pbstrServerRelativeUrl, String& pbstrTitle, String& pbstrDescription, Guid& pguidID, String& pbstrRequestAccessEmail, UInt32& pwebVersion, Guid& pguidScopeId, UInt32& pnAuthorID, UInt32& pnLanguage, UInt32& pnLocale, UInt16& pnTimeZone, Boolean& bTime24, Int16& pnCollation, UInt32& pnCollationLCID, Int16& pnCalendarType, Int16& pnAdjustHijriDays, Int16& pnAltCalendarType, Boolean& pbShowWeeks, Int16& pnFirstWeekOfYear, UInt32& pnFirstDayOfWeek, Int16& pnWorkDays, Int16& pnWorkDayStartHour, Int16& pnWorkDayEndHour, Int16& pnMeetingCount, Int32& plFlags, Boolean& bConnectedToPortal, String& pbstrPortalUrl, String& pbstrPortalName, Int32& plWebTemplateId, Int16& pnProvisionConfig, String& pbstrDefaultTheme, String& pbstrDefaultThemeCSSUrl, String& pbstrAlternateCSSUrl, String& pbstrCustomizedCssFileList, String& pbstrCustomJSUrl, String& pbstrAlternateHeaderUrl, String& pbstrMasterUrl, String& pbstrCustomMasterUrl, String& pbstrSiteLogoUrl, String& pbstrSiteLogoDescription, Object& pvarUser, Boolean& pvarIsAuditor, UInt64& ppermMask, Boolean& bUserIsSiteAdmin, Boolean& bHasUniquePerm, Guid& pguidUserInfoListID, Guid& pguidUniqueNavParent, Int32& plSiteFlags, DateTime& pdtLastContentChange, DateTime& pdtLastSecurityChange, String& pbstrWelcomePage) +364 rn Microsoft.SharePoint.SPWeb.InitWeb() +1135 rn Microsoft.SharePoint.SPWeb.get_SecurableObjectImpl() +37 rn Microsoft.SharePoint.SPWeb.get_RoleAssignments() +25 rn Microsoft.SharePoint.SPWeb.get_Users() +25 rn aspx_1_forum_login.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\forum\aspx\1\forum_login.aspx.cs:25 rn System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15 rn System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34 rn System.Web.UI.Control.OnLoad(EventArgs e) +99 rn System.Web.UI.Control.LoadRecursive() +47 rn System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 rnrn
如何通过公众号访问index.jsp 页面?大佬?
我目前有一个简单的index.jsp 的页面、 想通过点击公众号的形式打开 这个页面 。请问能做到吗 ?
页面出现不能正常访问.
用smart做模板,访问页面a.php,当a.php未完整显示出来,就点击了b.php,之后访问所有的页面都显示未找到页面。PHP把缓存开了,$smart->clear_all_cache();也不行。重新关了IE再登陆后就可以浏览。但是一出现页面未运行完全就会出现同样问题。烦.....
struts2页面访问action的具体方法
struts2页面访问action的具体方法报错了:rnjsp:rnrn 通配符匹配方法:rn 增加rn 查看rn 修改rn 删除 rnrnrnrnstruts-xml:rn rn /index.jsprn rnrnrnaction:rnrnpublic class UserAction extends ActionSupportrn rnpublic String add() throws Exception rn System.out.println("欢迎进入offic添加方法");rn return SUCCESS;rnrnrnpublic String show() throws Exception rn System.out.println("欢迎进入offic查看方法");rn return SUCCESS;rnrnrnpublic String update() throws Exception rn System.out.println("欢迎进入offic修改方法");rn return SUCCESS;rnrnrnpublic String delete() throws Exception rn System.out.println("欢迎进入offic删除方法");rn return SUCCESS;rnrnrnrnrnrn我一点击a标签报错:rnThere is no Action mapped for namespace [/] and action name [Usershow] associated with context path [/struts2-xml-demo4]. - [unknown location]rn不知道哪里错了,求指教给分!
struts2项目访问页面404
第一种情况   如果在struts.xml里配置了以上常量,即设置为调试模式   那么此项目部署在服务器中时,是访问不到页面的   只需要注释以上代码,或者更改成运行模式,就能正常访问到页面 相应的jar包支持没有放在服务器上 filter>      filter-name>action2filter-name>      filter-class>org.a
struts2统计访问页面人数
maven项目去http://maven.aliyun.com/nexus/#welcome搜索struts2-core,引入jdk支持的版本jar包 java代码 package cn.et.struts2.lesson01; import java.io.IOException; import java.io.PrintWriter; import java.util.Arr
SSH---页面访问404,index.jsp以及html页面均不能访问
在ssh框架项目中,页面访问404,index.jsp以及html页面均不能访问,检查不是因为namesapce的问题,各配置文件也未错,检查后发现,因为配置文件中的类一个字母大小写写错。应为com.aqd.entity.FaeKnowledge ...
jenkins 打开页面 访问报错
刚把build.xml文件配置成功,可以ant构建了,打开jenkins提示报错   在网上查了好多方法,最后一个博客给的解决办法是 把jenkins的配置文件改名字, 先把jenkins服务停止,改配置文件名字,再重启jenkins,居然可以访问了, 也有人说是jdk版本的问题,不清楚, 不过产生的另一个问题是,通过命令行,无法启动或者关闭jenkins  启动关闭 命令   n...
访问aspx页面报错404
今晚给服务器安装了个六台阶的系统,用.net做的网站,页面后缀当然是.aspx啦,安装一切顺利,全自动处理。安装完毕后,用IE访问却报404错误,开始以为是路径问题,检查站点属性,站点文件夹权限,一切正常,于是新建测试页面test.html以及test.asp,均能正常访问。确定问题出在IIS处理aspx页面不成功上,检查站点属性-配置出对于aspx页面的处理程序,没问题,静下心来想想,忽然想起I...
springboot启动访问页面报错
Whitelabel Error PagernrnThis application has no explicit mapping for /error, so you are seeing this as a fallback.rnrnThu Nov 16 15:47:01 CST 2017rnThere was an unexpected error (type=Method Not Allowed, status=405).rnRequest method 'GET' not supported
访问IIS页面插入数据报错
访问IIS页面插入数据报错rn用户 '959A135753474DB\ASPNET' 登录失败。 rn说用户登录失败 rn 我已经在IIS6.0的编辑上盖为ASPNET用户了
eclipse+maven新建项目index.jsp页面报错
错误  The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path。 解决方法: 在pom.xml文件中加入 org.apache.maven.plugins maven-compiler-pl
Struts2入门
--------------------siwuxie095                         Struts2 环境搭建       1、先下载相关库文件,下载链接:    (1)http://struts.apache.org/download    (2)https://struts.apache.org/download.cgi
页面访问
rnrn哦写的这个总是要等待请求页面执行完才会继续下一个请求rn能不能无须等待返回结果来实现批量提交呢?不开新窗口的情况下
访问页面
rn System.Diagnostics.Process.Start("http://www.baidu.com/");rnrn System.Diagnostics.Process.Start("http://www.sina.com.cn);rn在程序中写两个这样的超链接,怎样才能打开两个页面,我现在打开百度后马上就在同一个页面打开新浪了,能不能让后来的网址重新打开一个页面。代码怎么写呢?
Struts2配置好的,访问就报错
具体如下,我只单独写了个页面,用到了Struts标签,但是服务器启动后访问页面控制台报错,错误如下:rn开发工具为:Myeclipse for Sping 8.6 + Tomcat7.0(64位)rnrn2012-1-3 11:26:58 org.apache.jasper.compiler.TldLocationsCache tldScanJarrn信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.rn2012-1-3 11:26:58 org.apache.catalina.core.StandardWrapperValve invokern严重: Servlet.service() for servlet [jsp] in context with path [/TestStruts] threw exception [An exception occurred processing JSP page /index.jsp at line 24rnrn21: rn22: This is my JSP page. rn23: rn24: rn25: rn26: rn27: rnrnrnStacktrace:] with root causernThe Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]rn at org.apache.struts2.views.jsp.TagUtils.getStack(TagUtils.java:60)rn at org.apache.struts2.views.jsp.StrutsBodyTagSupport.getStack(StrutsBodyTagSupport.java:44)rn at org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:48)rn at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:120)rn at org.apache.jsp.index_jsp._jspService(index_jsp.java:94)rn at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rn at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)rn at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)rn at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)rn at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)rn at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:928)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)rn at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)rn at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:539)rn at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:298)rn at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)rn at java.lang.Thread.run(Unknown Source)rnrn所用到的jar包为Myeclipse for Sping 8.6自带的rnantlr-2.7.2.jarrnrnaopalliance-1.0.jarrnrnclassworlds-1.1.jarrnrncommons-beanutils-1.7.0.jarrncommons-chain-1.2.jarrnrncommons-collections-3.2.jarrnrncommons-digester-2.0.jarrnrncommons-fileupload-1.2.1.jarrnrncommons-io-1.3.2.jarrnrncommons-lang-2.3.jarrnrncommons-logging-1.0.4.jarrnrncommons-logging-api-1.1.jarrnrncommons-validator-1.3.1.jarrnrnfreemarker-2.3.15.jarrnrnjson-lib-2.1.jarrnrnognl-2.7.3.jarrnrnoro-2.0.8.jarrnrnsslext-1.2-0.jarrnrnstruts2-embeddedjsp-plugin-2.1.8.1.jarrnrnstruts2-convention-plugin-2.1.8.1.jarrnrnstruts2-json-plugin-2.1.8.1.jarrnrnstruts2-core-2.1.8.1.jarrnrnxwork-core-2.1.6.jarrn-------------------------------------------------------rnweb.xml页面内容rnrnrn rn index.jsprn rn rn struts2rn rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn rn struts2rn *.actionrn rn-------------------------------------------rnrn因为只是显示一些简单的输入框,所以没有写功能,但是访问的时候就会出错,如果去掉标签就不会报错rnindex.jsp内容rnrn<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>rn<%@taglib prefix="s" uri="/struts-tags" %>rnrnrnrnrn rn rn rn My JSP 'index.jsp' starting pagern rn rn rn rn rn rn rn rn rn This is my JSP page. rn rn rn rn rn rn rn rnrnrn
如果用户未登陆访问其他页面时就跳转到login.jsp页面,在web.xml中怎样配置?
如果用户未登陆访问其他页面时就跳转到login.jsp页面,在web.xml中怎样配置?
struts2 在页面加上标签之后报错,去掉页面正常
问题描述:rnaction中有两个方法rngetAll() 返回 一个ListrngetDetailListById(String id ) 返回List2rnrn前台页面使用s:iterator 进行遍历这两个listrn默认action执行时调用第一个方法页面显示List1中的所有成员rn点击List1成员上的超链接 执行action中的第二个方法传入参数为成员Id。rnrn正常情况是没有问题的rnrn但是加上s:debug 之后就不行了,默认执行第一个方法执行完成之后,没有手动触发第二个方法,它却执行了。因此后台会报空指针错误。rnrn去掉s:debug 就不存在任何问题。rn哪位高手遇见过此问题,还望指教。
在页面使用struts2的标签,界面就报错,
struts2的包都导入了。页面一运行到struts2标签的地方就报错。
MVC页面访问另一个页面
第一个页面rnobject obj = t; rnt 是一个 list rnHtml.RenderPartial("HomeTypePage",obj); rn访问第二个页面 不跳进控制器代码rn后台没有处理rn@foreach (fbw.Models.gamerelease item in ViewBag.Release) 直接未初始化对象 rn换什么方式可以调用后台的方法并将访问到的数据插入到本页上。 带参数的。
登录后返回刚访问的页面问题?
好象访问论坛一样,打开一个帖子要求注册,注册后又能返回刚访问的帖子。rnrn大家用过论坛都该知道我的意思吧。rnrn该怎么做呢?rn
struts2 和hibernate 整合 通过页面访问action报错
:( 很奇怪。。自己写的测试类。。测试一切正常rnrn但当启动tomcat 通过浏览器访问action 时就会报错。。rnrn由于我对spring 不太熟。。所以没用spring 只是使用了struts2 和HibernaternrnrnLoginAction被调用rnjava.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:441)rn at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:280)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:243)rn at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:165)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252)rn at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.debugging.DebuggingInterceptor.intercept(DebuggingInterceptor.java:267)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept(ChainingInterceptor.java:126)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept(PrepareInterceptor.java:138)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:165)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:164)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.AliasInterceptor.intercept(AliasInterceptor.java:179)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at com.xingao.interceptor.TransactionInterceptor.doIntercept(TransactionInterceptor.java:23)rn at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)rn at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237)rn at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)rn at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)rn at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:102)rn at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)rn at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)rn at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)rn at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)rn at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)rn at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)rn at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)rn at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)rn at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)rn at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)rn at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.ExceptionInInitializerErrorrn at com.xingao.dao.impl.XingaoDAOImpl.getSession(XingaoDAOImpl.java:14)rn at com.xingao.dao.impl.UserDAOImpl.findByName(UserDAOImpl.java:26)rn at com.xingao.action.user.LoginAction.execute(LoginAction.java:32)rn ... 70 morernCaused by: org.hibernate.MappingNotFoundException: resource: com/xingao/domain/wuliao/WWuliaowenjian.hbm.xml not foundrn at org.hibernate.cfg.Configuration.addResource(Configuration.java:563)rn at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1587)rn at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1555)rn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1534)rn at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1508)rn at org.hibernate.cfg.Configuration.configure(Configuration.java:1428)rn at org.hibernate.cfg.Configuration.configure(Configuration.java:1414)rn at com.xingao.hibernate.util.HibernateUtil.(HibernateUtil.java:12)rn ... 73 morernrnrnrnrnrnrnrn
nginx页面不能正常访问排除方法
nginx页面不能访问nginx页面不能访问 检查服务端服务是否启动成功 在服务端使用wget和curl测试下返回的是否正常 浏览器wget或者curl等软件访问不了Ngixn页面1. 检查服务端服务是否启动成功[root@shizhan02 html]# ps -ef |grep nginx #查看nginx服务是否启动 root 1609 1 0 16:46 ?
hbase shell 无法启动 页面能正常访问
安装了hbase 1.3.1 hadoop 2.8.2 jdk 9.0.1n hbase 启动没问题,但当启动 hbase shell 错误如下:n root@Master bin]# ./hbase shelln Java HotSpot(TM) 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.n WARNING: An illegal reflective access operation has occurredn WARNING: Illegal reflective access by org.jruby.java.invokers.RubyToJavaInvoker (file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar) to method java.lang.Object.registerNatives()n WARNING: Please consider reporting this to the maintainers of org.jruby.java.invokers.RubyToJavaInvokern WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operationsn WARNING: All illegal access operations will be denied in a future releasen ArgumentError: wrong number of arguments (0 for 1)n method_added at file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:10n method_added at file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar!/builtin/javasupport/core_ext/object.rb:129n Pattern at file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:2n (root) at file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:1n require at org/jruby/RubyKernel.java:1062n (root) at file:/usr/local/hadoop/hbase-1.2.6/lib/jruby-complete-1.6.8.jar!/builtin/java/java.util.regex.rb:42n (root) at /usr/local/hadoop/hbase-1.2.6/bin/hirb.rb:38nn 而hirb.rb 第38行是 include JAVA, 而我的环境变量都配好的,不知道还有什么出错了。nn
访问页面空白,刷新后正常
本人没有演示的网站,但遇到这样的一个问题,php做的网站,页面首次访问空白,刷新正常,有遇到这个问题的, 请给个提示,谢了。
关于struts2当中页面访问404错误
[code=java]rnrnrnrn rnrn rnrn rn /error.jsprn rnrn rn rn rnrn rn rn /Hello.jsp rn rn rn rnrn[/code]rn上面是struts.xml配置rnrn[code=java]rnrnrn rn index.jsprn rn rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rnrn rn struts2rn /*rn rnrn[/code]rn上面是web.xml配置rn[img=https://img-bbs.csdn.net/upload/201406/17/1403014684_599638.jpg][/img]rn当访问http://localhost:8080/Struts2_0100_Introdution/hello.action/就报404错误,各位要是有遇上此种错误过的,请指教,我已经为此研究两天了,实在是不知道问题出在哪里?
Struts2统计用户访问页面次数
1:jsp String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %>       ">          My JSP
接上,struts2访问页面元素的另一种方法。
上文说了两种访问页面元素的方法,一种是直接访问,一种是多了一个实体类,接下来是通过RequestAware,SessionAware,ApplicationAware来访问的方法。HelloStrutsDemo2.javapublic class HelloStrutsDemo2 extends ActionSupport implements RequestAware,SessionAware,A
struts2项目页面访问程序中的变量
[color=green][b]首先要在指定的Action中定义该变量如user,并提供getUser()方法。 让回在页面中采用freemarker中的插值${user}即可访问! 这样就可以在js中通过jQuery选择器获取该变量了![/b][/color]...
Tomcat访问Servlet页面报错404
[img=https://img-bbs.csdn.net/upload/201812/27/1545884361_973000.png][/img][img=https://img-bbs.csdn.net/upload/201812/27/1545884362_354659.png][/img][img=https://img-bbs.csdn.net/upload/201812/27/1545884362_498786.png][/img]rnrn如图。最近课程中刚学上Servlet,现在在宿舍里试着配置了一下发现不行。还需要截图什么信息请告知我,我马上补上
访问asp页面报错找不到指定的程序
错误类型:rn(0x8007007F)rn找不到指定的程序。 rn/conn.asp, 第 3 行rnrnrn浏览器类型:rnMozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET4.0C; .NET4.0E) rnrn第三行对应是:Set conn = CreateObject("ADODB.Connection")
hibernate+proxool连接的问题访问页面时报错
这是hibernae 配置的rn[code=Java][/code] javawindPool rn ProxoolConf.xml rn org.hibernate.connection.ProxoolConnectionProvider rn org.hibernate.dialect.MySQL5InnoDBDialectrn truern这是proxoolCoofx.xml配置rnrnrn rn javawindPoolrn jdbc:mysql://localhost:3306/XXXX?autoReconnect=true&useUnicode=true&characterEncoding=UTF-8rn com.mysql.jdbc.Driverrn rn rn rn rn rn 90000rn 20rn 5rn 100rn 5rn rnrn
tomcat启动后,访问某页面报错
问题描述: rnrn myeclipse下开发项目,spring+struts2+hibernate并且项目用tomcat启,但是始终报如下的错误 rn 启动过程中没有报错,只是访问某个页面时报错 rnrnHTTP Status 500 - rnrn-------------------------------------------------------------------------------- rnrntype Exception report rnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request. rnrnexception rnrnjavax.servlet.ServletException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: /WEB-INF/jsp/admin/introduction/article/List.jsp(119,24) According to TLD or attribute directive in tag file, attribute list does not accept any expressions rnorg.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) rnorg.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) rnorg.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99) rnorg.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) rnorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) rnorg.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96) rnorg.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) rnrnrnroot cause rnrnorg.apache.jasper.JasperException: org.apache.jasper.JasperException: /WEB-INF/jsp/admin/introduction/article/List.jsp(119,24) According to TLD or attribute directive in tag file, attribute list does not accept any expressions rnorg.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565) rnorg.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:354) rnorg.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320) rnorg.apache.jasper.servlet.JspServlet.service(JspServlet.java:266) rnjavax.servlet.http.HttpServlet.service(HttpServlet.java:803) rnorg.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413) rnorg.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99) rnorg.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139) rnorg.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178) rncom.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348) rncom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) rncom.mainone.interceptor.LoginInterceptor.doIntercept(LoginInterceptor.java:31) rncom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) rncom.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) rncom.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) rncom.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) rncom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) rncom.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) rncom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) rncom.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) rncom.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) rncom.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) rncom.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) rncom.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) rnorg.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) rncom.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) rnrnrn是什么原因啊?rnrnrn我的页面上就是用的struts2的标签,我发现如果去掉相关struts2的问题就的确不报错了,页面相应的内容是 rnrn rn rnrnrn
tomcat启动时,访问某页面报错
问题描述:rnrn myeclipse下开发项目,spring+struts2+hibernate并且项目用tomcat启,但是始终报如下的错误rn 启动过程中没有报错,只是访问某个页面时报错rnrnHTTP Status 500 - rnrn--------------------------------------------------------------------------------rnrntype Exception reportrnrnmessage rnrndescription The server encountered an internal error () that prevented it from fulfilling this request.rnrnexception rnrnjavax.servlet.ServletException: org.apache.jasper.JasperException: org.apache.jasper.JasperException: /WEB-INF/jsp/admin/introduction/article/List.jsp(119,24) According to TLD or attribute directive in tag file, attribute list does not accept any expressionsrn org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515)rn org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419)rn org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)rn org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rn org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)rn org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)rnrnrnroot cause rnrnorg.apache.jasper.JasperException: org.apache.jasper.JasperException: /WEB-INF/jsp/admin/introduction/article/List.jsp(119,24) According to TLD or attribute directive in tag file, attribute list does not accept any expressionsrn org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)rn org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:354)rn org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)rn org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)rn javax.servlet.http.HttpServlet.service(HttpServlet.java:803)rn org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:413)rn org.apache.struts2.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:99)rn org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139)rn org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:178)rn com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:348)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)rn com.mainone.interceptor.LoginInterceptor.doIntercept(LoginInterceptor.java:31)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rn com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)rn com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)rn com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)rn com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)rn com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)rn org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)rn com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)rnrnrnrn是什么原因啊?
SpringMVC 欢迎页面无效 报错405 index.jsp
层级结构[img=https://img-bbs.csdn.net/upload/201704/16/1492320156_155456.png][/img]rnweb.xml中的配置:rn[img=https://img-bbs.csdn.net/upload/201704/16/1492320422_975874.png][/img]rnrn错误页面的配置是有效的,但是欢迎页面没有用,而且报错不是404,是405:[img=https://img-bbs.csdn.net/upload/201704/16/1492320485_507015.png][/img]rnrn手动定位到欢迎页面是可以访问的:rn[img=https://img-bbs.csdn.net/upload/201704/16/1492320534_842014.png][/img]rnrn不知道是为什么,请大神帮忙看下,还有其他地方会影响到欢迎页面吗?报错405也挺奇怪的,我工具是idea,创建的maven项目,引入SpringMVC+MyBatis的框架
访问页面,没有权限就返回的问题
情况一:现在在A页面中点击B页面的链接,但是如果该用户没有权限的话会跳转到C页面。然后C页面会显示比如“您没有反问权限,两秒钟后自动返回”。这样就应该是返回到A页面了。rnrn情况二:但是有时候用户是直接在地址栏里面输入B页面的地址的,如果没有权限它还是会跳转到C页面。然后C页面会显示比如“您没有反问权限,两秒钟后自动返回”。这个时候是不存在A页面的。一般情况是返回网站的首页。rnrn但是我现在在C页面里面又是怎么知道会是情况一还是情况二呢?如果不清楚,那我如何判断该返回到那个也面呢?rnrn请大家帮帮菜鸟,如果解决。(不能在B页面里面做判断,因为我可能还有很多要权限才能访问的页面,总不能每个页面都加吧。)rnrn随便祝大家新年愉快!!!!!
访问WEB-INF下的页面
      WEB-INF是Java的web应用安全目录,只对服务端开放,对客户端是不可见的。所以我们可以把除首页(index.jsp)以外的页面都放在WEB-INF目录下,这样就无法通过URL直接访问页面了。核心:1,超链接a标签或者js的window.location.href()无法访问WEB-INF下的某一个jsp页面。[java] view plain copyjavascrtpt:wi...
相关热词 c# 线程结束时执行 c# kb mb 图片 c# 替换第几位字符 c#项目决定成败 c# 与matlab c# xml缩进 c#传感器基础 c#操作wps c# md5使用方法 c# 引用父窗口的组件