• Post Reply Bookmark Topic Watch Topic
  • New Topic

not print the text

 
deep raj
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<html>
<head>
</head>
<body>
<%
out.print("xf");
%>

<form name="form1">
<input type="button" name="b" style="background-color:#FF0000 ">
</form>
</body></html>
 
Brij Garg
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Request is not going to the server.
you are not submitting the form. So how can code inside
<% %>
can execute.

 
Swastik Dey
Rancher
Posts: 1686
7
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So how can code inside
<% %>


Whats <%%> got to do with form submission? Which text is not getting printed, clarify your question properly.
 
pradeep gamage
Ranch Hand
Posts: 85
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<form name="form1">
<input type="button" name="b" style="background-color:#FF0000 ">
Above part in your code is not useful.






Check with this code fragment. You don't need to submit this to server. This is only jsp file. so "hello" must be print in browser.

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Putting Java code in a JSP in this manner has been discredited for over 8 years now. It's 2010 and it's time to start writing JSP like grown-ups.

Ditch the scriptlets and learn the JSTL and EL for properly writing JSPs.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!