Arjun Palanichamy

Ranch Hand
+ Follow
since Jul 15, 2006
Merit badge: grant badges
For More
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 Arjun Palanichamy

Hi Firends,

I want to print the some output to PDF from XSLT+ XML,

example:

Line Text 1
Line text 2
Line text 3
*END*
Line text 7
Line text 8
Line text 10
Line text 12
*END*

above formate print the output on PDF, i should print only below text only. when find the *END* in first time then for loop terminate the remaining text.

Line Text 1
Line text 2
Line text 3
*END*


advance thanks to all friends.

thanks,
Arjun.
11 years ago
hi Friends..

I try to coding for my portlet application use liferay + JSP , in this code jsp form loading two times .. so i will get two timew my form display
i attached screen shot for your reference .

any one can help solve this issue... i will getting this issue in long time....


This is my JSP soure code...

**************************************************************

<liferay-ui:tabs names="" refresh="<%= false %>">
<liferay-ui:section>
<div id="<portlet:namespace />block1">
<form name="<portlet:namespace />EdcsForm" method="POST"
action="<portlet:actionURL/>">
<table>
<tr>
<td >Search Keyword</td>
<td ><input type="text" name="keyword" /></td>
</tr>
<tr>
<td >Search By</td>
<td ><select name="searchBy">
<option value="">Select Option</option>
<option value="DOCNO">EDCS Doc No</option>
<option value="FILENAME">EDCS File name</option>
<option value="TITLE">EDCS Title</option>
<option value="USERID">Author user ID</option>
<option value="CONTENT">EDCS Content</option>
<option value="DOCTYPE">Document type</option>
</select></td>
</tr>
<tr>
<td ></td>
<td ><input type="submit" name="Submit"
value="Start Search" /></td>
</tr>
<tr>
<td ></td>
<td ></td>
</tr>
</table>
</form>
<%

String jspDisplay = (String)renderRequest.getAttribute("jspDisplay");

if(jspDisplay=="yes")
{
List<Map<String, Object>> edcsList =(List<Map><String, Object>>)renderRequest.getAttribute("edcsList");

%>
<table border="0" id="results" >

...............................................................................................................................................................


Search Results : <%=edcsList.size()%> Records founds.



<%System.out.println("***************>>>> "+edcsList.size());%>

<%
int j=0,k=0;
int re = edcsList.size();
for (Map<String, Object> index : edcsList) {
// for (int i=0;i<edcsList.size();i++) {
k=++j;
System.out.println(" ----- "+k);

// System.out.println("*********" +edcsList.size());

%>

<tr>
<td>
<%String str =(String) index.get("documentLocation");%> <%=k%>.  <a <br /> ><%=index.get("documentTitle") %>

    Doc No:<%=index.get("documentNo") %>Format:<%=index.get("fileFormat")%>
Size:<%=index.get("fileSize") %> Add to
favorites
</td>
</tr>

<%}%>
<% if(re == k) break; %>
<%} %>

</table>
<div align="right" id="pageNavPosition"></div>
<script type="text/javascript">
var pager = new Pager('results', 10);
pager.init();
pager.showPageNav('pager', 'pageNavPosition');
pager.showPage(1);
</script>


</div>
</liferay-ui:section>
</liferay-ui:tabs>

******************************************************
what is i am wrong with here... any one can let me...

thanks
arjun




14 years ago
Hi Jeff Handa

thank you so much...

by
arjun
14 years ago
Hi friends..

I try to develop the liferay portlet, i used for that PortletURL portletURL = RenderRequest.createRenderURL(); code line in my portlet code , but this interface method getting error.

my source code here...



<%@page import="com.liferay.portal.kernel.util.ParamUtil"%>
<%@page import="javax.portlet.PortletURL"%>
<%@page import="javax.portlet.WindowState"%>
<%@page import="javax.portlet.RenderResponse"%>
<%@page import="javax.portlet.RenderRequest"%>


<%
String tabs1 = ParamUtil.getString(request, "tabs1", "CODC1 one");

PortletURL url = null;

PortletURL portletURL = RenderRequest.createRenderURL();

portletURL.setWindowState(WindowState.NORMAL);

portletURL.setParameter("struts_action", "/edcs/search/search_reports");
portletURL.setParameter("tabs1", tabs1);

String tabNames = "CODC1 one ,CODC2 Two,CODC3 Three";

%>

<liferay-ui:tabs
names="<%= tabNames %>"
url="<%= portletURL.toString() %>"

/>



can you help me any one ... what is the exact import class for This interface method (createRenderURL()) .... ?

thanks
arjun

14 years ago
Hi Friedns ...

Please any can share the Liferay SVN server user name and Password for this svn://svn.liferay.com/repos/public ..i need very urgent ...

thanks
arjun
14 years ago
hi friends..

i used Eclipse 3.4 version IDE for this development, after build my porlet create the war file and upload the sandbox server ...same settings also in sandbox have liferay 5.2.4 and tomcat 6.0.18 version configured... i try access the portlet getting this error...

thanks
arjun
14 years ago
Hi Friends...

I am working with java + liferay 5.2.4 version, i created a portlet and deployed tomcat server , Portlet Accessing time getting following ERROR ! An error occurred while accessing the requested resource". please any one have idea about this error ....can you reply to me.

thanks in advance.
Arjun
14 years ago
hi friends...

I am a new for Liferay portlet creation, so any one can tell me how to configure the liferay and eclipse surf IDE , let me waht are all the steps i can follow that... give me any refrence link....

any link for solve this issue...


thanks

arjun
chennai
14 years ago
Hi..

I got Servlet 500 exception i am paste the my servlet exception for your reply.

************************

500 Servlet Exception

Note: sun.tools.javac.Main has been deprecated.
/home/money41/public_html/2sell-cars/WEB-INF/classes/org/apache/struts/action/ActionServlet.java:35:
Class org.apache.commons.digester.Digester not found in import.
import org.apache.commons.digester.Digester;
^
/home/money41/public_html/2sell-cars/WEB-INF/classes/org/apache/struts/action/ActionServlet.java:36:
Class org.apache.commons.digester.RuleSet not found in import.
import org.apache.commons.digester.RuleSet;
^
2 errors, 1 warning

***********************

Please any one can help solve his problem.

Advanced Thanks.
Arjun
15 years ago
Hi..

I have a html form, that have some selection option,radio button and all.

default first column radio button enabled other column disabled, now i want the select the radio button to be enabled,

here my code.

<tr bgcolor="#DEEDF4"><td align="center">
<input type="radio" name="bname_rad" id="bname1" on click="toggle(true)" value="LeaderBoard"></td>

<td align="center" class="style5Tx">Leaderboard</span>
<input type="hidden" name="bname" id="b1" value="LeaderBoard"></td>

<td align="center" class="style5Tn">20 $
<input type="hidden" name="adcost1" id="adcost1" value="20"></span></td>

<td align="center" ><span style="font-size:13px;font-family:">
<select disabled="disabled" id="no_imp1" name="imp1" size="1" onchange="cal_total(this);" class="style5To">
<option value="1000" selected="selected">1,000</option>
<option value="2000">2,000</option>
<option value="5000">5,000</option>
<option value="10000">10,000</option>
<option value="15000">15,000</option>
<option value="20000">20,000</option>
<option value="25000">25,000</option>
<option value="30000">30,000</option>
<option value="40000">40,000</option>
<option value="50000">50,000</option>
</select> <input type="hidden" value="tot" name="total"></td>

<td align="center" class="style5Tn"><span id="tot"><b>20</b></span><span style="color:red;"> $</span></b></td>

<td class="style5Tn" align="center">

<input disabled="disabled" type="radio" name="paymode" id="p11" value="onetime">One Time<br>

<input disabled="disabled" type="radio" name="paymode" id="p12" value="month">Monthly   </td>

</tr>


Script Code ///

function toggle()
{
document.getElementById("p11").disabled = true;
document.getElementById("p12").disabled = true;
}

i want select the first radio button (ID=bname1) to activate -- >
ID=no_imp1
and Id=P11,Id=P12

Please help me solve this problem...

Advanced Thanks.
Arjun
[ May 20, 2008: Message edited by: Arjun Palanichamy ]
Hi...

I have two firefox window and both are some html view codeing. i want move one window value to other window.

for example : first window have one more check box. second window have a textarea box, if i will select first window check box value and submit some one button next the value go to second window textarea box, if i want code this process in java scritp.

please any can help solve this problem ,or give the ant idea of this code....

Advance thanks to all

Arjun
Chennai.
Hi..

I have some list of email in array list in servlet action file i want to send and print jsp input textarea box.

here paste my servlet action class code :
package addressbook;

import java.io.IOException;
import java.util.ArrayList;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.log4j.Logger;

import weebersexception.SearchException;

public class MailAddressAction extends HttpServlet {

private static final Logger log = Logger.getLogger(MailAddressAction.class);

ArrayList contactlist;

public void service(HttpServletRequest req, HttpServletResponse res)
throws IOException
{
MailAddressImporter mailaddress = new MailAddressImporter();

try {

log.info("Enter the addressbook action page");

contactlist = mailaddress.mail(req);
log.info(contactlist);

req.setAttribute("contact_details", contactlist);
forward("/classifieds/mailaddress.jsp",req,res);

} catch (SearchException e) {
log.info(e.getMessage());
req.setAttribute("iserror", "yes");
req.setAttribute("errors", e.getMessage());
forward("/classifieds/mailaddress.jsp",req,res);
}
}

public String forward(String url, HttpServletRequest req,
HttpServletResponse res) {

RequestDispatcher dis = req.getRequestDispatcher(url);

try {
dis.forward(req, res);
} catch (ServletException e) {
log.error(e);
} catch (IOException e) {
log.error(e);
}

return url;

}

}
********************************************


please any can help solve this problem.

advance thanks.
Arjun
15 years ago
JSP
Hi..

I had use servlet and jsp for file upload processing, but it's getting some error, i am here paste the my code.



import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Enumeration;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.log4j.Logger;

import com.oreilly.servlet.MultipartRequest;
import com.oreilly.servlet.multipart.FilePart;
import com.oreilly.servlet.multipart.MultipartParser;
import com.oreilly.servlet.multipart.Part;

import datasourcefactory.DatabaseConnectionFactory;

public class Upload_Ad_imageDAO {

private static final Logger log = Logger
.getLogger(Upload_Ad_imageDAO.class);

Connection con = null;

PreparedStatement pst = null;

ResultSet rs = null;

boolean state = false;

public void writeImages(HttpServletRequest req,String ad_id)

throws SQLException , IOException {
String email = null;
HttpSession session = req.getSession(true);

email = (String) session.getAttribute("email");


MultipartRequest multi =

new MultipartRequest(req,ad_id);

Enumeration files = multi.getFileNames();
while (files.hasMoreElements()) {

String name = (String)files.nextElement();

String filename = multi.getFilesystemName(name);

String type = multi.getContentType(name);

// File f = multi.getFile(name);

File f = new File("X:/work/Uno_Car/web/advertise_images/"+ad_id+".gif");

//out.println("name: " + name);

log.info(name);

//out.println("filename: " + filename);

log.info(filename);

//out.println("type: " + type);

log.info(type);
if (f != null) {
String s = f.getName();
}
try {
con = DatabaseConnectionFactory.getInstance().getDBConnection();
pst = con.prepareStatement("update ad_detail set file_name=? where email=?");
pst.setString(1, ad_id);
//pst.setString(2, type);
pst.setString(2, email);
pst.executeUpdate();
log.info(ad_id);
log.info(email);
log.info("Image Sucessfuly Uploaded");
state = true;
} catch (SQLException e) {
log.error(e);
} finally {
if (pst != null) {
pst.close();
}
if (con != null) {
con.close();
}
}
}
}
}


***********************

what is wrong here. i not write and upload the image.

please any can help me solve this problem.


Thanks in Advance.
Arjun Palanichamy.
Chennai.
15 years ago
JSP
Hi JavaRanch Friends...

I was developed some one online shopping cart processing in jsp,servlet and apache 5.5V. After developing and check the local server it's work perfect.

Next i was upload the my online server and try to run, when i getting "500 Servlet Exception" Error and followed by some lines here.

================================================
500 Servlet Exception
java.lang.NoClassDefFoundError: org/apache/commons/digester/RuleSet
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2328)
at java.lang.Class.getConstructor0(Class.java:2640)
at java.lang.Class.newInstance0(Class.java:321)
at java.lang.Class.newInstance(Class.java:303)
at java.beans.Beans.instantiate(Beans.java:204)
at java.beans.Beans.instantiate(Beans.java:48)
at com.caucho.server.http.Application.instantiateServlet(Application.java:3183)
at com.caucho.server.http.Application.createServlet(Application.java:3104)
at com.caucho.server.http.Application.loadServlet(Application.java:3065)
at com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:435)
at com.caucho.server.http.Application.getFilterChainServlet(Application.java:2809)
at com.caucho.server.http.Application.buildFilterChain(Application.java:2765)
at com.caucho.server.http.Invocation.service(Invocation.java:313)
at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
at com.caucho.server.http.RunnerRequest.handleRequest(RunnerRequest.java:346)
at com.caucho.server.http.RunnerRequest.handleConnection(RunnerRequest.java:274)
at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
at java.lang.Thread.run(Thread.java:595)
========================================================

please any can help me for identify and solve this Online Error...

Advance Thanks
Arjun
Chennai
15 years ago