combining struts tag and jstl

Hi Experts,

I would like to ask you your opinions about combining struts tag and jstl.
We have been using struts tag only, but I recently added jstl because I think it is more standard and simpler and powerful in some aspects.
But one team member thinks it is confusing if we use both.

What do you think?

thanks in advance
dkim18Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

girionisCommented:
It won't be confusing unless you're a new developer and haven't used any expression language before. Someone with moderate to senior experience in Java can handle both of them easily.

You are correct by saying that JSTL is standardised and more powerful than Struts tags. The only advantage of Struts tags is that they provide additional functionality (for example the html taglib) that JSTL tags do not provide. But they (obviously) only work with Struts projects, whether JSTL are project neutral.

You can follow a very simple approach: iff you have a piece of code that can be written by both Struts tags and JSTL, prefer JSTL. Otherwise go with Struts.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mccarlIT Business Systems Analyst / Software DeveloperCommented:
I think it just comes down to personal preference. We have a fairly large project that uses both spring and jstl tag libraries together.

But one team member thinks it is confusing if we use both.
I wonder what exactly this team member finds confusing? If it is the naming of some tags that might be similar, just make sure you use more descriptive namespace prefixes. I know most examples bind the jstl namespaces to prefixes like "c", "f", "x", etc but YOU don't have to follow this. Use prefixes like "jstl-c", "jstl-f", "jstl-x" and then for struts if you currently are using "s", just change that to "struts". This makes it quite clear what tags are from what library, but I will leave it up to you to weigh the benefits/costs of being able to use both libraries against the increased typing of namespace prefixes.

If I am not on the right track, and it is a different concern that your team member has, let us know.
0
dkim18Author Commented:
But one team member thinks it is confusing if we use both.
We have been using only struts tag for 6-7 years for this project and I recently start to use JSTL.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
??

You don't say what is confusing about it?
0
dkim18Author Commented:
I guess the team member prefers using only one type of EL language not both.
0
dkim18Author Commented:
and we have Struts tags every where and I recently added JSTL in some JSP files. So, we can't convert every Struts tags to JSTL anyway.
0
girionisCommented:
We have been using only struts tag for 6-7 years for this project and I recently start to use JSTL.

Why? What problem did JSTL tags solve that Struts tags duidn't solve?
0
dkim18Author Commented:
I just used JSTL because it is less code and more powerful and easier to understand.
0
Amitkumar PSr. ConsultantCommented:
Technically, there is no restriction on this. We can use multiple tag libraries in a single jsp page. In struts, we do the same thing by using tag library for html, bean and so on.

It's an individual's perception and knowledge regarding technology that makes thing confusing or simple.
0
mccarlIT Business Systems Analyst / Software DeveloperCommented:
I guess the team member prefers using only one type of EL language not both.
You (or your team member) are still not giving any REASON for not liking or not preferring to use both. I don't know whether we can give you any more information if we don't know the actual reason why. Just say I (or they) don't really like it doesn't give us anything to go on as to how to make it better.

So unless you can give us more detailed reasons, all I can say is it is down to the two of you to argue it out between your argument of "less code and more powerful and easier to understand" and the team members argument of "I prefer not to use it" or "it is confusing" and you will just have to resolve that between yourselves.
0
dkim18Author Commented:
thanks all. that is enough comments.
0
girionisCommented:
I just used JSTL because it is less code and more powerful and easier to understand.
There you go then, you have two reason to use JSTL.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.