File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need Help while Designing a Website.

 
Pranit Sonawane
Ranch Hand
Posts: 171
Java MySQL Database Netbeans IDE
  • 0
  • 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
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • 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: 171
Java MySQL Database Netbeans IDE
  • 0
  • 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
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • 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: 171
Java MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks..!!!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64188
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you might benefit from reading this article on web app structure.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic