Author | Message |
---|---|
lvaldova
Posts: 12
|
Posted 20:01 Mar 12, 2020 |
Nothing is displayed in the browser when I use ${questions[index].description}. Also, when I click Next, the url shows that index=1 now, but I get a 404 Not Found error that says "server did not find a current representation for the target resource or is not willing to disclose that one exists". What am I doing wrong? Last edited by lvaldova at
20:11 Mar 12, 2020.
|
Mrxethan
Posts: 17
|
Posted 20:05 Mar 12, 2020 |
Try ${questions[param.index].description} |
dgonz271
Posts: 8
|
Posted 20:07 Mar 12, 2020 |
I see you have "questions.[index].description" |
lvaldova
Posts: 12
|
Posted 20:11 Mar 12, 2020 |
Thanks, but it's not working for me. |
lvaldova
Posts: 12
|
Posted 20:13 Mar 12, 2020 |
The extra . was a typo. Without it it still wont work. |
dgonz271
Posts: 8
|
Posted 20:20 Mar 12, 2020 |
Try double checking that you stored the questions in the application scope properly and then that index was set in the doGet |
lvaldova
Posts: 12
|
Posted 20:28 Mar 12, 2020 |
I don't exactly understand where the application scope is. I know that something stored there can be accessed by all parts of the program. If you don't mind would you clarify for me? |
dgonz271
Posts: 8
|
Posted 20:50 Mar 12, 2020 |
This is essentially any attribute that you set in the init function of the servlet. There's another topic on this forum where someone was having issues with the init so that's just in case you run into an issue there. |
lvaldova
Posts: 12
|
Posted 21:32 Mar 12, 2020 |
Thank you for explaining application scope! That's much more clear. However, I have already done that. I guess I'll just need to keep debugging. Thanks for the help. |
cesqued
Posts: 1
|
Posted 21:35 Mar 12, 2020 |
Does anyone know how to skip the empty lines when reading the file into the object list? |
fyang15
Posts: 35
|
Posted 21:45 Mar 12, 2020 |
just use nextLine() to skip |
lvaldova
Posts: 12
|
Posted 22:28 Mar 12, 2020 |
Which folder should the jsp file be in, WEB-INF or just WebContent? |