• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlets and jsp  RSS feed

 
satya sompalle
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone suggest me its very urgent.
i want write the below jsp in the java class in a particular method if i write same conditon in jsp i am not getting proper data. if i write in java i am getting but how will i include the jsp scripts in the java
i want like this
if ( now.before(systemtime) ){
<A href="controller?handler=startExport&export_id=<%=exp[i].getExportID()%>"><img src="images/UK/ddc_btn_exportnow_light.gif" border="0">
<%}else{%>
INPUT type="IMAGE" src="images/UK/ddc_btn_exportnow_light.gif"

Thanks in advance,
Satya
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the problem!...you can write java code into the java method.

i guess you are struggling with the html tag right?...if yes use the particular html tag in servlet the help of PrintWriter.

Hope This Helps
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 37181
515
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Satya,
What are you getting (in HTML source view) and how does it compare to what you are expecting?

Note that it is considered poor practice to put Java code in a JSP. You would be better served doing the Java work in a Servlet and forwarding to the JSP just for display.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!