Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP displays source

 
bala kan
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 157
1
Android Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65115
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure that the file type of the file is .jsp and not .html.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic