Import following object in jsp or class
import com.ibm.portal.state.accessors.url.ServerContext;
import com.ibm.wps.services.ServiceManager;
import com.ibm.wps.services.config.ConfigService;
import com.ibm.wps.state.accessors.url.ServerContextOnConfigFactory;
import com.ibm.wps.state.phases.ServerContextFactory;
ConfigService configService = (ConfigService)ServiceManager.getService(com.ibm.wps.services.config.ConfigService.class);
ServerContextFactory ctxFactory = new ServerContextOnConfigFactory(configService);
ServerContext serverContext = ctxFactory.newServerContext((HttpServletRequest)(request));
System.out.println(serverContext.getContextPath());
System.out.println(serverContext.getHomeProtected());
System.out.println(serverContext.getHomePublic());
Subscribe to:
Post Comments (Atom)
Followers
Blog Archive
-
▼
2009
(13)
-
▼
October
(9)
- Accessing parameter from QueryString in IBM WebSph...
- Accessing parameter from QueryString in IBM WebSph...
- Accessing parameter from QueryString in IBM WebSph...
- IBM Websphere Application Server to initialize a s...
- How to use Httpsession for user data sharing in I...
- Access the url parameter from IBM WebSphere Portal...
- Enable Remember Me Cookie in IBM WebSphere Portal ...
- Configuring a stand‐alone LDAP user registry on Wi...
- How to get path(/wps/portal or /wps/myportal) in I...
-
▼
October
(9)
No comments:
Post a Comment