Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how can i get the httpServletRequest in portlets(we have renderRequest), see below code

 
bharath ramv
Greenhorn
Posts: 9
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can i get the httpServletRequest in portlets(we have renderRequest), see below code

public void doView(RenderRequest request, RenderResponse response)
throws PortletException, IOException {----

HttpServletRequest httpRequest = (HttpServletRequest) request.getParameter("j_username");// we tried this senario but the geting value is null always.
.
.
.
}

Thanks
Bharath
 
Sachin Joshi
Ranch Hand
Posts: 83
Java Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what are you trying to do here? are you trying to get the username? why do you want to use HTTP ServletRequest ? Which portal are you using? I found something for liferay here
 
Vamshi Kumar Kota
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use following method to get HttpServletRequest


Hope this helps.
 
suresh dasari
Ranch Hand
Posts: 121
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use the following code to get the HttpServletRequest and it is working fine

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic