You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "yuhua (JIRA)" <ji...@apache.org> on 2012/08/03 09:02:02 UTC

[jira] [Created] (WW-3859) request.getServletPath() return null

yuhua created WW-3859:
-------------------------

             Summary: request.getServletPath() return null
                 Key: WW-3859
                 URL: https://issues.apache.org/jira/browse/WW-3859
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.3.1
         Environment: struts2.3 websphere7.0.0.12 tomcat5.5
            Reporter: yuhua


I create a class:
public abstract class BaseAction extends ActionSupport implements
		ServletRequestAware, ServletResponseAware, ServletContextAware {

	protected HttpServletRequest request;

	protected HttpServletResponse response;

	protected HttpSession session;

        .........

        public String getServletPath(){
               return request.getServletPath();
        }

         ..........
         //some get  and set method
}

now ,in tomcat 5.5 run environment,getServletPath() method  can return correct value,but in websphere 7,it return null.first,i distrust it is some problem in webphere.so i create a simple jsp file and write above code in new jsp file,very magical,it return correct value.i arrive the net to look for the answer.but,nothing i find.it's struts bug?Looking forward to reply.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WW-3859) request.getServletPath() return null

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3859.
-------------------------------

       Resolution: Not A Problem
    Fix Version/s: 2.3.5
         Assignee: Lukasz Lenart

Please follow tips on that page [1]

[1] http://struts.apache.org/2.x/docs/websphere.html

And for future please first ask question on user list instead registering a bug.
                
> request.getServletPath() return null
> ------------------------------------
>
>                 Key: WW-3859
>                 URL: https://issues.apache.org/jira/browse/WW-3859
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.1
>         Environment: struts2.3 websphere7.0.0.12 tomcat5.5
>            Reporter: yuhua
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.5
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> I create a class:
> public abstract class BaseAction extends ActionSupport implements
> 		ServletRequestAware, ServletResponseAware, ServletContextAware {
> 	protected HttpServletRequest request;
> 	protected HttpServletResponse response;
> 	protected HttpSession session;
>         .........
>         public String getServletPath(){
>                return request.getServletPath();
>         }
>          ..........
>          //some get  and set method
> }
> now ,in tomcat 5.5 run environment,getServletPath() method  can return correct value,but in websphere 7,it return null.first,i distrust it is some problem in webphere.so i create a simple jsp file and write above code in new jsp file,very magical,it return correct value.i arrive the net to look for the answer.but,nothing i find.it's struts bug?Looking forward to reply.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira