File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Need Help while Designing a Website. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Need Help while Designing a Website." Watch "Need Help while Designing a Website." New topic
Author

Need Help while Designing a Website.

Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 165

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

Joined: Jan 10, 2002
Posts: 61761
    
  67

If you are using JSPs for the views why would there be any need to output HTML from servlets?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 165

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

Joined: Jan 10, 2002
Posts: 61761
    
  67

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

Joined: Jul 29, 2011
Posts: 165

Thanks..!!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61761
    
  67

Sounds like you might benefit from reading this article on web app structure.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need Help while Designing a Website.