Given the web application deployment descriptor elements:
11. <filter>
12. <filter-name>ParamAdder</filter-name>
13. <filter-class>com.example.ParamAdder</filter-class>
14. </filter>
…
31. <filter-mapping>
32. <filter-name>ParamAdder</filter-name>
33. <servlet-name>Destination</servlet-name>
34. </filter-mapping>
…
55. <servlet-mapping>
56. <servlet-name>Destination</servlet-name>
57. <url-pattern>/dest/Destination</url-pattern>
58. </servlet-mapping>
What is the result of a client request of the Source servlet with no query string?
A.
The output “filterAdded = null” is written to the response stream.
B.
The output “filterAdded = addedByFilter” is written to the response stream.
C.
An exception is thrown at runtime within the service method of the Source servlet.
D.
An exception is thrown at runtime within the service method of the Destination servlet.
Request is by default Read-Only !
If you want to modify, you have to use RequestWrapper
So, A is correct.
For me A is correct but the reason is different: Forward in not included as default FilterType, so the Filter doesen’t intercept the request during the process
For completeness I have found the Exhibit at:
https://www.ibm.com/developerworks/community/forums/ajax/download/77777777-0000-0000-0000-000014240716/96a215e2-1b82-47de-a1b5-3a78fad8490c/attachment_14240716_quetion.doc
hello giuseppe
if you have more question, please help me , can you send me the questions my mail is [email protected]
giuseppe is right
giuseppe is right