Connecting Tech Pros Worldwide Forums | Help | Site Map

Java transformation jboss 4.2 vs. Tomcat 5.5

Newbie
 
Join Date: Oct 2009
Posts: 1
#1: Oct 13 '09
I have a java class that takes data from a backend database plus some xls does the transform and returns the generated xhtml.

I have just discovered that when executing the class under Tomcat 5.5 I get what I expected but when executing the class under Jboss4.2 it changes one of the transformed lines.

The xsl for this line is:
Expand|Select|Wrap|Line Numbers
  1. <xsl:template match="GENOGRAM">
  2. <html>
  3. <head>
  4.   <title>Ebase Technology - Genogram</title>
  5.   <link href="avatar/css/genogram/genogram.css" rel="stylesheet" type="text/css"/>
  6. </head>
  7. <body>
The line that is transformed differently in Jbos is the stylesheet link

e.g.

Running in Jboss I get this transformation:

Expand|Select|Wrap|Line Numbers
  1. <link type="text/css"  rel="stylesheet" href="avatar/css/genogram/genogram.css"> 
Running in Tomcat it transforms like this:

Expand|Select|Wrap|Line Numbers
  1. <link href="avatar/css/genogram/genogram.css" rel="stylesheet" type="text/css" />
You will notice that the "text/css" and href have been switched.


Any clues as to why this is happining would be most welcome.



Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Oct 14 '09

re: Java transformation jboss 4.2 vs. Tomcat 5.5


Does it cause any problems? Which one appears first should be of no consequence. Why they are swapped could be related to one each of the servers generate that text. I wouldn't worry about it unless it causes any problems. Which it should not.
Frinavale's Avatar
Site Moderator
 
Join Date: Oct 2006
Location: The Great White North
Posts: 5,118
#3: Oct 15 '09

re: Java transformation jboss 4.2 vs. Tomcat 5.5


This switch can't possibly cause any problems.
The HTML link tag has a bunch of attributes that you can set. The order of these attributes isn't important.

It could be the browser that you're using to view the HTML. I know that if I use something like FireBug things aren't shown exactly as are in code (FireBug also hides comments etc...there's configuration settings).

Or it could be that Jboss is preforming some sort of private logic that results in switching the attributes.

The important thing is that it the order of tag attributes does not have an effect on the element.

-Frinny
Reply