I have developed a web application. It's working fine with the Websphere. I have delpoyed the same application into the tomcat 6.0.14, the deployment was sucessful.
But i try to use some functionalities such as saving data after entering input to the page, it's throwing the following error message and the operation was failed.
Caused by: java.lang.IllegalStateException: No modifications are allowed to a locked ParameterMap
... 25 more
Requesting you please let me know that what may be the mistake and provided solution.
Thanks for your reply. I am able to run the same application successfully with the Web Sphere 6.1 server.
That just means that WAS 6.1 isn't enforcing the J2EE standard. Just like writing into a WAR, for all intents and purposes, you're exploiting a bug in a particular implementation of a server. Because it's a standards violation, you can't expect to find that same loophole in other servers or even in other versions of the same server.
An IDE is no substitute for an Intelligent Developer.
Author and all-around good cowpoke
Joined: Mar 22, 2000
If i need to create a new map that is a copy of the orginal ParameterMap in Tomcat environment, then how can i do this. Please help me.
Look at the JavaDocs for the API for the java.util.Map interface.
You can use the keySet method to obtain a collection of all of the key values as a Set.
Create a new Map object from one of the classes which implements Map - I typically use HashMap.
Iterate through the keySet - for each key, extract the value from the ParameterMap - the value is a String but just treat it as an object.
Store that value in the new Map using that key.
You now have a Map that contains all the original data but is not locked.