You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Frederic Barozzi <fr...@ifrance.com> on 2002/10/09 12:08:38 UTC

xml, jsp, DOM

Hi,

Is there a better way than an other to work with xml document and jsp ?

I trie to explain:

- I like this solution:
    a client send a request to the server. This one, with internal java bean, processes the request.
    It asks the DB server, the file system, or other to made a DOM Object.
    it calls an xslt file and applies it to the DOM object.
    it send the response as formated html stream or pdf stream. 
=> Here how my jsp file could acces to that ? In using the Mainbean and called a function getMyDocAs HTML in the jsp file ? any idea

Is there somewhere advises to work with jsp, XML, DOM, and struts ?

Thanks 

Regards

Fred

Re: xml, jsp, DOM

Posted by Frederic Barozzi <fr...@ifrance.com>.
Well you are all all rigth. I think that's struts is a standar now, like
Tomcat, and other Open source projects from Apache.

I'm happy to see that in fact there is no real solution.
I mean not a magic , but more precisly a standar one.

I've never wanted to reinvent the wheel as Eddie said, but look around java
architecture, sun gives us a dev language, a complet object architecture and
also a standar: for writing source code, and for developping java bean (for
example) ... and i don't want to do someting "wrong" or badly coded. It's
very important for me.

I've only wanted to know if there was a standar with struts to mix xml, and
jsp.

So, thanks all for your answers

I hope i will help you in the futur when i'll work more on struts...

Regards

Fred



______________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros
d'économies ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by Eddie Bush <ek...@swbell.net>.
Frederic Barozzi wrote:

>You're rigth.
>but , in an other hand all my software users want:
>- a garantee of standar.
>- a complete source code.
>- and all reasons that explain lib uses and architecture choices.
>
>For example, it was difficult to explain the "Struts framwork" choice. Why
>don't you use standar java classes, they said !
>
Because if I did that it would take longer to build your application - 
and it would cost more.

... that's what I'd say :-)

>If they have money and give
>time ...why not ?
>
Quality?  There's a reason.  There are so many folks that have this 
stuff in (heavy!) production environments.  That means bugs get found - 
and fixed!

Are they really not concerned about time?  ... they must have more 
dollars than cents (read: sense).

>So, my question is an architecture one: "the best way to mix xml ans jsp (if
>it exists!)"
>
>Tanks
>
I'm sorry - I can't give you advice on your problem :-( but there are 
others around that probably can.  I do understand your perdicament - 
sounds like someone with a bad case of NIH syndrome (Not Invented Here). 
 How many times do you have to reinvent the wheel before you figure out 
that - as long as it's nicely rounded ... and rolls smoothly - there's 
no need to do it again!  Ok - that might not be the best way to explain 
it to them, but I think you get my point ...

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
I like it.

I would add that Struts also allows for a project to focus on solving 
the business issue, and not dilute or lose focus of resources on solving 
the potentially endless technology issues.
.V

Brian Hickey wrote:
> Frederic,
> 
> I can give you the business case for Struts. Read on if you dare...
> 
> Struts allows the separation of layers (the Model/View/Controller) in any
> application.
> 
> This provides many things including assignment of skills to specific areas.
> Database developers get to do database development. Java developers get to
> develop Java. HTML developers get to do HTML with (hopefully) a minimum of
> Struts/JSP tags. Managers of software teams like this. It is easy and
> efficient.
> 
> If a company is honest, they should admit that the value of their
> application is in the data (Model) and the business logic (Controller).
> Although pretty, the presentation layer (View) is what I call a "throwaway".
> If they don't use good architecture, they end up chained to the presentation
> layer and they spend large amounts of money on any changes to it. Struts
> helps avoid this (still need good design and code) by making the
> presentation layer "expendable" and "expandable".
> 
> A well designed Struts application can support web browsers, cell phones,
> PDAs, and anything that may be invented for the forseeable future. All done
> with a change or addition of simple presentation layer. Almost painless.
> 
> By use of sound techniques, all of your application is derived from the base
> Struts classes and you can easily create additional convenience classes that
> you can derive from or reuse. This makes each subsequent iteration of the
> application easier and easier, not to mention taking less time. This equates
> to dollars (or lire) saved.
> 
> Now the decision a company has to make is twofold:
> 
> 1. Is Open Source a solid enough foundation to develop on?
> 2. Is it worth the time to adopt the OO techniques and Struts knowledge now
> to the development team to save money later?
> 
> You may guess that every company may have different answers and you would be
> correct.
> 
> In my humble opinion, Struts is based on best practices and solid OO Design.
> That matters to me because I will always choose to be proactive over being
> reactive in application development.
> 
> HTH
> 
> Brian
> 
> ----- Original Message -----
> From: "Frederic Barozzi" <fr...@ifrance.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Wednesday, October 09, 2002 11:47 AM
> Subject: Re: xml, jsp, DOM
> 
> 
> 
>>You're rigth.
>>but , in an other hand all my software users want:
>>- a garantee of standar.
>>- a complete source code.
>>- and all reasons that explain lib uses and architecture choices.
>>
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by Eddie Bush <ek...@swbell.net>.
Yes - but it's Stxx he's talking about.  I think he already "cleared" 
Struts.

Brian Hickey wrote:

>Frederic,
>
>I can give you the business case for Struts. Read on if you dare...
>

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by Brian Hickey <bh...@r-effects.com>.
Frederic,

I can give you the business case for Struts. Read on if you dare...

Struts allows the separation of layers (the Model/View/Controller) in any
application.

This provides many things including assignment of skills to specific areas.
Database developers get to do database development. Java developers get to
develop Java. HTML developers get to do HTML with (hopefully) a minimum of
Struts/JSP tags. Managers of software teams like this. It is easy and
efficient.

If a company is honest, they should admit that the value of their
application is in the data (Model) and the business logic (Controller).
Although pretty, the presentation layer (View) is what I call a "throwaway".
If they don't use good architecture, they end up chained to the presentation
layer and they spend large amounts of money on any changes to it. Struts
helps avoid this (still need good design and code) by making the
presentation layer "expendable" and "expandable".

A well designed Struts application can support web browsers, cell phones,
PDAs, and anything that may be invented for the forseeable future. All done
with a change or addition of simple presentation layer. Almost painless.

By use of sound techniques, all of your application is derived from the base
Struts classes and you can easily create additional convenience classes that
you can derive from or reuse. This makes each subsequent iteration of the
application easier and easier, not to mention taking less time. This equates
to dollars (or lire) saved.

Now the decision a company has to make is twofold:

1. Is Open Source a solid enough foundation to develop on?
2. Is it worth the time to adopt the OO techniques and Struts knowledge now
to the development team to save money later?

You may guess that every company may have different answers and you would be
correct.

In my humble opinion, Struts is based on best practices and solid OO Design.
That matters to me because I will always choose to be proactive over being
reactive in application development.

HTH

Brian

----- Original Message -----
From: "Frederic Barozzi" <fr...@ifrance.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, October 09, 2002 11:47 AM
Subject: Re: xml, jsp, DOM


> You're rigth.
> but , in an other hand all my software users want:
> - a garantee of standar.
> - a complete source code.
> - and all reasons that explain lib uses and architecture choices.
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: uae logic:notEqual to compare with several values

Posted by Cathy Osekizoglu <hi...@yahoo.ca>.
 Craige:
Thank you for your reply. I am not familar with JSTL. I will learn it later.
Now, I need a quick fix on this problem. Could you or anybody help me?
Thank you.
  "Craig R. McClanahan" <cr...@apache.org> wrote: 

On Wed, 9 Oct 2002, Cathy Osekizoglu wrote:

> Date: Wed, 9 Oct 2002 11:58:15 -0400 (EDT)
> From: Cathy Osekizoglu 
> Reply-To: Struts Users Mailing List 
> To: Struts Users Mailing List ,
> Frederic Barozzi 
> Subject: uae logic:notEqual to compare with several values
>
>
> Hi, dear:
> I want to use logic:notEqual to compare with several values. Can I use ?
> If I use:
> 
> 
> doSomething
> 
> 
> doSomething is never been excuted even the property is not equal to "3" or "6".
> How can I do it in struts1.1? Please help me.
> Thank you very much.
>

If you're running on a Servlet 2.3 / JSP 1.2 container, this is a place
where the expression language in JSTL 1.0 can be very helpful. In
addition, JSTL supports a tag that acts much like a "switch"
statement in Java, letting you specify alternative behavior for any number
of different values.

> Cathy
>

Craig


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Post your free ad now! Yahoo! Canada Personals

Re: uae logic:notEqual to compare with several values

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Wed, 9 Oct 2002, Cathy Osekizoglu wrote:

> Date: Wed, 9 Oct 2002 11:58:15 -0400 (EDT)
> From: Cathy Osekizoglu <hi...@yahoo.ca>
> Reply-To: Struts Users Mailing List <st...@jakarta.apache.org>
> To: Struts Users Mailing List <st...@jakarta.apache.org>,
>      Frederic Barozzi <fr...@ifrance.com>
> Subject: uae logic:notEqual to compare with several values
>
>
>  Hi, dear:
> I want to use logic:notEqual to compare with several values. Can I use <logic:notEqual name="myForm" property="myProperty" value="3,  6"></logic:notEqual>?
> If I use:
>  <logic:notEqual name=.. property=... value="3">
>        <logic:notEqual name=.. property=.. value="6">
>             doSomething
>       </logic:notEqual>
> </logic:notEqual>
> doSomething is never been excuted even the property is not equal to "3" or "6".
> How can I do it in struts1.1? Please help me.
> Thank you very much.
>

If you're running on a Servlet 2.3 / JSP 1.2 container, this is a place
where the expression language in JSTL 1.0 can be very helpful.  In
addition, JSTL supports a <c:choose> tag that acts much like a "switch"
statement in Java, letting you specify alternative behavior for any number
of different values.

> Cathy
>

Craig


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


uae logic:notEqual to compare with several values

Posted by Cathy Osekizoglu <hi...@yahoo.ca>.
 Hi, dear:
I want to use logic:notEqual to compare with several values. Can I use <logic:notEqual name="myForm" property="myProperty" value="3,  6"></logic:notEqual>?
If I use:
 <logic:notEqual name=.. property=... value="3">
       <logic:notEqual name=.. property=.. value="6">
            doSomething
      </logic:notEqual>
</logic:notEqual>
doSomething is never been excuted even the property is not equal to "3" or "6".
How can I do it in struts1.1? Please help me. 
Thank you very much.
 
Cathy
 
 



---------------------------------
Post your free ad now! Yahoo! Canada Personals

Re: xml, jsp, DOM

Posted by Frederic Barozzi <fr...@ifrance.com>.
You're rigth.
but , in an other hand all my software users want:
- a garantee of standar.
- a complete source code.
- and all reasons that explain lib uses and architecture choices.

For example, it was difficult to explain the "Struts framwork" choice. Why
don't you use standar java classes, they said ! If they have money and give
time ...why not ?

So, my question is an architecture one: "the best way to mix xml ans jsp (if
it exists!)"

Tanks

______________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros
d'économies ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by Eddie Bush <ek...@swbell.net>.
Frederic Barozzi wrote:

>Thanks,
>
>It looks good, but i really need to limitate externals jar imports and as
>posible software update and garantee too.
>
>So i need method advise in using struts, xml, and jsp.
>
>Thanks again, i will try it, but there are too many jar like orion, ...
>
... which are in heavy use by people, and being actively developed!  I 
don't use it personally, but I'd sure look hard at it if I were doing a 
lot of XML type stuff.  Do you prefer to code something yourself and 
resolve bugs continually or just pop a jar in and go?

The only time I complain about JAR-file count is when I'm told to 
include JARs I don't think I should have to - simply because the 
developer didn't want to take the time to say "Ok - if a person is 
running under JDK 1.3 they need this, this, and this ... and that -- If 
a person is running under JDK 1.4 they just need this and that."  That's 
where my annoyance lies ... :-/

>Fred
>
It's there - it's free - why not use it?

-- 
Eddie Bush




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: xml, jsp, DOM

Posted by Frederic Barozzi <fr...@ifrance.com>.
Thanks,

It looks good, but i really need to limitate externals jar imports and as
posible software update and garantee too.

So i need method advise in using struts, xml, and jsp.

Thanks again, i will try it, but there are too many jar like orion, ...

Fred

______________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Débit soit 150,92 euros
d'économies ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: xml, jsp, DOM

Posted by Andrew Hill <an...@gridnode.com>.
Have you seen Jeff Penal's STXX extension?
http://www.oroad.com/opencode/stxx/

-----Original Message-----
From: Frederic Barozzi [mailto:frederic.barozzi@ifrance.com]
Sent: Wednesday, October 09, 2002 18:09
To: Struts
Subject: xml, jsp, DOM


Hi,

Is there a better way than an other to work with xml document and jsp ?

I trie to explain:

- I like this solution:
    a client send a request to the server. This one, with internal java
bean, processes the request.
    It asks the DB server, the file system, or other to made a DOM Object.
    it calls an xslt file and applies it to the DOM object.
    it send the response as formated html stream or pdf stream.
=> Here how my jsp file could acces to that ? In using the Mainbean and
called a function getMyDocAs HTML in the jsp file ? any idea

Is there somewhere advises to work with jsp, XML, DOM, and struts ?

Thanks

Regards

Fred


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>