aspose file tools*
The moose likes XML and Related Technologies and the fly likes xsl and jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xsl and jsp" Watch "xsl and jsp" New topic
Author

xsl and jsp

Kris Rasmussen
Greenhorn

Joined: Nov 03, 2002
Posts: 3
I am using resin to distribute a combination of xsl and jsp with xtp pages. I would like to be able to access an attribute defined in my xtp page from within my xsl page via java. I realize i could do this with a scriplet but I need to do it with actuall jsp as I need to make a call to a database with the attribute as input. Can anyone explain if this is possible or how I can do it?

Thanks,
Kris
[ November 03, 2002: Message edited by: Kris Rasmussen ]
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I'm a little confused as to what exactly you want to do here. Can you give a simple example of where your attribute is set, and where you want to use it ? Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Kris Rasmussen
Greenhorn

Joined: Nov 03, 2002
Posts: 3
I actually just figured it out myself, but I have another question at the end of this one so please read on.
I was trying to do this.

sometag
<<
<%int somevariableineedlater=$value-of(@param);;%>
>>
I didn't realize you could put xsl tags inside the jsp code like that.
I am still a little confused by the difference between <% and <jsp:scriptlet>. Is the <jsp:scriplet> tag compiled and executed once to create the static page while the <% tag executes the code everytime the page is accessed?
Thanks,
Kris
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
I am still a little confused by the difference between <% and <jsp:scriptlet>
As far as I know, they are exactly the same. jsp:scriptlet is just an XML/XSL-friendly version.
They both indicate some code which is compiled in to the servlet generated from the JSP page, and run for every request.
Kris Rasmussen
Greenhorn

Joined: Nov 03, 2002
Posts: 3
Thats what I thought too, however if you declare code in one, it cannot be accessed by the other. Any thoughts?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: xsl and jsp