You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by red phoenix <ro...@gmail.com> on 2007/08/20 05:42:39 UTC
How to get directory information in struts2 action?
I want to know how to get directory information in struts2 action,when I run
following action:
http://localhost:8080/struts2-blank-2.0.9/example/HelloWorld.action
I want to get the path value http://localhost:8080/struts2-blank-2.0.9 in
HelloWorld.action,such as:
public String execute() throws Exception {
String path=....//get path value
return SUCCESS;
}
how to do it?
Re: How to get directory information in struts2 action?
Posted by Laurie Harper <la...@holoweb.net>.
red phoenix wrote:
> I want to know how to get directory information in struts2 action,when I run
> following action:
> http://localhost:8080/struts2-blank-2.0.9/example/HelloWorld.action
>
> I want to get the path value http://localhost:8080/struts2-blank-2.0.9 in
> HelloWorld.action,such as:
> public String execute() throws Exception {
> String path=....//get path value
> return SUCCESS;
> }
>
> how to do it?
Using the standard Servlet API:
http://tomcat.apache.org/tomcat-5.0-doc/servletapi/javax/servlet/http/HttpServletRequest.html
http://struts.apache.org/2.x/docs/how-can-we-access-the-httpservletrequest.html
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org