You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2005/12/16 07:00:21 UTC

DO NOT REPLY [Bug 37933] New: - Bugs in Tomcat

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: manokarand@gmail.com


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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 37933] - Bugs in Tomcat

Posted by bu...@apache.org.
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


william.barker@wilshire.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Bugs in Tomcat              |Bugs in Tomcat




------- Additional Comments From william.barker@wilshire.com  2005-12-18 04:43 -------
Yeah, well, it doesn't look like the spec will accept a previously defined 
Request-Attribute here (at least with the 'recommended' action), so you have a 
point.

I'll have to look into it more to see if it's reasonable to do the compile-
time 'recommended' action, or if we will just have to do it at runtime.  In 
anycase, it won't be pretty :(.  





-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 37933] - Bugs in Tomcat

Posted by bu...@apache.org.
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


william.barker@wilshire.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |k.huwig.apache@huwig.de




------- Additional Comments From william.barker@wilshire.com  2006-02-27 20:39 -------
*** Bug 38797 has been marked as a duplicate of this bug. ***

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 37933] - Bugs in Tomcat

Posted by bu...@apache.org.
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


william.barker@wilshire.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From william.barker@wilshire.com  2005-12-19 01:53 -------
This is fixed now in the SVN trunk, and will appear in 5.5.15.

The fix raises a runtime error in your test case.  I don't see how to do it at 
translation time, but I'm happy to be proven wrong :).

-- 
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org