Srinivasa Rao Ammina

Greenhorn
+ Follow
since Jan 24, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Srinivasa Rao Ammina

This is the error generated. As per the logs it is error generation started at ReplyHeaderFilter.

HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


root cause

java.lang.IllegalArgumentException: No bean specified
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

8 years ago
Dear Shankar Tanikella,

Thank you for the brief email and explanation on the issue.

Here the security concern is we should not display the Odd UI messages and we need to redirect to the respective error page.

I tried with the global exception but unable to forward the pages to custom exception jsp page.

We are using struts 1.2.

Thanks
Srinivasa
8 years ago
Since the parameter names are not fixed. So how to validate the same? why because they can manipulate the paramter name to any name so how to proceed?

Do you have any code snippet to validate the same?
8 years ago
Hi

we are having one web application developed using spring and deployed in jboss application server. And every thing working fine and recently security team team has done audit and found some of the issues.

Here the issue is they formed the URL as and tested and it is working fine.

http://localhost:9001/PPMWeb/doLoginAction.to?username=appscanPC&password=PPMUSER&button=LOGIN&operation=Login&logoutFlg=

But they manipulated the URL as

http://localhost:9001/PPMWeb/doLoginAction.to?username=appscanPC&password=PPMUSER&button=LOGIN&operation=Login&logoutFlg.=

here instead of parameter name logoutFlg (which is a hidden variable in jsp and defined in form bean) they manipulated as logoutFlg. (given one dot at the end) and tried accessing the URL then it is giving the exception

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.tcs.telecom.ppm.filter.SessionIdFilter.doFilter(SessionIdFilter.java:73)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


root cause

java.lang.IllegalArgumentException: No bean specified
org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
com.tcs.telecom.ppm.filter.SessionIdFilter.doFilter(SessionIdFilter.java:73)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)


So would like to know how to handle such manipulation issues and redirect to the user defined page? where exactly I need to handle? We somehow handled this error in one of the customized filter but the issue here if we put the code the images in the pages are not getting loaded properly.

Could you please help us in handling such issues?


8 years ago
Here the issue is in Firefox this component behaves correcty that means in the text field of the file upload component we are unable to manually input the file name.
But the case is not the same with IE means user can type what ever file name he wants whether it actually exists or not because of this during that it is giving exceptions.
So I want to make the file upload components text box as read only so that user doesn;t tamper the file names.
8 years ago
Hi we are using <html:file> - file upload component of struts. And the text box associated with this component manually allowing the input from the user in IE browser but in Firefox it is not happening
So how to make a read only text box for this component?
8 years ago
Hi

Got the solution

The following lines in the jsp pags causes the issues

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

If we remove these line it is working fine.

Thanks
Srini
8 years ago
Hi

Got the solution

The following lines in the jsp pags causes the issues

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

If we remove these line it is working fine.

Thank for all your support on this.
8 years ago
hi we are using struts 1.2 version .
8 years ago
Hi jainitya,

Tried with that option also but no luck. Here the issue is, in the jsp's it is showing the correct values either in english or in frensh but after submitting the form internally
it is checking the method name and there is is interpretting diffrently.

For more info you can check the posting of the issue @

https://coderanch.com/t/565389/Struts/Internationalization-special-French-characters

Srini
8 years ago
Make a note that Application is working fine in english language and only issue is with the french language.

Please find code in all the components

1. JSP

<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<html:form method="post" action="CouponDepositTypeMenu" >

<head>
<title>Menu</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"">
<link href="<%=contextRoot%>/webapp/css/style.css" rel="stylesheet" type="text/css">
<link href="<%=contextRoot%>/webapp/css/tablestyle.css" rel="stylesheet" type="text/css">
</head>


<td id="approve"><html:submit property="button" styleClass="ppm_btn" style="width:180px" styleId="hsia">
<bean:message key="login.hnipendingforApprove"/>
</html:submit></td>

<td id="approve"><html:submit property="button" styleClass="ppm_btn" style="width:180px" styleId="hsia">
<bean:message key="login.hniRejectedFromCBG"/>
</html:submit></td>

</html:form>


Note: here we are not using any hidden variables.


2.

public class CouponDepositTypeMenuAction extends PPMLookupDispatchAction
{

public ActionForward hnipendingforApprove(ActionMapping mapping,
ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {

final String STR_CLASS_NAME = "CouponDepositTypeMenuAction";
final String STR_METHOD_NAME = "hnipendingforApprove";
String strSeqId = "";
String forwardName = "hniPending";//by harsha on 9 may 2011
System.out.println("enetered into approve action");

HttpSession session = request.getSession();

LoginForm loginForm = (LoginForm) session.getAttribute("LoginForm");
String username = loginForm.getUsername();
System.out.println("user name -->" + username);

if(null != session.getAttribute("reqidlist")){
session.removeAttribute("reqidlist");
}
String button=(String)request.getParameter("button");
//System.out.println("which button::::::::::::::::naveen"+button);
String strBU = (String)session.getAttribute("strBU");
int roleId = DBAccess.getRoleId(username);
HniConfigForm ebswlformObj = new HniConfigForm();
List reqIdList = null;
List bpIdList = new ArrayList();
int Status=0;
if(roleId == 13){

if("Pending For ReqID Approval".equals(button)){
//System.out.println("33333333"+Status);
Status=3;
}
else if("Pending For UAT".equals(button)){
//System.out.println("55555555"+Status);
Status=5;
}else if("Pending For Production".equals(button)){
//System.out.println("777777777777"+Status);
Status=7;
forwardName="hniPendingProd";// by harsha on 9 may 2011
}// AUTO COCC12075 start
else if("Tarid-ReqId Release".equals(button)){
System.out.println("----->TARID<-------->REQID<-------"+Status);
Status=11;
forwardName="hniPendingProd";
}// AUTO COCC12075 end


reqIdList = HniEntityReleaseBusiness.getHniReqIdListForCbd(roleId,Status);
}else if(roleId == 120){
if("Pending For ReqID Approval".equals(button)){
//System.out.println("33333333"+Status);
Status=2;
}
else if("Pending For UAT".equals(button)){
//System.out.println("55555555"+Status);
Status=6;
}
reqIdList = HniEntityReleaseBusiness.getHniReqIdListForCbd(roleId,Status);
}
else
{
reqIdList = HniEntityReleaseBusiness.getHniReqIdList(roleId,strBU);
}

ebswlformObj.setReqIdList(reqIdList);
ebswlformObj.setBpIdList(bpIdList);
ebswlformObj.setStrUserName(username);
ebswlformObj.setStrRoleId(loginForm.getRoleid());
session.setAttribute("reqidlist", reqIdList);
session.setAttribute("bpIdList", bpIdList);
session.setAttribute("HniConfigForm", ebswlformObj);
return mapping.findForward(forwardName);
}





protected Map getKeyMethodMap(){
Map map = new HashMap();
map.put("deposit.button.couponDepositType","depsoitType");
map.put("deposit.button.PostPaid","postPaid");
map.put("deposit.button.couponPackageHeader","packageType");
map.put("rules.button.ppmrules","rules");
map.put("login.userManager","userManager");
map.put("login.field","fieldSales");
map.put("login.urs","urs");
map.put("login.brs","brs");
map.put("login.postpaid","postpaid");
map.put("button.ChangePassword","ChangePassword");
map.put("login.EBSWireline","EBSWireline");
map.put("login.hniebswl","HniEbsWLine");
map.put("login.hniebsws","HniEbsWLess");
map.put("login.approve","approve");
map.put("login.reinstate","reinstate");
map.put("login.reports","reports");
map.put("login.outputreports","outputreports");
map.put("login.draftdata","draftdata");
map.put("login.hniebsvdata","hniebsvdata");
map.put("login.hsia","hsia");
map.put("login.advancedreports","advancedreports");//COCC11278
map.put("button.Offerability","Offerability");//COFI11391

map.put("login.hniwl","HniWLine");
map.put("login.hniws","HniWLess");
map.put("login.hnivdata","hniVdata");
map.put("login.hnihsia","hniHsia");

map.put("hni.upload","uploadDocument");
map.put("login.hniConfScreen","hniConfScreen");
map.put("login.hnipendingforApprove","hnipendingforApprove");


map.put("login.hniReqIDforApprove","hnipendingforApprove");
// ADDED BY RAMARAO FOR HNI

map.put("login.hniRejectedFromCBG","hniRejectedListFromCBG");
map.put("login.hniUATRejectedFromCBG","hniRejectedListFromCBG");
// ADDED BY NAVEEN FOR HNI CONFIGURATION
map.put("login.hniReqIDforConfiguration", "hniPendingForConfiguration");

// ADDED BY NAVEEN 7-3-2011

map.put("login.hniReqIDforApproveUAT","hnipendingforApprove");
map.put("login.hniReqIDforApprovePROD","hnipendingforApprove");
map.put("login.pendingtaridReqIdList","hnipendingforApprove");
map.put("login.pendingtaridList","getPendingTarID");

return map;
}
}|


3.

public class PPMRequestProcessor extends org.apache.struts.tiles.TilesRequestProcessor
{
private static final String className="PPMRequestProcessor";
protected ActionForward
processActionPerform(HttpServletRequest request,
HttpServletResponse response,
Action action,
ActionForm form,
ActionMapping mapping)
throws IOException, ServletException
{
String methodName="processActionPerform";
try
{
LogTracer.writeTracerLog(className, methodName, "Start:::");
long start = System.currentTimeMillis();
ActionForward forward = super.processActionPerform( request, response,action,form,mapping);
long end = System.currentTimeMillis();
LogTracer.writeTracerLog(className, methodName, "Action Path:::"+mapping.getPath());
LogTracer.writeTracerLog(className, methodName, "Action Class:::"+action.getClass().getName());
LogTracer.writeTracerLog(className, methodName, "Action MethodName:"+request.getAttribute("getMethodName"));
LogTracer.writeTracerLog(className, methodName, "Action Input Page:::"+mapping.getInput());
if(forward != null)
{
LogTracer.writeTracerLog(className, methodName, "Forward Path:::"+forward.getName());
LogTracer.writeTracerLog(className, methodName, "Forward JSP Name:::"+forward.getPath());
}
else
{
processException(request, response,new Exception("Unable to find forward JSP"), form, mapping);
}
LogTracer.writeTracerLog(className, methodName, "End:::Time taken for Action::::"+((end-start)/60)+"ms");

return forward;
} catch (Exception e) {
return (processException(request, response,e, form, mapping));
}

}
protected ActionForward processException(HttpServletRequest request,
HttpServletResponse response, Exception exception, ActionForm form,
ActionMapping mapping) throws IOException, ServletException {

String methodName = "processException";
try
{
LogTracer.writeTracerLog(className, methodName, "Exception Path:::"+mapping.getPath());
LogTracer.writeTracerLog(className, methodName, "exception.getMessage()::::::::"+exception.getMessage());
ActionForward forward = super.processException(request, response, exception, form, mapping);

forward.setName("exception");
forward.setPath("/webapp/pages/exception.jsp"+exception.getMessage());
return forward;
} catch (Exception e) {
ActionForward forward = new ActionForward();
forward.setName("exception");
forward.setPath("/webapp/pages/exception.jsp?msg="+e.getMessage());
return forward;
}
}

public static void main(String[] args)
{
long l = System.currentTimeMillis();
System.out.println("s");
String s = "";
for (int i = 0; i < 10000; i++)
{
int k=i;
s = s+"ramu";
}
long e = System.currentTimeMillis();
System.out.println("End:::Time taken for Action::::"+((e-l)/60));
}
}

4.

public class PPMLookupDispatchAction extends LookupDispatchAction{

private static final String className = "PPMLookupDispatchAction";

protected Map getKeyMethodMap()
{
String methodName = "getKeyMethodMap";

return null;
}
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception
{
String methodName = "execute";
//LogTracer.writeTracerLog(className, methodName, "***ACTION PATH::::"+mapping.getPath());
//LogTracer.writeTracerLog(className, methodName, "***ACTION PATH::::"+mapping.getType());

return super.execute( mapping, form, request, response);
}
protected String getMethodName(ActionMapping mapping,ActionForm form,HttpServletRequest request,HttpServletResponse response, String parameter)
throws Exception
{
String methodName = "getMethodName";
response.setContentType("charset=UTF-8");
System.out.println("request.contentType : " + request.getContentType() );
String name = super.getMethodName(mapping,form,request,response, parameter);
LogTracer.writeTracerLog(className, methodName, "**********ACTION METHOD NAME::::"+name);
request.setAttribute("getMethodName", name);
return name;
}

}



5.
struts-config.xml setting



<controller processorClass="com.tcs.telecom.struts.action.PPMRequestProcessor"/>

<action path="/CouponDepositTypeMenu" parameter="button" scope="session" type="com.tcs.telecom.ppm.actions.CouponDepositTypeMenuAction" name="packageDepositMenuForm" input="/webapp/pages/coupon.jsp">
<forward name="deposit" path="/webapp/pages/couponDepositType.jsp" />
<forward name="package" path="/webapp/pages/couponPackageDetails.jsp"/>
<forward name="postpaid" path="/webapp/pages/cr.jsp" />
<forward name="rules" path="/webapp/pages/Rule.jsp" />
<forward name="returntomenu" path="/webapp/pages/Menu.jsp"/>
<forward name="usermanagement" path="/webapp/pages/UserManagement.jsp"/>
<forward name="salesmain" path="/webapp/pages/salesmain.jsp"/>
<forward name="brsmain" path="/webapp/pages/brsmain.jsp"/>
<forward name="changePassword" path="/webapp/pages/ChangePassword.jsp"/>
<forward name="approveURS" path="/webapp/pages/ApproveURS.jsp"/>
<forward name="hniebsws" path="/webapp/pages/hniEbsWS.jsp"/>
<forward name="hniebswl" path="/webapp/pages/hniEbsWL.jsp"/>
<forward name="approve" path="/webapp/pages/approve.jsp"/>
<forward name="reports" path="/webapp/pages/reports.jsp"/>
<forward name="outputreports" path="/webapp/pages/OutputReports.jsp"/>
<forward name="reinstate" path="/webapp/pages/ReInstate.jsp"/>
<forward name="hniebsvdata" path="/webapp/pages/hniEbsVdata.jsp"/>
<forward name="advancedreports" path="/webapp/pages/advancedreports.jsp"/>

<forward name="hniebshsia" path="/webapp/pages/hniEbsHsia.jsp"/>
<forward name="draftdata" path="/webapp/pages/Draftinfo.jsp"/>
<forward name="nodraftdetails" path="/webapp/pages/Nodraftinfo.jsp"/>
<forward name="offerability" path="/webapp/pages/segmentation.jsp"/>
<forward name="hnivdata" path="/webapp/pages/hniVdata.jsp"/>
<forward name="hnihsia" path="/webapp/pages/hniHsia.jsp"/>
<forward name="hniws" path="/webapp/pages/hniWS.jsp"/>
<forward name="hniwl" path="/webapp/pages/hniWL.jsp"/>

<forward name="uploadDocument" path="/webapp/pages/uploadDocument.jsp"/>
<forward name="newMenu" path="/webapp/pages/newMenu.jsp"/>
<forward name="hniPending" path="/webapp/pages/hnipendingforapprove.jsp"/>
<!-- added by ramarao for HNI on 26Nov2010 -->
<forward name="hniReject" path="/webapp/pages/hniReject/hniRejectedListforapprove.jsp"/>
<!-- added by naveen -->
<forward name="hniConfigure" path="/webapp/pages/hniPPMpackages/hniRejectedListforConfigure.jsp"/>
<forward name="pendingTarid" path="/webapp/pages/hniPendingTarIDList.jsp"/>

<!-- end -->
<forward name="newMenuGSM" path="/webapp/pages/newMenuGSM.jsp"/>
<!-- added by harsha for HNI on 09May2011 -->
<forward name="hniPendingProd" path="/webapp/pages/hnipendingforprod.jsp"/>
</action>


<form-bean name="packageDepositMenuForm" type="com.tcs.telecom.ppm.form.CouponDepositMenuForm"/>


Here we are getting the exception in

PPMLookupDispatchAction.java @

String name = super.getMethodName(mapping,form,request,response, parameter); line

Actual exception is:

Action[/CouponDepositTypeMenu] missing resource 'En attendant Préparation Pour la BRS' in key method map

Please let us know do you need any other information.
8 years ago
Hi jainitya,

Thank you for the confirmation. Then there is some issue with my code. We will check the same.
Thanks again for the help.

Srini
8 years ago
Good. I am also facing similar kind of issues. Could you please check and let us know do you have any idea about this.

In the french related property file of yours could you please add this \u00e8 at the end of global.submit property ? basically this related a character in french (é)

And click on the submit button and check whether application is loggin correctly or not?

Since if the property files contains the special charters like (é) it is throwing missing resource '<key value'> in key method map

Could you please check this once from u'r end and let us know about this. Since we are not using struts2.0 version

Thanks
8 years ago
Thanks for the alternative solution provided. But the application is very huge and having lot of Form, Action beans. So this solution would affect a lot w.r.t to code perspective.
Will there be any alternate solution to handle this issue? Why because if another language is not supporting some other characters we need to handle such cases also.
So if there is any generic solution to handle all the cases it would be good.
8 years ago
We are having a web application and running in IE7 browser and user tries to login in one tab and later he tries to login with different user in different tab then same session is being referenced in both the tabs
for different users. Same is the case with the Firefox also so How to fix this issues?
8 years ago
JSP