• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp does not display messages

 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please I am new in JSP and have worked on this issue since sunday.
My jsp is supposed to display information based on input values i make in a form. It works with a javaBean which does the processing.
however all i get is "No records match" message inspite of the value i put in.

I am frustrated at this point and want some directions. My JSTL code is below:

Thanks
Jonas


<c:choose>
<c:when test="${value.inputA == 0}" >
<p> This is Not A Quadratic Equation </p>
</c:when>
<c:when test="${value.inputB == 0}" >
<p> This is Not A Quadratic Equation</p>
</c:when>
<c:when test="${value.inputC > 1 }" >
<p> This is A Equation </p>
</c:when>

<ctherwise>
<p> No records matched </p>
</ctherwise>
</c:choose>
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the values of inputA, inputB and input C? They could have values so that none of the "when" tests match.
 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your prompt response Ulf.

even if I input a 2 for instance as the input value for either inputA, B or C, I still get the same message.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64720
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the value scoped variable being set up? Chances are, it's not being set up the way that you think it is.
 
jonas okwara
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My get/set Methods were set this way:


// Getter Method for InputA
//===========================

public double getInputA(){
return inputA;

}

//Setter Method For Input A
//==========================
public void setInputA( double value){
this.inputA = value;
getOutput();

}


//Getter Method For Input B
//============================
public double getInputB(){
return inputB;
}


//Setter Method For Input B
//===============================

public void setInputB( double value){
this.inputB = value;
getOutput();
}


//Getter Method For InputC
//==========================
public double getInputC( ){
return inputA;
}


//Setter Method For InputC
//==========================
public void setInputC(double value){
this.inputC = value;
getOutput();
}
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will help debug the problem if you output the values you're testing with a <cut> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic