File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

my jsp is showing too much in the browser

 
Ray Smilgius
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below is the code for a jsp page problem is it will display the

<!%
public void WriteHeading(String sTitle, bool bIncludeButtons, JspWriter out)
{
String stTitle = sTitle;
if (stTitle.equals(""))
{
stTitle = "InScope";
}
out.print("<font color=\"red\">");
out.print("hi");
out.println("</font>");


}
%>
<%
out.print("<font color=\"red\">");
out.print("hi");
out.println("</font>");
%>
heres the output browser IE 5.0
"); out.print("hi"); out.println(""); } %> hi
the last hi on this line is red

Any ideas I dont want anything showing in the browser from this function unless it is called.
Thanks ray
[ January 21, 2002: Message edited by: Ray Smilgius ]
[ January 21, 2002: Message edited by: Ray Smilgius ]
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks to me like that last chunk is not in the writeHeading method but is a scriptlet.
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i think it a typo but thats whats wrong.
u used <!% instead of <%!
change it and it will work.
 
Ray Smilgius
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, How could I have overlooked this detail? I must be prone to error, I will check my chipset for a bios update
Thanks ray
[ January 21, 2002: Message edited by: Ray Smilgius ]
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im glad i could help a pro like yourself.
just shows we little guys count also
im sure ill need your advices more than once so im glad i could help !
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic