jQuery in Action, 2nd edition*
The moose likes JSP and the fly likes JSP structure questions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP structure questions" Watch "JSP structure questions" New topic
Author

JSP structure questions

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
Is JSP laid out just like ASP.NET, with the code behind file and etc..
Or better yet do JSP pages have code-behind files at all. As in code behind file i mean like a .java file that directly relates with that .jsp page.

for example:

default.jsp
- default.jsp.java

and you'll have your page_load or some similar function etc etc...

Is this how JSP works or is it a lot different?

Thanks,

Justin Fox
[ May 28, 2008: Message edited by: Bear Bibeault ]

You down with OOP? Yeah you know me!
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Justin,
No. While JSPs do compile into Java classes, they are not classes that you access. JSPs can access other Java classes (like helper code), but there isn't a one to one relationship.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
Cool, so me being pretty good with asp.net etc. etc. wouldn't help me adapt to JSP at all right?

I just wanted to know, because we are using asp.net for web apps at work, and I wanted to see if it would be a HUGE learning curve for me to switch over to JSP for future projects.

Thanks again!

Justin Fox
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30138
    
150

Originally posted by Justin Fox:
Cool, so me being pretty good with asp.net etc. etc. wouldn't help me adapt to JSP at all right?

It helps a little in that learning a second languages is always easier and some things are similar. You wouldn't expect to jump in and be fluent right away though.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSP structure questions
 
Similar Threads
how to reuse the java bean in parent page
pdf converter
application/pdf and netscape incompatability problem
get file path from url ?
Servlets or JSP?