• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Request parameters are lost in jsp

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
how come same code work in weblogic. is there any speecific configuration required in jboss?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic