File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Can't figure out why login.xsl message gets displayed. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Can Watch "Can New topic
Author

Can't figure out why login.xsl message gets displayed.

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 389
SelectStatementCategory.xsl:



<xsl:if test="../ServiceCount='0'">
<xsl:attribute name="class">internalLink</xsl:attribute>
<xsl:attribute name="id">tdDelete_<xsl:value-of select="Id" /></xsl:attribute>
<xsl:attribute name="name">tdDelete_<xsl:value-of select="Id" /></xsl:attribute>
<xsl:attribute name="onclick">checkServices(this)</xsl:attribute>
delete
</xsl:if>


Does not allow one to delete and displays the Login.xsl message.


vs.



SelectDisplayCategory.xsl:


<xsl:if test="../ServiceCount='0'">
<xsl:attribute name="class">internalLink</xsl:attribute>
<xsl:attribute name="id">tdDelete_<xsl:value-of select="Id"/></xsl:attribute>
<xsl:attribute name="name">tdDelete_<xsl:value-of select="Id"/></xsl:attribute>
<xsl:attribute name="onclick">checkServices(this)</xsl:attribute>
delete
</xsl:if>


Allows one to delete without displaying Login.xsl message.

Login.xsl:

<xsl:if test="$unauthorized='T'">
<table>
<tr>
<td width="20px"/>
<td style="COLOR:red; FONT-SIZE:larger; FONT-WEIGHT:bold">
You have attempted to access functionality for which you are not authorized.
In order to ensure the security of the system, please login again.
<br/>
<br/>
</td>
<td width="120px"/>

</tr>
</table>
</xsl:if>
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18168
    
    8

That's XSLT. None of it allows anybody to do anything or prevents anybody from doing anything.

Perhaps it generates HTML which allows or prevents those things? If so, then you should be looking at that HTML. But we've had this conversation before, haven't we?
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 389
I'm having trouble understanding you Paul. I don't see all that much .html in my project in Eclipse. I have searched on all the .html that is present in my project and I don't see anything there that is that telling. This is code that I have inherited from someone else and I am still very much trying to sort it out.

I am attaching a screenshot of what I see in my package explorer in Eclipse Helios. Can you look at it and tell me where you think I should be looking? Or if this isn't helpful can you tell me what you mean?

Thanks very much Paul.

Michele



[Thumbnail for packageexplorer.JPG]

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18168
    
    8

Let me explain what I think might be happening. Of course this is just a guess, but it's a guess based on how I have seen systems working in real life.

You have a server where some kind of servlets are running. Or maybe they are called something else, but at any rate there's code running on a server. That code produces something which is transformed via XSLT into HTML, and that HTML is sent to the browser. At that point a person looks at the browser and does something like filling in a form or clicking on a link. And that user action causes a request to be sent to your server, where another servlet (or whatever) processes it. Probably it produces something which is transformed via another XSLT into HTML, and so on.

So to find out what is happening (which is the first step in finding out how to fix it when it happens wrong) you need to observe that process. Now Eclipse is not involved in that process at all, it's just a tool for creating the web application. So looking in Eclipse is useless.

You need to understand what server processes (servlets?) exist, how their data is transformed into HTML, and what that HTML is for. As you correctly observe, none of that HTML is in Eclipse. That's because the HTML is an output of the system. It isn't part of the programming. That's why I say you have to observe what's actually happening.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't figure out why login.xsl message gets displayed.
 
Similar Threads
Error comes whilke compiling the jsp page
spaces while populating using s:iterator
XSL Problem
Handling Nested tables in xsl:fo for saving a document in RTF
Remove unwanted space before and after the table using javascript