• Post Reply Bookmark Topic Watch Topic
  • New Topic

What's wrong with this JSP code?

 
neetu shri
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The values donationType="*" and session.procedureType="APH" is never evaluating to be true. The flow is always moving to the <otherwise>block.
Thanks in advance.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your all uppercase properties don't seem to conform to the JavaBean conventions very well. I imagine your references to the bean properties are failing. Have you verified that your property reference are returning the expected data? If not, that's basic debugging step #1.
 
neetu shri
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The DriveManager is an interface. Relevant snippet from it...
scheduleState is a session attribute which has a string property donationType



In the Action class, I have set

before being forwarded to this JSP.Even replacing the test condition to does not output anything to web page.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Of course not. The EL is designed to reference bean properties. It has no means to access anything else in a class, particularly static constants.

However, since accessing such constants is such a useful thing, I wrote this article about it.
[ February 28, 2008: Message edited by: Bear Bibeault ]
 
neetu shri
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for you response. I will try to use the approach in your article.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!