How to write a JSP program accepting a single parameter?
If the parameter passed is “A”, it will generate an HTML of calculator A.
If the parameter passed is “B”, it will generate an HTML of calculator B.

I know how to write a calculator program in HTML format
but I am not sure how to write a jsp and accept a parameter and generate calculator A/B.

Can anyone give me some hints?

you can write using methods in jsp :

<%!public String generateCalc(String param)
{
if(param.equals("A"))
{
// code for generating HTML A calculator 
}
else if(param.equals("B"))
{
// code for generating HTML B calculator 
}

}
%>

If this is not your requirement, please be a bit more clear..
thanks.

commented: Good effort, but question was grabbed from yahoo answers in China spam attempt +16
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.