Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

small questions about jsp  RSS feed

 
Yichao Zhu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I m self learning jsp, and i got some questiosn:

1- should I avoid using declarations (<%! %>) in a jsp file? should i use tags only?
2- is it framework like struts a kind of "tag library" ?
3- whats different using struts and using JSF ? which is better?
4- i have read something call JSTL, and Jakarta tag library... are they the same?

thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yichao Zhu wrote:1- should I avoid using declarations (<%! %>) in a jsp file? should i use tags only?

Yes. In fact, in modern JSPs you should avid all scriptlets. The JSTL and the EL are the modern accepted dynamic elements.

2- is it framework like struts a kind of "tag library" ?

No. Frameworks like Struts usually include a set of tag libraries, but are not themselves just tag libraries.

3- whats different using struts and using JSF ? which is better?

There are way too many difference to even begin to list them. And nothing is ever always "better" than something else. -- it depends upon the situation and needs of the task at hand. Personally I dislike both. If I had to pick one, I'd go with Struts, but I'd be kicking and screaming all the way. JSF, in my opinion, is an abomination that should never have seen the light of day.

4- i have read something call JSTL, and Jakarta tag library... are they the same?

The JSTL is a standard tag library -- Jakarta is just one implementation of this standard.
 
Yichao Zhu
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your answers, about question 3...

3- whats different using struts and using JSF ? which is better?

There are way too many difference to even begin to list them. And nothing is ever always "better" than something else. -- it depends upon the situation and needs of the task at hand. Personally I dislike both. If I had to pick one, I'd go with Struts, but I'd be kicking and screaming all the way. JSF, in my opinion, is an abomination that should never have seen the light of day.

so terrible they are? if you dislike both what do you do or use?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote my own light-weight front controller implementation. See the "Front Man" link in my signature.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!