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 2009/04/24 07:06:34 UTC

DO NOT REPLY [Bug 47091] New: jsp problem

https://issues.apache.org/bugzilla/show_bug.cgi?id=47091

           Summary: jsp problem
           Product: Tomcat 6
           Version: 6.0.18
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: huangfeng@tongtech.com


<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>

<html>
    <head>

    </head>

    <body>
        test page
        <br>
        <jsp:useBean id="pa" scope="request" class="com.tongtech.Test01">
        </jsp:useBean>
        <%
            String str = "AAAAAAAAAAAAAAAAAAA";
            String str1 = "ZZZZZZZZZZZZZZZZZZZZZ";
            pa = new com.tongtech.Test01();
            pa.setName(str1);
        %>
        <jsp:setProperty name="pa" property="name" value="<%=str%>" />
        <jsp:getProperty name="pa" property="name" />
        <br>
        <%
        out.println(pa.getName());
        %><br>


    </body>

</html>

access this jsp page,the response  returned  by tomcat is:
AAAAAAAAAAAAAAAAAAA
ZZZZZZZZZZZZZZZZZZZ

but the response  returned by weblogic application server is:
AAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAA

why? which one is right?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47091] jsp problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47091


Mark Thomas <ma...@apache.org> changed:

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




--- Comment #1 from Mark Thomas <ma...@apache.org>  2009-05-02 13:36:18 PST ---
Tomcat's behaviour is correct since there are two, differently scoped,
instances of your bean. Ask on the users list of you need more explanation.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 47091] jsp problem

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47091





--- Comment #2 from Xie Xiaodong <xx...@gmail.com>  2009-05-02 13:54:53 PST ---
A variable in scriptlet is a local variable inside _jspService, and you can
find the corresponding .java file in
{tomcat_install_dir}/work/localhost/{webapp_dir}. 

And your variable defined in the <jsp:useBean> tag has a scope of request, so
they have two different scope, as Mark said.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org