Remove struts mapping messages from console

Posted on Updated on

You might be wandering that you have configured struts correctly but you still see some debug messages on the console related to struts config while starting any application server. Dont worry, struts is configured correctly. It is some other configurations that is displaying this message.  Read below to solve your issue.

It is due to some excessive code written in log4j configuration of your project. When the server runs, the debug message shown is something like below:

 

Convert string ‘/’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘/’ to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setInput(java.lang.String) with value / (class java.lang.String)
setProperty(ActionConfig[cancellable=false,path=null,validate=true,input=/,scope=session, parameter, methodName)
Target bean = ActionConfig[cancellable=false,path=null,validate=true,input=/,scope=session
Target name = parameter
Convert string ‘methodName’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘methodName’ to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setParameter(java.lang.String) with value methodName (class java.lang.String)
setProperty(ActionConfig[cancellable=false,path=null,validate=true,input=/,parameter=methodName,scope=session, scope, request)
Target bean = ActionConfig[cancellable=false,path=null,validate=true,input=/,parameter=methodName,scope=session
Target name = scope
Convert string ‘request’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘request’ to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setScope(java.lang.String) with value request (class java.lang.String)
setProperty(ActionConfig[cancellable=false,path=null,validate=true,input=/,parameter=methodName,scope=request, name, )
Target bean = ActionConfig[cancellable=false,path=null,validate=true,input=/,parameter=methodName,scope=request
Target name = name
Convert string ” to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ” to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setName(java.lang.String) with value (class java.lang.String)
setProperty(ActionConfig[cancellable=false,path=null,validate=true,input=/,name=,parameter=methodName,scope=request, path, /FetchMTRApprovedInfoAction)
Target bean = ActionConfig[cancellable=false,path=null,validate=true,input=/,name=,parameter=methodName,scope=request
Target name = path
Convert string ‘/FetchMTRApprovedInfoAction’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘/FetchMTRApprovedInfoAction’ to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ActionConfig.setPath(java.lang.String) with value /FetchMTRApprovedInfoAction (class java.lang.String)
Target bean = ActionConfig[cancellable=false,path=/FetchMTRApprovedInfoAction,validate=true,input=/,name=,parameter=methodName,scope=request
Target name = type
Fire begin() for SetNextRule[methodName=addActionConfig, paramType=org.apache.struts.config.ActionConfig]
ignorableWhitespace(
)
startElement(,forward,forward)
Pushing body text ”
New match=’struts-config/action-mappings/action/forward’
Fire begin() for FactoryCreateRule[className=null, attributeName=null, creationFactory=org.apache.struts.config.ActionForwardFactory@ba5c7a]
[FactoryCreateRule]{struts-config/action-mappings/action/forward} New org.apache.struts.action.ActionForward
Fire begin() for SetPropertiesRule[]
[SetPropertiesRule]{struts-config/action-mappings/action/forward} Setting property ‘name’ to ‘success’
[SetPropertiesRule]{struts-config/action-mappings/action/forward} Setting property ‘path’ to ‘/Pages/DoT/MicroTradeRegistration/ApprovedPage.jsp’
[SetPropertiesRule]{struts-config/action-mappings/action/forward} Set org.apache.struts.action.ActionForward properties
BeanUtils.populate(ForwardConfig[name=null,path=null,redirect=false,module=null,extends=null,catalog=null,command=null], {name=success, path=/Pages/DoT/MicroTradeRegistration/ApprovedPage.jsp})
setProperty(ForwardConfig[name=null,path=null,redirect=false,module=null,extends=null,catalog=null,command=null], name, success)
Target bean = ForwardConfig[name=null,path=null,redirect=false,module=null,extends=null,catalog=null,command=null]
Target name = name
Convert string ‘success’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘success’ to type ‘String’
setSimpleProperty: Invoking method public void org.apache.struts.config.ForwardConfig.setName(java.lang.String) with value success (class java.lang.String)
setProperty(ForwardConfig[name=success,path=null,redirect=false,module=null,extends=null,catalog=null,command=null], path, /Pages/DoT/MicroTradeRegistration/ApprovedPage.jsp)
Target bean = ForwardConfig[name=success,path=null,redirect=false,module=null,extends=null,catalog=null,command=null]
Target name = path
Convert string ‘/Pages/DoT/MicroTradeRegistration/ApprovedPage.jsp’ to class ‘java.lang.String’
Using converter ConverterFacade[StringConverter[UseDefault=true]]
Converting ‘String’ value ‘/Pages/DoT/MicroTradeRegistration/ApprovedPage.jsp’ to type ‘String’ Read the rest of this entry »

Snowfall 2014 in Thimphu

Posted on Updated on

The most awaited snowfall for the year 2014 was seen on 11th January. It was lucky for me as i bought a car on this day. Then i led my wife and 3 year old daughter to play on the snow.

Wife and Daughter 20140111_142959 20140111_143012 Read the rest of this entry »

Check and Uncheck all checkboxes using jquery

Posted on Updated on

There are some simple things to do in programming yet some developers find it tough. This is an example of checking all the checkboxes in a page using jquery. For this to work , you need jquery.js file included in your page.

This is the body part with all the checkboxes:

          <table>
<tr>
<td align=”left” colspan=”4″><input type=”checkbox”  class=”checkAll”></td>
</tr>
<tr>
<td> <input type=”checkbox” name=”myChkBox”  class=”selectedId” id=”myChkBox1″ /> </td>

<td> <input type=”checkbox” name=”myChkBox”  class=”selectedId”
id=”myChkBox2″ /> </td>
<td> <input type=”checkbox” name=”myChkBox”  class=”selectedId”
id=”myChkBox3″ /> </td>
<td> <input type=”checkbox” name=”myChkBox”  class=”selectedId”
id=”myChkBox4″ /> </td>
</tr>
</table>

Read the rest of this entry »

Resolving the issue of css and images not being loaded while redirecting with httpd.conf

Posted on Updated on

After successful virtual hosting and redirecting my application, the redirection worked but the stylesheet(css) and images did not get loaded. For virtual hosting  check my post on Virtual Hosting in windows using Apache 2.4.4.

Everything was mapped correctly but one entry was left out. Firstly, i had just added the following line:

ProxyPass  /myApp      http://localhost:8080/myApp/
ProxyPassReverse /myApp      http://localhost:8080/myApp/

With the above mapping it loads the root file(index.jsp) but does not load the css and images. So to load everything i added the following line:

ProxyPass /   http://localhost:8080/myApp/
ProxyPassReverse /      http://localhost:8080/myApp/

 

Read the rest of this entry »

Solving 403 Forbidden error during svn commit

Posted on

Every time i commit my code changes to svn i get the following error which was working before:

RA layer request failed
svn: Commit failed (details follow):
svn: CHECKOUT of ‘/svn/myapp/!svn/ver/379/Build/Source/myapp/WebContent/META-INF/context.xml’: 403 Forbidden (https://192.168.124.34)

This is how i solved it.
1. Open svn server manager.
2. Click on Repositories.
3. Right click on your application and click on properties.
4. You will see the list of user.
5. Click on the user you want to give permission and the select Read/Write permission.
6. Click Apply and ok.

Hope this helps.

Virtual Hosting in windows using Apache 2.4.4

Posted on Updated on

virtual-hosting file

Today i came across a situation where i had to do virtual hosting in windows with my application running in tomcat. After lots of try, i could come to a solution.

I had java application running in tomcat on port 8080. So the url was http://localhost:8080/myapplication. To host this application globally i needed to map this url to a global ip. Below are the steps how i achieved this:

1. Redirection of tomcat application is achievable using the Apache HTTP package. Firstly download the appropriate apache package from      http://httpd.apache.org/download.cgi.

Read the rest of this entry »