Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.0.6
-
None
-
Showcase
-
Patch
Description
I deployed struts2-showcase-2.0.6.war in Tomcat 5.5.20 on Windows.
Choose 'person manager'
Choose 'list'
Choose 'view source' and you get a exception
java.lang.NumberFormatException: For input string: ""
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
java.lang.Integer.parseInt(Integer.java:468)
java.lang.Integer.parseInt(Integer.java:497)
org.apache.struts2.showcase.source.ViewSourceAction.execute(ViewSourceAction.java:86)
The URL triggering the bug:
http://localhost:8080/struts2-showcase-2.0.6/viewSource.action?config=&className=org.apache.struts2.showcase.person.ListPeopleAction&page=/person//person/listPeople.ftl
The problem:
Is that config parameter on the URL is empty (config=).
It can be fixed by checing if the parameters are not empty instead of just != null in the ViewSourceAction.java