Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

skumar mk

Greenhorn
+ Follow
since Jul 02, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 skumar mk

HI ALL,
We are also getting Same Exception while deploying my webservice in JBOSS4.2.2GA.Can any one help out about this problem

Thanks in Advance.
[ September 18, 2008: Message edited by: skumar mk ]
12 years ago
We implemeted a web project using struts and Hibernate.No wwe need to implement the menu bar for my appliaction.I heaed about struts menu bar
Can any body suggest the thier openion on implementing the menu with struts menu avilable.Also in my appliaction navigate from one page to other also in that navigation it is included some DB opertions for showing some data.
Plase suggest me on implementing the MENU

Thanks in advance
12 years ago
HI All,
I got a solution for this problem.
We implemented Shedular class which executes for sepecified time.The code in this class will have a DB interaction
[ August 27, 2008: Message edited by: skumar mk ]
12 years ago
Hi,

I have a web application running on the JBOSS 4.0 server and Database is MySQL5.0.
We are using MySQL Connection/J as driver template while configuring HIBERNATE3.1

It is running success but we left the application for idle (without doing any operations) it is giving following Exception. Both server and MySQL are running on the same machine.


[org.hibernate.util.JDBCExceptionReporter] could not execute query

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: recv failed

STACKTRACE:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)

** END NESTED EXCEPTION **


Last packet sent to the server was 454 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2586)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
2008-08-08 08:01:07,368 ERROR [org.hibernate.util.JDBCExceptionReporter] Communications link failure due to underlying exception:



Also I modified in the hibernate-config.xml file

Jbdc://mysql://localhost:3306/mydb?autoreconnect=true

Still am getting the same.

Please help me out.
12 years ago
Hi All,

In my struts based application am using Hibernate.We configured hibernate with MySql data base with JDBC Driver in hibernate-config.xml file.
If there any better perfomance if we configure hibernate with JNDI data source in the hibernate-config.xml file.Am using JBoss as a application server.
Can any one can suggest better way to hibernate configuration
How can I improve the performance of my appliaction


Thanks in advance.
12 years ago
Hai All,

Am facing a problem to retrive the values from the <html:chechbox>
Am using code like this:

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<html:html>
<body>
<html:form action="/log" method ="post">
<table width="500" border="0">
<tr>
<td>username :</td>
<td><html:text property="username" /></td>
</tr>
<tr>
<td>password : <br><br></td>
<td><html assword property="password" /><br><br></td>
</tr>
<tr>
<td><html:submit property="login" value="ADD"></td>
</tr>
</table>
<logic resent name="LIST_ELEMENTS" scope="request">

<logic:iterate id="myvalues" name="LIST_ELEMENTS">

<html:checkbox property="ck_values" >

<bean:write name="myvalues" />

</html:checkbox>

</logic:iterate>
</logic resent>

</html:form>

</body>
</html:html>


In the action class am setting the values ArrayList and storing it in the request scope

java.util.ArrayList list = new java.util.ArrayList();
list.add(vmarks);
list.add(vid);
request.setAttribute("LIST_ELEMENTS",list);

I need the values selected from the checkbox (vmarks,vid). when am using request.getString("ck_values") am getting ON then how can i retrive the slected values in my action class.


Please help me out.


Thanks in advance
12 years ago
Hi sai roy ,


If you are using DyanaActionForm then a code "INTITAL" in
struts-config.xml file
....
<form-property name="ascdesc2" type="java.lang.String" initial="asc"/>

...


so that radio button correrspanding to "asc" checked by default
12 years ago
Hi Merrill,

I did the same what you said still am getting the same ERROR.please help me out from pagination problem.



Thanks in advance.
12 years ago
Hi All,
Am using jsp pagination tags to display the no of employees in the jsp page.When the page loading initially it is displaying records correctly with specified nof records,also no of pages and all.But when am moving for next set of records am getting error because of NULL value for deptno.('deptno' comes from the previous page from request scope, from 2nd time onwards it is becoming NULL)
Please help out how can i make that deptno not to be null .
also is there any anthor approch for pagination

following jsp code am using for dispalying the employee records

<%@ page session="false" %>
<jsp irective.page import="java.util.List,com.emp.*"/>
<%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager"; prefix="pg" %>
<html:html>
<body bgcolor="#ffffff">
<%
int maxPageItems = 4;
%>
<form action="<%= request.getRequestURI() %>" method="post">
<pg ager
items="<%=siz %>"
maxPageItems="<%=maxPageItems %>"
isOffset="<%= true %>"
export="offset,currentPageNumber=pageNumber"
scope="request">
<pg aram name="maxPageItems"/>
<pg aram name="maxIndexPages"/>
<%-- save pager offset during form changes --%>
<input type="hidden" name="pager.offset" value="<%= offset %>">
<table width="90%" cellspacing="1" cellpadding="1" border="1">
<tr bgcolor="#6b97e7" style="color:white;font-weight:bold;font-size:12px;">
<td width="30%">Employee Id</td>
<td width="30%">Employee Name</td>
<td width="30%">Employee Salary</td>
</tr>
<%
Employee e=null;

String deptno=(String)request.getParameter("DepartNo")
//Code to retrive the emplyees based on DepartNo
//List li storing in List
siz=li.size();
for (int i = offset.intValue(),
l = Math.min(i +maxPageItems, li.size());
i < l; i++)
{
e=(Employee)li.get(i);
%>
<pg:item>
<tr>
<td><a href=""><%= e.getEmpId() %></a></td>
<td> <%= e.getEmpName() %></td>
<td> <%= e.getEmpSal() %></td>
</tr>
</pg:item>
<%} %>
</table>
<pg:index>
<jsp:include page="/WEB-INF/jsp/altavista.jsp" flush="true"/>
</pg:index>
</pg ager>
</body>
</html:html>
<%!
private static int siz=0;
%>
12 years ago
Hi All,

please explain me steps on
how to map static IP of the public server with domain name


Thanks in advance
12 years ago
Hi all,

I want to deploy my webapplication in public server so that it can be accessed outside my localnetwork.How to access my appliaction running in the server when user types the url
www.xyzcompany.com/MyProject so that he can able to run my applcation.
how can i route the www.xyzcompany.cm/MyProject to http://servername:8080/MyProject
Please can anybody give the steps to install it on the server
12 years ago
Hai All,
In my application am using Struts1.2.9.I have a form in that i have multiple buttons like save,continue,Cancel. For this am using DispatchAction class to handle sve & continue.but when i clicked Cancel am geting following ERROR.
Please help me out in how to handle cancel events in appliation where am using DispatchAction class


javax.servlet.ServletException
org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:211)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

root cause

org.apache.struts.action.InvalidCancelException
org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:942)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



Thanks in advance
skumar mk
12 years ago