Hello Friends,
I am facing a problem in jsp.I am creating a jsp file name home.jsp which i put in public_html(currently i am using java webserver2.0).In that jsp file i am refering a bean name Omnistats with the scope session in the following way
<jsp:useBean id="stats" class="omnijobs.Omnistats" scope="session" />
my Omnistats file is in directory d:\javawebserver2.0\servlets\omnijobs.
With this, the jsp file working good in my system.But when my move these files to my server it is giving Omnistats bean not found error.I am creating same directory structure and put the files in the same as in my machine.
Why this error came? What's my mistake? If i did any thing wrong please correct me.
Thanks and Regards,
sreedhar garimella.
-
need urgent help in jsp beans (7 messages)
- Posted by: sreedhar garimella
- Posted on: June 29 2000 03:17 EDT
Threaded Messages (7)
- need urgent help in jsp beans by Floyd Marinescu on June 29 2000 14:58 EDT
- need urgent help in jsp beans by sreedhar garimella on June 30 2000 01:14 EDT
-
need urgent help in jsp beans by Floyd Marinescu on July 03 2000 10:41 EDT
-
need urgent help in jsp beans by nicklesh madoori on October 24 2000 08:30 EDT
-
need urgent help in jsp beans by Floyd Marinescu on October 25 2000 08:41 EDT
-
need urgent help in jsp beans by nicklesh madoori on October 25 2000 01:04 EDT
- caching by Harsha Potter on September 24 2001 12:25 EDT
-
need urgent help in jsp beans by nicklesh madoori on October 25 2000 01:04 EDT
-
need urgent help in jsp beans by Floyd Marinescu on October 25 2000 08:41 EDT
-
need urgent help in jsp beans by nicklesh madoori on October 24 2000 08:30 EDT
-
need urgent help in jsp beans by Floyd Marinescu on July 03 2000 10:41 EDT
- need urgent help in jsp beans by sreedhar garimella on June 30 2000 01:14 EDT
-
need urgent help in jsp beans[ Go to top ]
- Posted by: Floyd Marinescu
- Posted on: June 29 2000 14:58 EDT
- in response to sreedhar garimella
Sreedhar,
This sounds like either a type on your JSP (maybe you mispelt the classfile wrong), or a classpath error. Maybe you have to declare something in your JWS config files when deploying a bean?
Also try moving your stats bean to whatever JWS uses as a "server classes" directory, as opposed to your servlet classes directory.
hope this helps,
Floyd -
need urgent help in jsp beans[ Go to top ]
- Posted by: sreedhar garimella
- Posted on: June 30 2000 01:14 EDT
- in response to Floyd Marinescu
Hi Floyd,
Thanks once again for your reply. I create a directory beans in server "classes" directory and i gave like this
<jsp:useBean id="stats" class="beans.Omnistats" scope="session" />
Now the jsp file works fine.
I have few more doughts
1)
Is it must to put jsp beans in one subdirectory of classes directory?
2)
Previous u mentioned i have to change configure files of webserver.If so in which file i have to change?
3)what is the difference between these scopes in beans
like page,request,session and application?I did not understand properly this scope parameter.please explain in detail in which situation i have to put a particular scope to my bean?
Thanks and Regards,
sreedhar garimella.
sreedhar garimella. -
need urgent help in jsp beans[ Go to top ]
- Posted by: Floyd Marinescu
- Posted on: July 03 2000 22:41 EDT
- in response to sreedhar garimella
As I understand it, this is how the scopes work:
1) page
anything placed in the page scope is accessible only by JSP code within that page.
2) request
This is the most common scope level. Request level scope is where you place parameters/objects that need to be accessed by any servlets/jsp's used in the current request. For example, when you JSP:include your example servlet, all the parameters it accesses are in the "request". From your main JSP, you could add more objects to the request, and the example servlet and any other included servlets/jsp's would have access to those parameters. Once the page has been outputted to the client, these objects/parameters dissappear.
3) session
Session scope is for objects that are "specific to the particular user accessing the site", to be stored "across requests". So if a user logs in, you would store this in the session, and any time he wanted to go a restricted area of the site, you would check the session scope to see if he is logged in. Shopping carts are implemented by placing information in the session.
4) application
Application scope is for global variables, which can be accessed by any servlet/jsp in the application.
hope this helps,
Floyd -
need urgent help in jsp beans[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 24 2000 20:30 EDT
- in response to Floyd Marinescu
We have a situation here. We have to cache data into some place. This data is not changed frequently. Hence to avoid the db hits, the cache.
Can anyone tell me which is the best place to cache data.
We use JSP, EJP with weblogic 5.1
The options which came to me are:
storing in a bean with scope as application
storing in the work spaces of weblogic
storing in entity bean and referencing from stateful session bean.
Can any one clarify the above and please explain each in detail and specify why the advised option is better than the others.
Thanks,
Nicklesh -
need urgent help in jsp beans[ Go to top ]
- Posted by: Floyd Marinescu
- Posted on: October 25 2000 08:41 EDT
- in response to nicklesh madoori
Nicklesh,
Set your WL beans to use dbIsShared, and isModified property, then the entity beans themselves will be your cache, and you won't have to do any programming.
Floyd -
need urgent help in jsp beans[ Go to top ]
- Posted by: nicklesh madoori
- Posted on: October 25 2000 13:04 EDT
- in response to Floyd Marinescu
I understand the use of ismodified and db-is-shared to be false to cache data. But this is the solution for one ejb server.
Can you describe to me how to get this working with cluster of servers.
Will be appreciated if you could explain in detail about the pros and cons for single server with the two parameters defined properly
and the pros and cons for cluster of servers
Thanks,
n -
caching[ Go to top ]
- Posted by: Harsha Potter
- Posted on: September 24 2001 12:25 EDT
- in response to nicklesh madoori
In the case of Entity beans we use isModified to check whether the data is changed.How do we do in case of Session beans?