You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2007/05/27 17:31:12 UTC

how to get basename of the invoking program name ?

I try to use following method to get basename of the invoking program name inside JSP/struts, 
   
  String why=(String) PageContext.getPage();
   
  but receive the following error message
   
  can not make a static reference to the non-static methoid getPage() from the type pageContext,
   
  so, what is the correct way to extract basename of the involing program in struts?
   
  tks
   
  john

       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.

Re: how to get basename of the invoking program name ?

Posted by Dave Newton <ne...@yahoo.com>.
--- john lee <sh...@yahoo.com> wrote:
> could u tel me how ?

http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/http/HttpServletRequest.html

d.

> Dave Newton <ne...@yahoo.com> wrote:
>   --- john lee wrote:
> > so, what is the correct way to extract basename of
> > the involing program in struts?
> 
> Do you mean the invoking URL?
> 
> Look at the HttpServletRequest interface.



       
____________________________________________________________________________________Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: how to get basename of the invoking program name ?

Posted by john lee <sh...@yahoo.com>.
could u tel me how ?
   
  john

Dave Newton <ne...@yahoo.com> wrote:
  --- john lee wrote:
> String why=(String) PageContext.getPage();
> 
> but receive the following error message
> 
> can not make a static reference to the non-static
> methoid getPage() from the type pageContext,

Do you understand why you're getting that error?

> so, what is the correct way to extract basename of
> the involing program in struts?

Do you mean the invoking URL?

Look at the HttpServletRequest interface.

d.




____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



       
---------------------------------
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.

Re: how to get basename of the invoking program name ?

Posted by Dave Newton <ne...@yahoo.com>.
--- john lee <sh...@yahoo.com> wrote:
>   String why=(String) PageContext.getPage();
>    
>   but receive the following error message
>    
>   can not make a static reference to the non-static
> methoid getPage() from the type pageContext,

Do you understand why you're getting that error?

> so, what is the correct way to extract basename of
> the involing program in struts?

Do you mean the invoking URL?

Look at the HttpServletRequest interface.

d.



       
____________________________________________________________________________________Building a website is a piece of cake. Yahoo! Small Business gives you all the tools to get online.
http://smallbusiness.yahoo.com/webhosting 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org