reset password
Author Message
raylongma1018
Posts: 81
Posted 18:04 Aug 06, 2015 |

when I read your error.jsp file ,you have <spring:message code="${errorCode}" /> I checked your code you just use it for resubmission for application, but how to use the model.put("errorCode",xx) when I wishes to  use the bean exception Resolver when uploading files? whenever i try to upload nothing and upload button it will give me error msgs because I miss the errorCode, please help

cysun
Posts: 2935
Posted 19:38 Aug 06, 2015 |

errorCode is used to load the actual error message from messages.properties for i18n purposes.

raylongma1018
Posts: 81
Posted 21:09 Aug 06, 2015 |

Hi Dr.sun

the code you put in error.jsp is <spring:message code="${errorCode}" /> , and if I wish the load the error message from message.properties then i will need to remove the$ {} sign from errorcode, otherwise it will output an error. I just want to ask why you put ${} in spring message, because it simply won't read the message property from i18n, it will just read the things that save in the application scope from models.put

cysun
Posts: 2935
Posted 07:46 Aug 07, 2015 |

The controller is supposed to pass an errorCode to the JSP.