Ramesh kangamuthu

Ranch Hand
+ Follow
since Mar 13, 2007
Merit badge: grant badges
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramesh kangamuthu

Hello everybody,

JSP Chinese characters scrambled even in UTF-8 encoding set in my jsp pages.I use Struts2 framework.I set the encoding as follows.

<%@ page
import="java.util.List,com.coin.core.model.transaction.SalesImagesVO,com.coin.core.util.StringUtil" pageEncoding="UTF-8"

<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>

In my Struts2 action,I added the lines for each field to which i assign Chinese characters,they are

purchasevo.setProductName(new String(purchasevo.getProductName().getBytes("ISO-8859-1"),"UTF-8");

Even I set the encoding as above,It works temporarily till i trigger the next action and the chinese characters were

scrambled and appear in the jsp as peculiar characters.

How i can i get the same chinese characters when page control navigates from one page to another page.

Thanks for your suggestion.

Ramesh Kangamuthu

10 years ago
Hi everybody,

I have been working in a web application using Struts2 framework for chinese clients.for that we need to manipulate chinese characters in jsp pages as well as in reports.We use
Jasper reports and iReports report generation tool.

When taking report pdf, we could not get the display of chinese characters in any pdf version like 7,9 and adobe X.

I installed east asian font support using xp cd.even though i did it,chinese characters are not displayed.

What thing that i missed to get the display or is it possible in adobe pdf?

Thanks and regards,
Ramesh Kangamuthu

Hello all,

I have been doing a Struts2 project in one of forms i have main form and a pop-up window. Main jsp page has a form and the pop-up window has a form.

When I try to execute an action in the main page,it shows struts error.Even I closed the pop-up window,tried and is the same result.

Both of the forms have no target attribute set.

If I remove the pop-up functionality, I could submit the main page.but while having a pop-up along with main page could not submit.

Can you tell what the reason is that main page can not submit while pop-up was opened in the same main jsp page?

Thanks and Regards,
PKS Rammesh
10 years ago
hello everybody,

In my project, i need to get the client MAC address, who login to the system to ensure that the authorized users from authorized computers can only login to the system

i expect help from you

Thanks and regards,
Ramesh Kangamuthu
10 years ago
Hi all,

In my Struts2 application, I used Datetime picker, while entering fields of a form, focus need to be set when a user performs an action for date fields.

So, I need to set the focus using javascript in one or more date fields in the forms.

While setting focus to these date fields,it does not set the focus on the fields

this is the code fragment that i used in my application


<s:datetimepicker id="shipdate%{#statusB.index}"
theme="simple" value="%{#B.shipdate}" required="true"

java application code:-

public String salesShipment(){



<script type="text/javascript">

function focusNextField(focus,focusIndex){
//focusIndex is the index of a list element of the date field


the javascript fucntion is called as follows in sales.jsp

<body onload=focusNextField('<s:property value="focus"/>','<s:property value="focusIndex"/>')>

the above code had no effect on focusing the date field 'shipdate0' or 'shipdate1' and so on
10 years ago

In my current product application , I need to display more images for a product

i.e three images in a row, next three in a row and so on.

I designed the product images table in such a manner it gives multiple records for images for a product_id

select img_text,picture_name from product_images where product_id='product55'; - return multiple records

So I need to iterate them in detail band of report template (.jrxml file).

But I want to display them three in a row, next three in a row and so on, not one by one in a row.

I need your help

Thanks and regards,

Ramesh Kangamuthu

12 years ago
Hello Everybody,

I have been working in a Struts2 project, in which I need to get actual file name of the uploaded file and should be displayed even I submit the form. If I submit the form, the file name disappears in the file control. How could I keep the name of the uploaded file on
Struts 2 file tag in subsequent submits.


Ramesh Kangamthu
12 years ago
Dear All,

I have been working in a Swing application.In one of the forms I need to select a excel file in JFileChooser and copy it to JTextPane
with proper alignment. I could select it and append it to JTextPane, but with no proper alignment.

Also If I align the text copied from a excel file in JTextPane, I could not get what I have aligned manually in jasper report/ireport.

Why can't I get the JTextPane content aligned properly?


Ramesh Kangamuthu
12 years ago
Hello Burnham,

I used welcomepage as jsp file for the application. but it shows resource not found. I think that we need to set context path for the app like /applicationPath in tomcat server configuration. I want to set it on lnux OS.

Thanks and Regards,

Ramesh Kangamthu
12 years ago

In our client place, we installed tomcat 6.0 on linux OS and deployed our application in the path usr/share/tomcat-6.0.8/webapps. When we try to run the app like 'http://ipAddress:8080/appName' we got 404 resource not found error.

Can I know how to configure tomcat on linux and deploy web apps in it.

Thanks and Regards,

Ramesh Kangamuthu
12 years ago

I created the jar for my swing based application using Exe Generator software with the command line exe COINS-CMD.exe. Though I updated the jar inside the Exe Generator folder, It does not update but keep the old jar. What would be the problem? What are the java exe generator softwares available?
12 years ago
I know how to execute Struts2 action and I followed it this project. But I want to know whether Struts2 specifies an action in the url exactly after the context root , ie App name, or not.

Only for the first time it adds jsp/common after the action. For subsequent requests the url comes as /AppName/actionName

12 years ago
In my Struts2 action i invoked loginAction_check.action and it generates the

url - /myapp/jsp/common/loginAction_check.action .

but i need only /myapp/loginAction_check.action. I think that it prepends the result jsp file path /jsp/common to the url.

How can I remove /jsp/common after /myapp in the url?

12 years ago

In my Strut2 application I have to pass uservo.userId and uservo.password to AuthenticationInterceptor's intercept method.

UserVO is a model object that has userId and password properties.


<s:textfield theme="simple" name="uservo.userId" cssClass="LoginTextBox" size="20" />

<s:password theme="simple" name="uservo.password" cssClass="LoginTextBox" size="20" />

when the page is submitted, AuthenticationInterceptor will be invoked to do authentication for checking userId and password entered by the user.


public class AuthenticationInterceptor extends AbstractInterceptor implements SessionAware,RequestAware{

private UserVO uservo;
private String userId;

private String password

UserServices userServices=new UserServicesImpl();
Map<String,Object> session;
Map<String,Object> request;

public void setSession(Map session) {
this.session = session;
public void setRequest(Map request) {
this.request = request;

public String intercept(ActionInvocation invocation) throws Exception {
System.out.println("Inside AuthenticationInterceptor");
log.debug(" Inside AuthenticationInterceptor ");
ActionContext ctx = invocation.getInvocationContext();

session = ActionContext.getContext().getSession();

log.debug(" ActionContext ctx :"+ctx);
HttpServletRequest request = (HttpServletRequest)ctx.get(ServletActionContext.HTTP_REQUEST);
log.debug(" HttpServletRequest request :"+request);

String userIPAddress = request.getRemoteAddr();
String loginID = "anonymous";


if (authenticateCoinUser(request))
loginID = (String)session.get("userId");
if(loginID == null || loginID.trim().equals("")){
loginID = "anonymous";
log.debug("loginId and IP :"+loginID+" : "+userIPAddress);
if(userServices.enlistUserProfile(loginID, userIPAddress)){
return invocation.invoke();
throw new AuthenticationException("You are not authorised");
return null;

public boolean authenticateCoinUser(HttpServletRequest request){

System.out.println(" uservo >>"+uservo);
String userId=getUserId();
String password=getPassword();
System.out.println(" userId >>"+userId);
System.out.println(" password >>"+password);

return false;

public UserVO getUservo() {
return uservo;

public void setUservo(UserVO uservo) {
this.uservo = uservo;

public String getUserId() {
return userId;

public void setUserId(String userId) {
this.userId = userId;

I could not get the uservo.userId and uservo.password input values from index.jsp to the interceptor even i implement RequestAware.

uservo object throws NullPointerException.

Could anybody tell the answer?

12 years ago
Hi all,

I need to copy a part of database with data and another part of a database without data to a new database to my localhost.

for that I tried the 'mysqldump' command as directed by sites, where i got the information. But I did not get the result.

1. Is it possible to write a single 'mysqldump' option to copy some tables with data and some tables without data of a database to
another new database.?

I need it urgently. Can you share your ideas.


Ramesh Kangamuthu