java.lang.IllegalArgumentException: Path index does not start with a "/" charact
java.lang.IllegalArgumentException: Path index does not start with a "/" character
最近用struts的Tiles框架出現以下問題:
java.lang.IllegalArgumentException: Path index does not start with a "/" character
查了好久才發現錯誤。
後來發現是struts-config.xml中少配置了<controller>這一項,
java.lang.IllegalArgumentException: Path index does not start with a "/" character
查了好久才發現錯誤。
後來發現是struts-config.xml中少配置了<controller>這一項,
配置了<controller>後,就一切正常了
<controller>
<set-property property="processorClass" value="org.apache.struts.tiles.TilesRequestProcessor"/>
</controller>
或者是
<controller>
<set-property property="inputForward" value="true"/>
</controller>
同時發現出現這樣的錯誤還有以下原因
1. struts-config.xml檔案中<action-mappings /> 的
<action …… input="/xxx.jsp" …… path="/XXX" ></action>
2. 問題出在使用getRequestDispatcher上面。
使用ServletContext.getRequestDispatcher(destPage);時destPage必須以相對路徑“/"出現。
而HttpServletRequest request.getRequestDispatcher(destPage);可以相對路徑也可以絕對路徑。
總之,希望大家今後在寫的時候要仔細。
相關文章
- file does not start with RIFF id(python)Python
- java.lang.IllegalArgumentException: Mapped Statements collection does not contain value forJavaExceptionAPPAI
- z-index does not work in Internet Explorer with pdf in iframeIndex
- What is the difference between Mysql InnoDB B+ tree index and hash index? Why does MongoDB use B-tree?MySqlIndexMongoDB
- Error: The directory named as part of the path ./log/supervisord.log does not exist解決方案Error
- ValueError: Length of values (141) does not match length of index (4278)問題的解決ErrorIndex
- 解決Spark讀取Hive分割槽表出現Input path does not exist的問題SparkHive
- Exchange 2000/2003 System Attendant does not start after disaster recovery installation, event ID 90AST
- why app_start startAPP
- java.lang.IllegalArgumentException: Wrong state classsJavaException
- [20211231]ORA-01418 specified index does not exist.txtIndex
- Flutter Path(二) : Path 進階Flutter
- A New Start
- the new start
- Flutter Path(一) : Path 與 CustomPainterFlutterAI
- JDK 載入jar中的檔案資源出現Cannot be resolved to absolute file path because it does not reside in the file systemJDKJARIDE
- KEEP INDEX | DROP INDEXIndex
- java.lang.IllegalArgumentException at java.sql.Date.getHoursJavaExceptionSQL
- Caused by: java.lang.IllegalArgumentException: port out of range:-1JavaException
- BottomSheetBehavior之java.lang.IllegalArgumentException:TheviewisnotassociatedwithBottomSheetBehaviorJavaExceptionView
- Conventional Path Export和Direct Path ExportExport
- Conventional Path Export Versus Direct Path ExportExport
- ‘map’ does not name a type
- vector does not name a type
- asmcmd does not exist in directoryASM
- error :does not name a typeError
- fast_start_parallel_rollback與v$fast_start_servers和v$fast_start_transactionsASTParallelServer
- Extract or Replicat Fail to Start (Don't Start) With No Error MessagesAIError
- crsctl start/stop crs and crsctl start/stop cluster 區別
- 【HBase】start master 與 start master --backup 的區別AST
- start with ... connect by
- LSNRCTL start error!Error
- Fast-StartAST
- start uniappAPP
- rowid,index,INDEX FULL SCAN,INDEX FAST FULL SCAN|IndexAST
- 解決:java.lang.IllegalArgumentException: String must not be emptyJavaException
- Bug:java.lang.IllegalArgumentException: unknown document format for file:JavaExceptionORM
- MediaRecorder start failed -19 java.lang.RuntimeException: start failedAIJavaException