Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

simple question  RSS feed

 
Meg Adal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one form which is in MyForm.jsp page.
Form has one textfield
I want to fill that textfield with the predefined value .
So i wrote the code as follows:

Everything is in the body of HTML.
But when I open MyForm.jsp in browser ,it doesnt' show AAA in textfield but shows <% =request_id ;%>
Can anybody tell me why it is happening?
Thanks in advance
Megan
[ September 30, 2002: Message edited by: Megan Adal ]
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Megan
In your JSP line:
<input type="text" name="txtId" size="11" maxlength="7" value= "<% =request_id ;%>">
get rid of the space in the scriplet between the % and the =, also get rid fo the ; at the end, you don't need it in a scriptlet. the line should look like this:
<input type="text" name="txtId" size="11" maxlength="7" value= "<%=request_id%>">
hope that helps
 
Clem White
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But if the servlet engine was processing the page page I would have expected this to produce an error. Have a look at the source to see if the other JSP code in the page has been processed (you can't tell just by looking in the browser as the tags will have been ignored even if they have been left there).
 
Meg Adal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
Thanks for reply.
I did as you wrote,still I am getting the same thing
I have no other JSP code in that page(actually I deleted remianing code so that I could figure out why I get such result)
Any suggestions??

Megan
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Megan
Post your exact code here. It is best to just cut and paste it from your app. It seems like it might be something in the syntax that is making it not recognize it as a server side scriptlet and it being passed to the browser as is - not interpreted first.
Thanks
 
Meg Adal
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dave,
When I tried to post the code,It gave me following message:
Sorry, your post appears to have an illegal HTML tag. Often this is because the post contains a "<" character instead of the equivalent HTML escape sequence "<"
Can I send you as attachment by e-mail?
Megan
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, go ahead and send it. Use the email link above my post. Also, you can get the UBB to accept your post by putting in spcaes in some places after the < or before the >.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!