aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Display a String on a Web Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Display a String on a Web Page" Watch "Display a String on a Web Page" New topic
Author

Display a String on a Web Page

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1478
    
    1
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Here we go again....shows us what does not work...

Eric
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1478
    
    1
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: 15376
    
    6
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: 1478
    
    1
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: 15376
    
    6
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

Joined: Sep 29, 2008
Posts: 12617

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: 1478
    
    1
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.
 
 
subject: Display a String on a Web Page