File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes my jsp is showing too much in the browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "my jsp is showing too much in the browser" Watch "my jsp is showing too much in the browser" New topic
Author

my jsp is showing too much in the browser

Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
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 ]

SCJO, SCJD, SCWCD, I-Net+, A+, Network+, MCSD, MCDBA, MCP, MCT
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
It looks to me like that last chunk is not in the writeHeading method but is a scriptlet.
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
i think it a typo but thats whats wrong.
u used <!% instead of <%!
change it and it will work.
Ray Smilgius
Ranch Hand

Joined: Jan 29, 2001
Posts: 120
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

Joined: Jan 13, 2002
Posts: 732
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 !
 
wood burning stoves
 
subject: my jsp is showing too much in the browser