Sowmeya, please Use Code Tags when you post a source code. That way your code looks formatted. Unformatted code is hard to read. You can add code tags by wrapping your code in [code] [/code] tags. You can edit your message using button and then add code tags to it.
Are you using Struts 2 or 1?? You are using Struts 2 taglib, your configurations and action class is of Struts 1 and the exception is of Struts 2...
s i understood that there are many difference in both versions and i am not supposed to combine both.I have changed all the files to struts 1 specific.Thanks
i am getting an exception :
The error says you are still using Struts 2 tags in addition.jsp which as the code shows you are not. Did you deploy your application again properly after removing everything related to Struts 2 (as earlier your JSP had Struts 2 tags used in it)??
S ankit.I was able to rectify the error by making a few changes in my web.xml and jsp files.The program is running properly now,but i have a success.jsp file in which i need to print the sum and i tryed using the bean:write method,but i get an error saying <bean:write >method should be left blank.how do i print the value in success.jsp?I tryed to use request.getAttribute(sum),but it returns a null.I also understand that to make full utilization of the struts framework i am not supposed to touch the session or request to get a value set in the bean.Help me out.
@Ankit: I believe, we can use Struts2 with Struts1, as far as we know what are we up to. In fact, I tried it in past. But here, its apparent that mixing both will screw up the things, especially for the beginner and who doesn't know what he/she is doing. Hence, I do agree with you here.
@Adeel, I know we can use both versions of Struts in an application, what I meant was one cannot use Struts 2 filter and Struts 1 config files. Mixing it like that is not allowed.
@Sowmeya, can you post the line of success.jsp which is giving you trouble. Also bean:write is not a method, its a tag. Also please don't use the word "S" instead of "Yes". We encourage people to UseRealWords on javaranch...