?
Solved

#text: ??????

Posted on 2004-04-28
17
Medium Priority
?
212 Views
Last Modified: 2010-04-01
Hello fellow experts,

Have any of you seen this before?
My jsp page is placing "#text:" before all my String variables and I have no idea why?
as a result of this all my method calles are being killed.
please help
Ghost
0
Comment
Question by:copyPasteGhost
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 8
17 Comments
 
LVL 7

Expert Comment

by:searlas
ID: 10940228
#text is the name of a text node in the DOM.

Any DOM manipulation going on?
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940259
there is but we are passing it into the method as a string..
so that shouldn't be the problem..
the odd thing is... if I run the same thing in a java class it works fine..
when I then take that same code and run it from jsp I get this added chaos...
no idea why...
got anything?
thanks
Ghost
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940268
Could be caused by either Javascript manipulation (which I think you'd be aware of), or by generating your output by parsing an XML tree.  Depending on the XML parser used (classpath dependent) toString on a node can produce different output.  Sometimes usefully outputting the text version of an element and all it's descendents; while other implementations may produce output like you're seeing.

So... what's involved here, XML or Javascript? (place your bets now...)
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 7

Expert Comment

by:searlas
ID: 10940278
Sounds like the classpath for your app server is picking up a different XML parser...
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940297
no javascipt
and no xml...
it comes in as xml and then we substring it to get pure string and then pass along the stings..
that's the problem...
any ideas?
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940305
You don't use an XML parser?
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940317
yeah I know...I didn't write this code :D
but I have to use it...
you know how it is..
Ghost
0
 
LVL 7

Accepted Solution

by:
searlas earned 2000 total points
ID: 10940318
If you were using an XML parser I'd say there's somewhere in your code you're calling toString (possibly implicitly) instead of using getNodeValue().
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940327
Can you show us some code that works in a .java but produces this 'orrible #text string in a jsp?
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940371
dude... round of applause.
I didn't even think to check about the toString..
thanks
Cheers,
Ghost
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940588
oops..
Spoke too fast...
that didn't change anything..
I'm still getting the uglyness..
any suggestions?
Ghost
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940634
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");

            // Connection string database
            String url = "jdbc:microsoft:sqlserver://" + strDataSource + ";User=" + strUser +";Password=" + strPass ;


            //Connect to dstrParamatabase
            c = DriverManager.getConnection(url);

this works fine in java but in jsp it prints out some nasty stuff like...

url = "jdbc:microsoft:sqlserver://[#text: server];User=[#text: User];Password=[#text: Pass]";

any ideas?
Ghost
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940817
Where's strDataSoruce, strUser, strPass coming from?
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940896
it's cool you were right there was xml parsing being done in more than one place.....yeah tell me about it :D
cheers man
Ghost
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940904
Which xml parser are you using when you try it as .java?
Which xml parser do you THINK you are using when you try it as .jsp...
(what application server?)
0
 
LVL 7

Expert Comment

by:searlas
ID: 10940908
Ok... sorted.

Good to know I'm not going mad. :-)
0
 
LVL 13

Author Comment

by:copyPasteGhost
ID: 10940918
great post a comment in the other thread so I can close that and so you can score more points
cheers,
ghost
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show how Aten was able to supply easy management and control for Artear's video walls and wide range display configurations of their newsroom.
Hey fellow admins! This time, I have a little fairy tale for you. As many tales do, it starts boring and then gets pretty gory. I hope you like it. TL;DR: It is about an important security matter, you should read it if you run or administer Windows …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question