wood burning stoves 2.0*
The moose likes JSP and the fly likes JSP displays source Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP displays source" Watch "JSP displays source" New topic
Author

JSP displays source

bala kan
Ranch Hand

Joined: Aug 20, 2012
Posts: 44
Hi Friends,

Very good morning to you, i would like to display html page using jsp.. so, i use the following code..



it doesn't work properly.. it prints the above coding instead of loading the html page.. please help me..


Regards,
K.Bala

harshvardhan ojha
Ranch Hand

Joined: Jul 26, 2007
Posts: 157
    
    1

Hi bala, everything except this expression seems correct to me.

<%=this is my first JSP page.%>

you can only use expression for printing value of variable. remove above expression and try again.
Pyla Rao
Ranch Hand

Joined: Jul 10, 2012
Posts: 50
Hi bala,

In your code, every thing is fine.except the jsp:Expression tag.
first jsp expression tag is used to written the output stream of the response like out.println()


<%=this is my first JSP page.%>

you can only use expression for printing value of variable. remove above expression and try again.



you don't remove the code as above .just try as below.




Thanks,
PYLA.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Be sure that the file type of the file is .jsp and not .html.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP displays source
 
Similar Threads
alert is not working
http error404
JSTL not working
Very simple error
Component javax.faces.component.UIViewRoot is no