Spring 具有路径的上下文中的servlet引发异常:请求处理失败,返回java.net.ConnectException
大多数类似的问题都有NullPointerException,但我认为我的问题不同。我将Spring与Maven、Webflow和ApacheTiles 2一起使用 老实说,我不知道发生了什么事。如果有人能帮忙,那就太好了。提前谢谢大家 错误消息: 在my web.xml中:Spring 具有路径的上下文中的servlet引发异常:请求处理失败,返回java.net.ConnectException,spring,exception,servlets,Spring,Exception,Servlets,大多数类似的问题都有NullPointerException,但我认为我的问题不同。我将Spring与Maven、Webflow和ApacheTiles 2一起使用 老实说,我不知道发生了什么事。如果有人能帮忙,那就太好了。提前谢谢大家 错误消息: 在my web.xml中: “org.apache.tiles.definition.DefinitionsFactoryException:读取定义时发生I/O错误。]存在根本原因”,由于您正在contextConfigLocation中加载多个文
“org.apache.tiles.definition.DefinitionsFactoryException:读取定义时发生I/O错误。]存在根本原因”,由于您正在contextConfigLocation中加载多个文件,因此可能无法正确解析这些文件。检查您是否正确添加了它们嘿,非常感谢。好主意,但这样做是可能的。至少它在我以前的项目中起了作用,我在其他项目中也看到了它。。。可能仍然是,但还有其他想法吗?“org.apache.tiles.definition.DefinitionsFactoryException:读取定义时发生I/O错误。]有根本原因”,因为您正在contextConfigLocation中加载多个文件,它们可能无法正确解析。检查您是否正确添加了它们嘿,非常感谢。好主意,但这样做是可能的。至少它在我以前的项目中起了作用,我在其他项目中也看到了它。。。可能仍然是,但还有其他想法吗?
INFO : project.toplevel.HomeController - Welcome home!
Oct 19, 2016 10:44:16 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [appServlet] in context with path [/toplevel]
threw exception [Request processing failed; nested exception is
org.apache.tiles.definition.DefinitionsFactoryException: I/O Error reading
definitions.] with root cause
java.net.ConnectException: Connection timed out: connect
at... [various]
<servlet>
<description></description>
<display-name>appServlet</display-name>
<servlet-name>appServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/spring/appServlet/servlet-context.xml
/WEB-INF/spring/webflow-context.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>appServlet</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
public class HomeController {
private static final Logger logger = LoggerFactory.getLogger(HomeController.class);
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(HttpServletRequest request) {
logger.info("Welcome home!");
return "displayHome";
}
}