Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP beans and JRun

 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use beans with JSP, bean compiles fine, get set works fine with bean tester.
Now, I have to make it work with JSP. Where do I put it? I am using JRun, couldn't locate this info in the documentation. There's no error shown in the browser, but the value I am trying to retrieve from the bean is not displayed.
Does anyone know where do I need to put this bean for JRun server.
TIA,
- Manish
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since a JSP gets turned into a servlet, any class that has to work with a JSP must be stored like a servlet class - in the
WEB-INF/classes
directory of the web application. Be sure that you make the bean part of a package, classes in the default package don't seem to get loaded as you would expect.
Bill
 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have put my test bean in a package and created the necessary directories for it. But there's no web-inf with JRun. Instead I put it in the jsm-default classes, but no luck
What else can I do to make it work? (I use JRun 2.3)
- Manish
 
Shubhrajit Chatterjee
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Update to JRUN 3
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JRun 2.3 comes from 2 generations of the servlet and JSP API ago. It simply does not provide for using beans. You could jump to JRun 4 which implements the current API or JRun 3 (which I am using) which is only one generation behind.
Or you could get Tomcat which is free.
Bill
 
Manish Hatwalne
Ranch Hand
Posts: 2591
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm,
I think I'll go for Tomcat. Thanks for all ur inputs.
- Manish
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic