• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Display a String on a Web Page

 
Steve Dyke
Ranch Hand
Posts: 1644
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have assigned the following string(including quotes) to a session attribute and I want to display it on my Web Page in an input tag using EL but it the input tag displays as empty.

"\\gvsvr03\drawings\wgen\pre_pdf\sourcefiles\GenericA1.rtf"
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here we go again....shows us what does not work...

Eric
 
Steve Dyke
Ranch Hand
Posts: 1644
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:Here we go again....shows us what does not work...

Eric


Here is the JSP code. I cannot show you the HTML result because when I use DIV tags the view source only shows the parent JSP file.

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not seeing a div, are you outputting it to a textbox?

If you are ouputting it to value="${drPage1path}", your html mark up when rendered would look like



since you said the quotes are in that string.

Eric
 
Steve Dyke
Ranch Hand
Posts: 1644
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:I am not seeing a div, are you outputting it to a textbox?

If you are ouputting it to value="${drPage1path}", your html mark up when rendered would look like



since you said the quotes are in that string.

Eric


This JSP is loaded into a DIV tag on a page using jQuery.load(). That is what I ment by the DIV tag comment.

Yes I am attempting to output to textbox with the "${drPage1path}". Every thing I have tried renders an empty text box. Could the slashes be causing the problem?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are shoving that entire thing into the div? If you are putting an html fragment in the page, you really do not need html head and body tags.

If you load the jsp page by itself, does it load?

Eric
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the rendered HTML. If the quotes are in that string, what Eric said earlier is the problem.

Why would you want to include the quotes, anyway?
 
Steve Dyke
Ranch Hand
Posts: 1644
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:You are shoving that entire thing into the div? If you are putting an html fragment in the page, you really do not need html head and body tags.

If you load the jsp page by itself, does it load?

Eric


I have the body tags removed.

I used window.open instead of the jQuery.load() and I get the same result, a blank text box.

However, it did give the oportunity to view the source code and the EL had as you said ""{foo}"".

So I changed my JSP code to single quote and that fixed it.

Thanks for the help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic