DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=37933>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=37933 Summary: Bugs in Tomcat Product: Tomcat 5 Version: 5.0.0 Platform: PC OS/Version: Windows 2000 Status: NEW Severity: major Priority: P1 Component: Servlet & JSP API AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Hi, I am manokaran.I wrote a program in tomcat using eclipse IDE. The code is as follows: 1.>This is a Bean: package MMM; public class Bean { private String name; public void SetName(String s) {this.name=s; } public String getName() { return name; } } 2.>This is a Servlet class: package MMM; import java.io.IOException; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class Serv extends HttpServlet{ public void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException,IOException { Bean bean=new Bean(); bean.SetName("manokaran"); request.setAttribute("mano",bean); RequestDispatcher rd=request.getRequestDispatcher("india.jsp"); rd.forward(request,response); } } 3.This is web.xml file: <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>mano</servlet-name> <servlet-class>MMM.Serv</servlet-class> </servlet> <servlet-mapping> <servlet-name>mano</servlet-name> <url-pattern>/manokara.do</url-pattern> </servlet-mapping> </web-app> 4.>This is Index.html file: <html> <form action=manokara.do> <input type=submit> </form> </html> 5.>This is a JSP file: <jsp:useBean id="mano1" class="MMM.Bean" scope="request" /> <jsp:getProperty name="mano" property="name"/> Report: The setAttribute, Jsp UseBean ID and getProperty name must be same. this is the correct procedure. this format was working well in tomcat and all web,application servers. But the values set by me were : setAttribute("mano",ss),getProperty name="mano" useBean id="mano1". Observe that the useBean id is set different. Hence logically, this must not work. But in my case it is working in TOMCAT. The same code is not working in WEBLOGIC. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]