Shreenivaas Reddy

Greenhorn
+ Follow
since Jul 04, 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 Shreenivaas Reddy

The task is to display daily product updated details in two frames.
I have a frameset of 2 frames.In the top frame the url (http://127.0.0.1/product/nokia1100120906.html) is to be dispalyed and
in the bottom frame the updated details of the product is to be displayed(i.e., content of http://127.0.0.1/product/nokia1100120906.html only).

my products table is like this---
prod_name sysdate company url
nokia1100 12-sep-06 nokia http://127.0.0.1/product/nokia1100120906.html
nokia1100 11-sep-06 nokia http://127.0.0.1/product/nokia1100110906.html

I am able to retrieve the url from the database and able to display it in the top frame and when I click the url, its content getting displayed in the bottom frame. That seems fine.
The problem here is�when I forward it to jsp, In top.jsp, I could able to get the url in the top frame, but I am not getting its content in bottom.jsp (ie., bottom frame) by default. Only when I click the click the url, I am getting the content in the bottom frame.
Can any one help me to code bottom.jsp�.





17 years ago
JSP
Hi Swathi,

I hope this works fine for your question...'Is there any way to open the excel as only excel file not as excel in webpage?'
Just download JDIC(Java Desktop Integration Componenents) API and try to use the Desktop.open(...) method to open the Excel file in Excel window.
I have used JDIC for 'FileSearch and Opening the files'(like Windows FileSearch)application.
Hope it works for you...

regrads
17 years ago
JSP
how many ways we can destroy the servlet in our program?
17 years ago
pls gothrough the book "Head First Servlets & JSP" a nice book for beginners..easy to understand.
17 years ago
JSP
hi geeks!!!

This application is similar to Windows File Search option...
Using the following code im getting a page with the searched files along with links. After clicking a particular file or directory frm the search results...file/directory gets opened and the results page becomes blank...I want to retain that page of search results to click anotherfile/dir...
can any one help me out...thx in advance.



17 years ago
JSP
hi geeks!!!

This application is similar to Windows File Search option...
Using the following code im getting a page with the searched files along with links. After clicking a particular file or directory frm the search results...file/directory gets opened and the results page becomes blank...I want to retain that page of search results to click anotherfile/dir...
can any one help me out...thx in advance.

---------------------------------------recursive.jsp--------------
<HTML><body bgcolor="#CCFFFF">
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="org.jdesktop.jdic.desktop.*" %>
<%!
public List lFiles(List list, String dir, String s) {
File dn = new File(dir);
File fList[] = dn.listFiles();

for(int i=0;i<fList.length;i++)
{
if(fList[i].isDirectory())
{
if((fList[i].getName()).contains(s))
{
list.add(fList[i].getAbsolutePath());
System.out.println(list);
}
lFiles(list, fList[i].getAbsolutePath(),s);
}
else if((fList[i].getName()).contains(s))
{
list.add(fList[i].getAbsolutePath());
System.out.println(list);
}
}
return list;
}
%>
<%
String s=request.getParameter("T1");
File f[] = File.listRoots();
for(int i=3;i<=4;i++){
String dir = f[i].getAbsolutePath();
Vector list=new Vector();
lFiles(list, dir,s);
for(int x=0;x<list.size();x++)
{
String sr=(String)list.get(x);
File fl= new File(sr);
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; font-family:Verdana; font-size:10pt; color:#CC3300" bordercolor="#CCFFFF" width="100%" id="AutoNumber1" height="12">
<tr>
<td width="30%" height="10%"><a href="DisplayFile.jsp?param1=<%out.println(fl);%>"><br><%out.println(fl.getName());%></a></td>
<td width="70%> height="10%"><%out.println(fl.getParent());%></td>
</tr>
</table>
<%
}
}
%>
</BODY></HTML>
--------------------------------------end of recursive.jsp----------------

---------------DisplayFile.jsp-------------------------------------

<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="org.jdesktop.jdic.desktop.*" %>
<%
File f= new File(request.getParameter("param1"));
Desktop.open(f);
%>

-------------end of DisplayFile.jsp------------------------------
17 years ago
JSP
Hi All users here...

When we give a word in Search option of Windows...it displays the links to the specified file or Directory..isn't it!
I need to display the same in browser(atleast the absolute paths if not links)...for this I wrote code as shown below..with Im able to get the matching files which are in the root directory...but im not getting from subdirectories...
If i do the same normal java class im getting the required output...
pls help me out.

<html>
<body>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%!

public List lFiles(String dir)
{
File dn = new File(dir);
ArrayList list=new ArrayList();
File fList[] = dn.listFiles();
String str="";
String s="xyz.txt";
for(int i=0;i<fList.length;i++){

if(fList[i].isDirectory())
{

lFiles(fList[i].getAbsolutePath());
}
else

if((fList[i].getName()).equals(s)){
list.add(fList[i].getAbsolutePath());
System.out.println(list);
}
}
return list;
}
%>
<%
File f[] = File.listRoots();
for(int i=3;i <4;i++){
String dir = f[i].getAbsolutePath();
%>
<%=lFiles(dir) %>
<%
}
%>
[ July 05, 2006: Message edited by: Bear Bibeault ]
17 years ago
JSP