• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

simple question

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 >.
 
The knights of nee want a shrubbery. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic