htmlで入力された数字をjspで受け取り、それを1桁の素数で素因数分解する処理を書いています。 『HTTP Status 500 - Internal Server Error type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 root cause
java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.』 このエラーはどう書けば消えるでしょうか? 最初にAllayListで2,3,5,7でそれぞれ何回割ったかの配列を作り、その後for文を4回書いて素因数分解できなくなるまで割り、最後に、例えば『27=3*3*3』という感じで表示する予定なのですが、最後の処理の書き方がわかりません。