This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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.
Here we go again....shows us what does not work...
Eric
Steve Dyke
Ranch Hand
Joined: Nov 16, 2004
Posts: 1254
posted
0
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
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
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
Joined: Nov 16, 2004
Posts: 1254
posted
0
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
Joined: Nov 08, 2001
Posts: 15357
6
posted
0
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.
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
Joined: Nov 16, 2004
Posts: 1254
posted
0
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.