Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Request parameters are lost in jsp

 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In JSP all the request parameters values are lost. But this application works fine in weblogic but in jboss i have an issue. Please let me know do i need to do any specific configuration in jboss. I am using jboss.5.0.1


All the request parameters which are sent in the application are lost.

Regards
Sudhakar
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like you have incorporated WLS-specific features in your web app. Remove them and it should work fine.

(If you want more specific help, TellTheDetails)
 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am not using any wlm specific features. Its plain jsp and servelets.

WebActionMapping webActionMapping = this.getWebActionMapping(selectedURL);
actionHandler = this.getWebActionHandler(webActionMapping, webSM);
actionHandler.init(_request,_response,webSM,webActionMapping);

// call action method to handle the request
String actionMethodName = webActionMapping.getWebActionMethodName();
Method actionMethod = this.getActionMethod(actionHandler,actionMethodName);
logger.log(Level.INFO,"Invoke " + webActionMapping.getWebActionHandlerClass() + "." + actionMethodName + "()");
actionMethod.invoke(actionHandler,new Object[0]);
nextScreen = actionHandler.getNextScreen();
redirect = actionHandler.isRedirect();

// place the web session manager proxy in session for JSP
if (!webSM.isDestroyed())
this.setWebSessionManagerProxy(webSM);
}
String forwardURL = nextScreen;
if (redirect)
{ System.out.println("If redirect is true");
logger.log(Level.INFO,"Redirecting request to [" + contextURL + forwardURL + "]");
// redirecting url needs to be relative to the server root path
_response.sendRedirect(_response.encodeRedirectURL(contextURL + forwardURL));
} else {
System.out.println("If forwardURL is true");
// forwading url are relative to the webapp context path
forwardURL = "/" + forwardURL;
logger.log(Level.INFO,"Forwarding request to [" + forwardURL + "]");
RequestDispatcher rd = context.getRequestDispatcher(_response.encodeURL(forwardURL));
// up to here i am getting values from request, But in jsp i am getting null
rd.forward(_request, _response);
}
 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More details

I am using frameset.

I have one main jsp which includes the other jsp. In the main jsp i am getting therquest values, But other included jsp like AAA.jsp i am not getting the request values
function refreshFrame() {
frames['adminMngAnalystTop'].window.location.href = "AAA.jsp";
frames['adminMngAnalystMiddle'].window.location.href = "BBB.jsp";
}
</script>
</head>
<frameset rows="200px,300px,40px" border ="0" noresize="noresize" onFocus="checkIssrSearchModal();">
<frame src="AAA.jsp" name="AA" noresize="noresize scrolling="no"/>
<frameset cols="45%,10%,45%" border="1" noresize="noresize">
<frame src="BB.jsp" name="BB" frameborder="1" scrolling="yes" />
</frameset>
</frameset>
</html>
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64608
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reddy Sudhakar wrote:I have one main jsp which includes the other jsp. In the main jsp i am getting therquest values, But other included jsp like AAA.jsp i am not getting the request values

Of course not. They're entirely different pages generated by a different request/response.

By the way, red text on a brown background is practically unreadable. I'd revisit any decision to use such colors when posting.
 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same code is working in weblogic, why not jboss?
 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One more observation

If i include jsp using <%@ include file="header.jsp" %> tab, I am getting the request parameters
But if i use frames sets , i am not getting the request parameters.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64608
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reddy Sudhakar wrote:
If i include jsp using <%@ include file="header.jsp" %> tab, I am getting the request parameters
But if i use frames sets , i am not getting the request parameters.

Of course. With include there is one page, and one request/response.

With frame sets (which sort of when out of favor in 1999) there are multiple separate pages and requests/responses.
 
Reddy Sudhakar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how come same code work in weblogic. is there any speecific configuration required in jboss?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64608
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless weblogic is broken, or there's much more to the story than you are telling us, it cannot be "working". Request parameters sent to one request cannot (or should not) leak over into unrelated requests.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic