Aw Ma - Do I *have* to use tags? ;-(

M

milkyway

Hello all,

I am a newbie to struts and was in the process of putting something
together. From what I can see, one would turn an HTML page to a .jsp
page and use the tag libraries to convert what is written in HTML to
something "strut-like"?

I have a lot of HTML code with me. Do I *have* to use the tag libs for
the HTML controls or can I just use them for the ones that will be
going back to the server (i.e. going to the container with
request.setXXX, session.setXXX, application.setXXX, etc.)?

I was using struts because it seems (at least it is advertised) that
validation can happen if it is used.

For example, if I have an entry field whose value will be sent to a
javascript function and then sent to a second field on the screen. The
second field (with the correct data) is the one that should go back to
the server.

Given that that is the case, should I just use a taglib on the second
field and not the first - since the second one is the one that will go
to the server? The rest of the page can be just regular, old, plane,
jane HTML.

Can someone provide some insight?

Kindest Regards.
 
S

Sime

Hello,

you do not have to use struts tags at all.
It doesn't matter that form is regular html form FormBean will populate it .
Try to read more about struts on apache site.
 
M

milkyway

Hi Sime,

Thank you for responding ;-)

If one does not have to use html tags, then (sorry if this has already
been asked before) why use them at all?

Kindest Regards.
 
S

Sudsy

milkyway said:
Hi Sime,

Thank you for responding ;-)

If one does not have to use html tags, then (sorry if this has already
been asked before) why use them at all?
<snip>

They handle certain situations well. I'm thinking in particular about
such things as URL rewriting when the client doesn't support cookies.
Even the html:html tag does more than just generate the html tag...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top