Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Where to put beans for JSP  RSS feed

 
And Green
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apologies if this really obvious.

I've just started playing about with JSP on Apache Web Server.

I've managed to get servlets running by placing them in file: Tomcat 6.0\webapps\examples\WEB-INF\classes. What I want to do however is call Java classes that I've constructed myself, for use in JSP scriptlets.

I can't figure out as to where I need to put the compiled classes though, which allows them to be called for use in JSP.

Is their anyone whose familiar with Apache Tomcat able to help?
[ November 02, 2007: Message edited by: Bear Bibeault ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by And Green:
I've just started playing about with JSP on Apache Web Server.

I assume you mean Apache Tomcat. The Apache Web Server is a different project that does not support JSP.

I can't figure out as to where I need to put the compiled classes though, which allows them to be called for use in JSP.

Same place as the servlets. Just be sure that all beans are in a package other than the default.

Is their anyone whose familiar with Apache Tomcat able to help?

This is not Tomcat-specific and will be true for all JSP containers. I have adjusted the topic title accordingly.
[ November 02, 2007: Message edited by: Bear Bibeault ]
 
And Green
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks alot for that. Very quick too!

I'll give it a go.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My pleasure. Be sure to mind the part about the packages.
 
Jetendra Ivaturi
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do place the pakagae compiled bean classes in the classes folder.

I believe Server does not matter what ever we use. Because the context is important for us.

Every web context should have the same context.

context(all the jsp files and htmls)
in this folder WEB-INF/classes(*.class) files. and web.xml along with classes folder.

Thanks

Jetendra
 
And Green
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, worked a treat. This website is great.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!