websphere-portal

JSR 286 compliant namespace parameter

元气小坏坏 提交于 2019-12-06 12:33:49
In portlet What is the best way to read namespace parameter in action method. My form contains <input id="<portlet:namespace/>param1" name="<portlet:namespace/>param1" value='hello'/> option1: request.getParameter(response.getNamespace() + "param1"); option2: request.getParameter("param1"); option1 does not work in liferay, but does seem will work in websphere. option2 works fine in liferay 6.2. option1 seems to work in before 6.1. Can anyone please tell me what is the jsr 286 compliant way? As I mentioned in a comment of an answer to this question, the problem is with Liferay 6.2 because IBM

Websphere 7 Portal: Servlet checking for login status to Portal?

断了今生、忘了曾经 提交于 2019-12-06 02:07:11
I run a WebSphere 7.0 Portal. One has to log in to be able to see any information which is fine for all portlets. But additionally there are a couple of servlets that a deploy in the same war file that produce some raw data for AJAX-scripts. Currently one can bypass the authentication from WebSphere Portal if one knows the URL to that particular servlet. I want to change this and check if the user is currently logged in to the Portal. How do I do this? I tried ((PumaHome) new InitialContext().lookup(new CompositeName(PumaHome.JNDI_NAME))).getProfile().getCurrentUser(); but this returns null.

what is the difference between portal and myportal in websphere portal server

喜你入骨 提交于 2019-12-06 01:52:39
I'm using websphere portal server and what is the difference between /wps/portal and /wps/myportal in websphere portal server /wps/portal is for anonymous context and is used for public resources, whereas /wps/myportal is used for authenticated and authorized resources. 来源: https://stackoverflow.com/questions/17213844/what-is-the-difference-between-portal-and-myportal-in-websphere-portal-server

WebSphere Portal behind reverse proxy and getServerPort()

与世无争的帅哥 提交于 2019-12-05 04:41:25
问题 I have problems accessing WebSphere Portal which is deployed behind reverse proxy (using Apache). The problem is that while inspecting HTTP requests issued by browser, some requests are targeted at proxy, and some directly at WebSphere Portal. My Apache configuration: ProxyPassReverseCookieDomain backend-server proxy-server ProxyPass / http://backend-server:10039/ ProxyPassReverse / http://backend-server:10039/ The problem is, some generated resources contained absolute URIs targeting at

WebSphere Portal behind reverse proxy and getServerPort()

馋奶兔 提交于 2019-12-03 21:19:27
I have problems accessing WebSphere Portal which is deployed behind reverse proxy (using Apache). The problem is that while inspecting HTTP requests issued by browser, some requests are targeted at proxy, and some directly at WebSphere Portal. My Apache configuration: ProxyPassReverseCookieDomain backend-server proxy-server ProxyPass / http://backend-server:10039/ ProxyPassReverse / http://backend-server:10039/ The problem is, some generated resources contained absolute URIs targeting at backend-server:10039... What else should I configure to properly access WebSphere Portal behind reverse

Detecting Device Type in a web application

…衆ロ難τιáo~ 提交于 2019-11-26 22:15:39
We have a Java based application where in we want to detect the device type(mobile or desktop) for the device that is sending the request. How is it possible? You'll have to read the User-Agent header from the request and decide on that. In vanilla servlet apps, a crude way of doing it is: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(request.getHeader("User-Agent").indexOf("Mobile") != -1) { //you're in mobile land } else { //nope, this is probably a desktop } } nidhin You can get device information by parsing http header

Detecting Device Type in a web application

泄露秘密 提交于 2019-11-26 08:16:08
问题 We have a Java based application where in we want to detect the device type(mobile or desktop) for the device that is sending the request. How is it possible? 回答1: You'll have to read the User-Agent header from the request and decide on that. In vanilla servlet apps, a crude way of doing it is: public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if(request.getHeader("User-Agent").indexOf("Mobile") != -1) { //you're in mobile land

ClassCastException when casting to the same class

[亡魂溺海] 提交于 2019-11-25 22:47:59
问题 I have 2 different Java projects, one has 2 classes: dynamicbeans.DynamicBean2 and dynamic.Validator . On the other project, I load both of these classes dynamically and store them on an Object class Form { Class beanClass; Class validatorClass; Validator validator; } I then go ahead and create a Validator object using validatorClass.newInstance() and store it on validator then I create a bean object as well using beanClass.newInstance() and add it to the session. portletRequest.setAttribute(