Win a copy of Rust Web Development this week in the Other Languages forum!

Richard Hands

Greenhorn
+ Follow
since Feb 25, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Richard Hands

Yeah, it looks like the saloon email sent out earlier today advertising this weeks book contest was accidentally pointing people to the wrong forum. I've sent an email to the head honcho's here in the saloon, and hopefully they'll send out a correction email later, and maybe a kind moderator could move the incorrectly positioned posts to the security forum please?
16 years ago
This looks like a very interesting book. I'd like to ask though, does it cover subjects such as an effective way to implement J2EE security alongside database row level security?
16 years ago
Presumably you're outputting html? (not that it matters that much).

here's a quick example of how you could do it using MOD

----------- TEST XML DATA -------------

----------- END TEST XML DATA -------------

----------- EXAMPLE XSLT ------------------


[ October 27, 2004: Message edited by: Richard Hands ]
[ October 27, 2004: Message edited by: Richard Hands ]
Hi,

I'm currently working on a project that takes the Raw XML and transforms it into a pseudo 'form' type XML, and i'm trying to write an XML Schema to validate that developers have written the transformation stylesheets to output the data in the correct format.

The question is, is there way in XML Schema to define essentially two (or more) definitions for the same element, dependant upon a given attribute in it. Therefore if type='text' then it must have attributes A and B and optionally can have attribute C & D, but if type='date' then it must have attribute X and can optionally have attribute Y & Z?

I'm relatively inexperienced as far as XML Schema's go and the way the data has been defined from stage one is thus

<table>
<row>
<field type="text" name="field1" value="bob" style="font-weight:bold;"/>
<field type="date" name="field2" format="datetime" validatepast="true" value="1973-07-27 16:34:00"/>
</row>
</table>

I get the feeling it might be something to do with <xs:attributeGroup> element but i can't seem to get it working correctly.

obviously this is a very cut down version and there's a host of other tags, but i've tried to keep it simple as it covers what's needed.
a very interesting point, and one i will go and try out.

Thanks for the help.
17 years ago
basically, i have an abstract class that instantiates an xml transformer, reads the basic data-centric xml from the database and transforms it with a html-centric xsl stylesheet (which xsl it uses is determined by various bits of data in the database).

This is being extended to a variety of things, and in the one i'm currently working on, i want to strip out all the javascripts that may be in it.

does this make a bit more sense?
17 years ago
Thanks for the tip, but it still didn't work.
17 years ago
Hi,

I'm writing a servlet to parse XML and XSL together,
and then do some bits an pieces with the resultant HTML.

First thing i need to do with the output is remove any and
all javascript content from the HTML, as it's to be used in
a different fashion to the original page.

I'm sure i'm not far off with the regex but i can't quite get
it to work. (don't you just hate it when you get to that stage :roll: )

here's an example of the regexpr, and a code snippet that it
fails to parse even though i think it should (note there's no
CR/LF between the end of the first script tag and the start of the second one)



[ May 26, 2004: Message edited by: Richard Hands ]

[ May 27, 2004: Message edited by: Max Habibi ]
[ May 27, 2004: Message edited by: Max Habibi ]
17 years ago
Hi,
I've been searching the web and this forum desperately trying to find some information on how to set up the new netbeans 3.6 for debugging JSP's.
This is something that the guys at NetBeans have been touting as a new feature for 3.6, and it's something i've been desperately waiting for. Debugging servlet's is one thing, but stepping through raw jsp code would be wonderful.
Can anyone give me some pointers on how to set up my project and netbeans 3.6 to use this new feature, as i can't seem to find any info on it, nor can i seem to work out exactly how to implement it in practise (Time constraints on my current project are preventing me having loads of time to just play with netbeans and work it out).
Thanks
[ April 15, 2004: Message edited by: Richard Hands ]
Thanks Bear.
There were over 100 instances of throwing an unavailableexception.
Guess thats what you get for starting to write a system whilst you're still in the throes of learning java, and then copying and pasting error handling with a fundamental flaw throughout the whole system
17 years ago
JSP
Thats an interesting question Bear.
Thinking on it, i seem to recall seeing at least one of those somewhere in someone's code. I'll go and see if i can track those down and get rid.
Thanks
17 years ago
JSP
Hi,
We've been developing a XML/XSL/JSP/Servet based web application, running development on Tomcat 4.1.29, and connecting to an oracle 8i database using the oracle classes12.jar jdbc stuff.
The problem we are seeming to get, with alarming inconsistency, is that once a page errors (e.g. maybe a piece of sql failed in a jsp), tomcat returns a 503 error for the page. After this point, all subsequent attempts to access that page, result in
503 - This JSP has been marked unavailable.
the only way to get round this is to stop and restart tomcat.
All the code is in try/catch blocks, catching Exception, and not throwing them back any further up the chain, and at the end of all jsp's, database connections are terminated (again, in try catch blocks).
This is a major stability issue for us, as we cannot afford to deploy an application to the market that requires the entire webserver program to be stopped and restarted every time there's a minor problem.
I have searched everywhere i can think, and can't find anything to indicate if it's A) some web container configuration issue. B) some piece of programming the JSP's/Servlets that we are doing wrong.
(Also, even though the session timeout is disabled, variables in the session object seem to be vanishing after 10 minutes or so of user inactivity. does this one sound familiar to anyone?)
cheers
Richard Hands
Senior Analyst Programmer.
17 years ago
JSP