Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Bean Questions 1

Status
Not open for further replies.

Michael42

Programmer
Oct 8, 2001
1,454
0
0
US
Hello,

I am learning Sun ONE Web Server Enterprise Edition 6.1 and JSP. I have a some java code (a class) I would like to use in my JSP page.

1. Where to I put my .java file?
For example: myclass.java
2. How do I call (istantiate) my class?
From scouring the docs it looks like <jsp:useBean>
Can you provide an example please.

Thanks,

Michael42

 
It does not matter wherer your .java files live, but the .class files should go into WEB-INF/classes, or be jar'd up and put into WEB-INF/lib.

Read this or google for "JSP JavaBean tutorial"

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
sedj,

Thanks - that was useful sir.

One other minor point to all those JSP\Java Bean newbies like me...

Make sure to bounce your server if beans\classes not auto refreshed!

Took me two weeks to realize this small but vital point. :-|

-Michael42

Thanks,

Michael42

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top