Ticketing management / support desk management with struts, spring and hibernate

Here are the screenshots I promised in my earlier post.

image

Report of the tickets-more filters to be added

image

Details of a ticket and the provision to add the follow-ups if any.

image

Historic report of the followups for the selected ticket.

image

Screen to add a ticket

Delivery 1 is completed yesterday. Lets wait for next release for more features.. Stat tuned!

ஜெய்ஹிந்த்
Posted from WordPress for Android

Advertisements

Ticketing management on SDLC with struts, spring and hibernate

Here are tge screenshots I promised in my earlier post.

image

Report of the tickets-more filters to be added

image

Details of a ticket and the provision to add the follow-ups if any.

image

Historic report of the followups for the selected ticket.

image

Screen to add a ticket

Delivery 1 is completes yesterday. Lets wait for next release for more features.. Stat tuned!

ஜெய்ஹிந்த்
Posted from WordPress for Android

Exception starting filter struts2

This is an annoying exception I got today when I moved the war file to production. The application failed to start. WRT http://struts.1045723.n5.nabble.com/2-0-14-gt-2-1-6-filter-config-issue-td3490585.html I set the devmode to false in struts.xml, which resolved the issue!

SEVERE: Exception starting filter struts2
 java.lang.NullPointerException
 at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)
 at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)
 at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)
 at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)
 at org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:295)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4001)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4651)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)
 at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:525)
 at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1359)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
 at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown Source)
 at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)
 at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1500)
 at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:252)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:563)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Unknown Source)

Sitemesh + Struts 2 – Tutorial

I am planning to replace Tiles with Sitemesh layout for jEDP. I was searching for a good start-up tutorial. I found one, which is incomplete!! Probably I will have this post as a ‘HOWTO’, will write about the differences between Sitemesh and Tiles in my next entry.

Steps to be followed 1 2 & 3

#1 Add site mesh library to your web application

#2 Add Sitemesh config to webapp

  • Make the following entries to web.xml. Remember, we are adding  ActionContextCleanUp also. I have given the entries for Struts2 plugin as well for better understanding of the position of filter and mapping tags.
<filter>
	<filter-name>struts-cleanup</filter-name>
	<filter-class>org.apache.struts2.dispatcher.ActionContextCleanUp</filter-class>
</filter>
<filter>
	<filter-name>sitemesh</filter-name>
	<filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
</filter>
<filter>
	<filter-name>struts2</filter-name>
	<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
	<filter-name>struts-cleanup</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
	<filter-name>sitemesh</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
	<filter-name>struts2</filter-name>
	<url-pattern>/*</url-pattern>
</filter-mapping>

#3 Create Decorators

  • This is too early to know about decorators. I will write it in my next post. So, just add a decorator.xml in your WEB-INF folder
<?xml version="1.0" encoding="UTF-8"?>
<decorators defaultdir="/decorators">
	<decorator name="main" page="layout.jsp">
		<pattern>/*</pattern>
	</decorator>
	<decorator name="panel" page="panel.jsp">
	</decorator>
</decorators>

This declares a master layout file layout.jsp

#4 Create files

/layout.jsp

<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="pages" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>SiteMesh Layout - <decorator:title default="Welcome"></decorator:title> </title>
<decorator:head/>
</head>
<body>
<table>
<tr>
<td colspan="3" bgcolor="#FFFF00"><pages:applyDecorator page="/paneldata.html" name="panel" title="header"></pages:applyDecorator></td>
</tr>
<tr>
<td><pages:applyDecorator page="/paneldata.html" name="panel" title="left panel"></pages:applyDecorator></td>
<td><decorator:body/></td>
<td><pages:applyDecorator page="/paneldata.html" name="panel" title="right panel"></pages:applyDecorator></td>
</tr>
<tr><td></td></tr>
</table>
</body>
</html>

/panel.jsp

<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator" %>
<decorator:title default="panel title"></decorator:title>
<decorator:body/>
Panel Content Goes here

/paneldata.html

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
Panel data goes here.
</body>
</html>

Now start the webapp. Try to acess your home page. Here is mine!

Expression eKey is undefined on line 71, column 63 in template/simple/fielderror.ftl

This is one nasty exception occured due to carelessness.  I have added one field error in my action.

super.addFieldError("userName", "User name is null");

Instead of the field name “userName”, I have given the variable itself 🙂

super.addFieldError(userName, "User name is null");

Replacing this removed this error.

10:40:24,859        ERROR runtime:96 -
Expression eKey is undefined on line 71, column 63 in template/simple/fielderror.ftl.
The problematic instruction:
----------
==> assignment: eValue=fieldErrors[eKey] [on line 71, column 33 in template/simple/fielderror.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression eKey is undefined on line 71, column 63 in template/simple/fielderror.ftl.
 at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
 at freemarker.core.DynamicKeyName._getAsTemplateModel(DynamicKeyName.java:85)
 at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
 at freemarker.core.Assignment.accept(Assignment.java:90)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
 at freemarker.core.Environment.visit(Environment.java:415)
 at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.IfBlock.accept(IfBlock.java:82)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.Environment.process(Environment.java:188)
 at freemarker.template.Template.process(Template.java:237)
 at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:182)
 at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
 at org.apache.struts2.components.UIBean.end(UIBean.java:513)
 at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
 at org.apache.jsp.index_jsp._jspx_meth_s_005ffielderror_005f0(index_jsp.java:193)
 at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:132)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:78)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
 at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
 at com.eginnovations.common.interceptor.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:42)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
 at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
 at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Unknown Source)
May 12, 2010 10:40:24 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
Expression eKey is undefined on line 71, column 63 in template/simple/fielderror.ftl.
The problematic instruction:
----------
==> assignment: eValue=fieldErrors[eKey] [on line 71, column 33 in template/simple/fielderror.ftl]
----------
Java backtrace for programmers:
----------
freemarker.core.InvalidReferenceException: Expression eKey is undefined on line 71, column 63 in template/simple/fielderror.ftl.
 at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
 at freemarker.core.DynamicKeyName._getAsTemplateModel(DynamicKeyName.java:85)
 at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
 at freemarker.core.Assignment.accept(Assignment.java:90)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
 at freemarker.core.Environment.visit(Environment.java:415)
 at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.IfBlock.accept(IfBlock.java:82)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.MixedContent.accept(MixedContent.java:92)
 at freemarker.core.Environment.visit(Environment.java:208)
 at freemarker.core.Environment.process(Environment.java:188)
 at freemarker.template.Template.process(Template.java:237)
 at org.apache.struts2.components.template.FreemarkerTemplateEngine.renderTemplate(FreemarkerTemplateEngine.java:182)
 at org.apache.struts2.components.UIBean.mergeTemplate(UIBean.java:559)
 at org.apache.struts2.components.UIBean.end(UIBean.java:513)
 at org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42)
 at org.apache.jsp.index_jsp._jspx_meth_s_005ffielderror_005f0(index_jsp.java:193)
 at org.apache.jsp.index_jsp._jspx_meth_s_005fform_005f0(index_jsp.java:132)
 at org.apache.jsp.index_jsp._jspService(index_jsp.java:78)
 at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
 at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
 at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
 at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
 at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
 at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
 at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154)
 at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
 at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265)
 at com.eginnovations.common.interceptor.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:42)
 at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236)
 at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
 at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:468)
 at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)
 at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:76)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
 at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
 at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
 at java.lang.Thread.run(Unknown Source)

problem with multiple tiles configuration files

This is an interesting problem for this newbie. I have one common tiles configuration file tiles.xml. I decided to split it into pieces based on modules. The syntax allows me to do it. the web.xml entry changed from

<context-param>
 <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
 <param-value>/WEB-INF/tiles.xml</param-value>
 </context-param>

to

<context-param>
 <param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
 <param-value>/WEB-INF/tiles-license.xml,/WEB-INF/tiles-common.xml</param-value>
 </context-param>

Fortunately/Unfortunately, I declared all my basic templates in tiles-common.xml which is reused by tiles-license.xml. Pathetic. I ended up with annoying exception

org.apache.tiles.definition.NoSuchDefinitionException: licenseExpiryList
    org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:578)
    org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
    org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
    org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)

We need to specify the tiles config files in ‘correct’ order. base definitions at first, children at the last.

Ref: http://old.nabble.com/How-can-I-separate-tiles.xml-in-several-files—td13216254.html

org.apache.tiles.definition.NoSuchDefinitionException: licenseExpiryList
	org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:578)
	org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:246)
	org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
	org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)

Passing Struts values to Javascript

yureka

This another day to get into struts. See, I have an input type as image and onclick function.

<input type=”image” name=”” src=”/teller/images/close.gif” onclick=”del(200);”>

The 200 given as parameter should be passed from struts form bean. Different type of combinations lead to error. finally defining a variable helped as follows.

<bean:define id=”myID” name=”resultI” property=”id”></bean:define>

<html:image src=”/teller/images/close.gif”  onclick=”<%=”del(“+myID+”);” %>”></html:image>