The Artima Developer Community
Sponsored Link

Java Answers Forum
JSP & Servlets

1 reply on 1 page. Most recent reply: Oct 23, 2003 1:45 AM by Shekhar

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
tintu

Posts: 1
Nickname: tintu
Registered: Oct, 2003

JSP & Servlets Posted: Oct 22, 2003 9:47 AM
Reply to this message Reply
Advertisement
I am trying to call a JSP from Servlet and I was able to accomplish this by using RequestDispatcher object. Now I want to call the same servlet from JSP. For that, I used javabeans. (i.e.)
<jsp:useBean id="Class1" class="Page1" scope="session" />
<jsp:getProperty name="Class1" property="productInfo" />

Also I have that servlet with getProductInfo() method.
When I tried to execute this JSP, I am getting a message saying that "Page1.java/class" cannot be found. Could you please let me know, what I am doing wrong.

Do I have to do any special set up in web.xml ??

Any help would be appreciated.


Shekhar

Posts: 11
Nickname: shekhar4u
Registered: Aug, 2003

Re: JSP & Servlets Posted: Oct 23, 2003 1:45 AM
Reply to this message Reply
You have to import that Page1 class in your jsp file using page directive
for ex:

<%@ page import="Page1.class" %>
<jsp:useBean id="Class1" class="Page1">
<jsp:setProperty name="Class1" property="productinfo"/>
</jsp:useBean>

and also see that your Page1.class in stored in proper place in server.

Flat View: This topic has 1 reply on 1 page
Topic: Application in a server environment Previous Topic   Next Topic Topic: JAR  Problem urgent!!

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use