copyPasteGhost
asked on
#text: ??????
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
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
ASKER
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
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
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...)
So... what's involved here, XML or Javascript? (place your bets now...)
Sounds like the classpath for your app server is picking up a different XML parser...
ASKER
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?
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?
You don't use an XML parser?
ASKER
yeah I know...I didn't write this code :D
but I have to use it...
you know how it is..
Ghost
but I have to use it...
you know how it is..
Ghost
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Can you show us some code that works in a .java but produces this 'orrible #text string in a jsp?
ASKER
dude... round of applause.
I didn't even think to check about the toString..
thanks
Cheers,
Ghost
I didn't even think to check about the toString..
thanks
Cheers,
Ghost
ASKER
oops..
Spoke too fast...
that didn't change anything..
I'm still getting the uglyness..
any suggestions?
Ghost
Spoke too fast...
that didn't change anything..
I'm still getting the uglyness..
any suggestions?
Ghost
ASKER
Class.forName("com.microso ft.jdbc.sq lserver.SQ LServerDri ver");
// Connection string database
String url = "jdbc:microsoft:sqlserver: //" + strDataSource + ";User=" + strUser +";Password=" + strPass ;
//Connect to dstrParamatabase
c = DriverManager.getConnectio n(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
// Connection string database
String url = "jdbc:microsoft:sqlserver:
//Connect to dstrParamatabase
c = DriverManager.getConnectio
this works fine in java but in jsp it prints out some nasty stuff like...
url = "jdbc:microsoft:sqlserver:
any ideas?
Ghost
Where's strDataSoruce, strUser, strPass coming from?
ASKER
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
cheers man
Ghost
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?)
Which xml parser do you THINK you are using when you try it as .jsp...
(what application server?)
Ok... sorted.
Good to know I'm not going mad. :-)
Good to know I'm not going mad. :-)
ASKER
great post a comment in the other thread so I can close that and so you can score more points
cheers,
ghost
cheers,
ghost
Any DOM manipulation going on?