It's not a secret anymore!
The moose likes Servlets and the fly likes Could Java class instantiate in jsp scriplet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Could Java class instantiate in jsp scriplet" Watch "Could Java class instantiate in jsp scriplet" New topic
Author

Could Java class instantiate in jsp scriplet

Gopi Krishna
Greenhorn

Joined: Jan 25, 2001
Posts: 10
Hi ,
can we instantiate a java class in a jsp page like
<% MyClass mc = new MyClass();
mc.getConnection();
%>
Asuthosh Borikar
Ranch Hand

Joined: Sep 29, 2000
Posts: 75
Gopi,
I don't see why not. I do it all the time and it never gives me any problem. But, it is preferrable to use JavaBeans in place of java classes,going by the MVC pattern.
HTH.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Could Java class instantiate in jsp scriplet
 
It's not a secret anymore!