Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need Help while Designing a Website.

 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all, I'm developing a website. In that website I'm going to add all of the information or the study material which a student may need but as we have First Year, Second Year and Third Year students and while registering or signing up student has to provide the class in which he/she is studying. and for example if the student is in a first year then he should be viewed only first year subjects list to download the material. Can anyone help me please how to do that i mean I know the logic but am developing that JSP page using CSS trying to make it a little attractive. So my question is can we add the whole code of HTML in servlet using out.println? Please help. Many Thanks...!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using JSPs for the views why would there be any need to output HTML from servlets?
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well sir i have heard that using java code in JSPs is an outdated method!! So should I include java code in JSP
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pranit Sonawane wrote:Well sir i have heard that using java code in JSPs is an outdated method!!

You heard correctly.

So should I include java code in JSP

No. Absolutely not!

Use the JSTL and EL in JSPs, and leave the HTML out of the servlets!
 
Pranit Sonawane
Ranch Hand
Posts: 172
Java MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks..!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you might benefit from reading this article on web app structure.
 
Today you are you, that is turer than true. There is no one alive who is youer than you! - Seuss. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!