sreelakshmi kolla

Ranch Hand
+ Follow
since Aug 23, 2007
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 sreelakshmi kolla

Hi All,

I am working on implementing the intenal LAN messenger.here i want ti identify the systems which are connected in LAN and get their names.
can any one tell how to do this?

Thanks&Regards,
Sreelakshmi.
Hi All,
here i want to develop a chat application with messenger.it is like yahoomessenger/gtalk kind of thing.
so,can any one tell me how to proceed for that?

Regards,
Sreelakshmi.K
Hi All,

i have one link for download,when i clicks on that link,it is asking the password.in the backend i written the code to check for authenticated password.if that password what i have entered is authenticated,that link should get downloaded.i acheieved all this functionality.

now what i want to do is,after the download completed,that page which asking to enter the password has to close.how can i do that?i tried it by using window.close() in password.jsp page.
but it closes all the functionality,even download is also not coming.
can anyone help?

Thank you,
Regards,
Sreelakshmi.
16 years ago
i written below line in my jsp code:


<% ArrayList fileDisp1=(ArrayList)session.getAttribute("arrlist");
List list=new ArrayList();
list.addAll(fileDisp1);
Iterator iterValue=list.iterator();
while(iterValue.hasNext())
{
String dispValue=(String)iterValue.next();
%<
<a href="/DL"?FileName="<%=dispValue%>"< <%=dispValue%< </a<<%
}


inorder to get that value "dispValue" to the servlet,i wote like this:

String originalFileName=request.getParameter("dispvalue");
System.out.println(originalFileName);

when i run this ,it is printing "null" in System.out.println().
why it is so?
can anyone help?
Regards,
Sreelakshmi
16 years ago
i modified all the files .now its working.i used same DL.java filedownload the files.i made a slight modification here,i.e in JSP page:
<a href="/DL"?FileName="<%=fileDisp1%>"> <%=fileDisp1%> </a>

now when i click on that particular link,it is displaying like this:

Error:400
type Status report
message /ajay/DL
description The requested resource (/ajay/DL) is not available.

where i made wrong?

Regards,
Sreelakshmi
16 years ago
Hi All,

i want one field in my signup form for security.it is like enter the security code in gmail/yahoo signup form.i didnt have any idea.

Can anyone give some idea inorder to do this?

Thank you,
Regards,
Sreelakshmi.
16 years ago
Thank you Ulf,
now it is giving an exception like "org.apache.jasper.JasperException: Cannot find ActionMappings or ActionFormBeans collection"
please help me
Regards,
Sreelakshmi.
16 years ago
here i write one servlet class like this,inorder to download file:

DL.java(servlet)
package sntechsolutus.com;

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;
public class DL extends HttpServlet{
public void service(HttpServletRequest request,HttpServletResponse response)throws IOException{
PrintWriter out=response.getWriter();
String originalFileName=request.getParameter("fileDisp1");
}
public void doGet(HttpServletRequest request,HttpServletResponse response)throws FileNotFoundException,IOException{
String originalFileName=request.getParameter("fileDisp1");
response.setContentType("application/download");
response.setHeader("Content-Disposition", "attachment; filename=\""+originalFileName+"\"");
FileInputStream fin = new FileInputStream(originalFileName);
int size = fin.available();
response.setContentLength(size);
byte[] ab = new byte[size];
OutputStream os = response.getOutputStream();
int bytesread;

do{
bytesread = fin.read(ab,0,size);
if(bytesread >-1)
os.write(ab,0,bytesread );
}while(bytesread >-1);
fin.close();
os.flush();
os.close();
}
}


i mapped this in web.xml like this:

< servlet-name<dnload</servlet-name<
<servlet-class<DL</servlet-class<
<servlet-name<dnload</servlet-name<
<url-pattern</DL</url-pattern<

and in in jsp i write like this inorder to map the url:

<script type="text/javascript"<
function call(){
document.testForm.action="<%=request.getContextPath()%<" +"/DL";
document.testForm.submit();
}
</script<

<a href="<%=dispValue%< onklick="javascript:call()"" target=_blank<<%=dispValue%</a<

now when i am trying to execute it is giving error that:
"The requested resource (/ajay/) is not available.",however that ajay folder is there in webapps directory.

can any one help?
Regards,
Sreelakshmi.
16 years ago
i have one url in servletmapping named /DL.now i want to relate that url into jsp page in this link
<a href="<%= fileDisp1 %> onclick".here i want to pass that url into onclick method.how can i do that?
can anyone help?
Thank you,
Regards,
Sreelakshmi.
16 years ago
Hi All,
i have one URL in servletmapping file,here i want to pass that url into JSP page.how can i do that?
can any one suggest?

Thanking you,
Regards,
Sreelakshmi.
16 years ago
thank you very much tarun and merril !
16 years ago
Hi All,

Here i have one download option,when i clicks on that button,so many number files are coming which are in DataBase.so,here my requirement is when i clicks on particular file,it should recognize the format that particular file,and displaying like a pop-up with two buttons open and save.

give me some idea to proceed to this kind of situation!

Thank you,
Regards,
sreelakshmi.
16 years ago
Hi All,

I want to create login page with fields like username,email and password and with two tabs"get your code"and "continue"..like that.

here for fields..i may use HTML tags.can anyone tell how to create tab buttons with that names?

Thanks for anyhelp!

Regards,
sreelakshmi
16 years ago
Hi Ranjit,

As i am very new to struts and java,i supposed to do that.i do never repeat like this.

However i am facing same problem still now.how can i resolve that?
Thank you,
Regards,
sreelakshmi.
16 years ago
Hi Ranjit,

Thank you very much!

i made the changes like what you have been said.now i got exception:

org.apache.jasper.JasperException: /welcome.jsp(36,0) Attribute phno invalid for tag text according to TLD
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:274)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



my welcome.jsp is:


%@ taglib uri="/tags/struts-bean" prefix="bean" %
%@ taglib uri="/tags/struts-html" prefix="html" %
%@ taglib uri="/tags/struts-logic" prefix="logic" %
%@page import="java.util.*" %

html

head
title wlcome page /title
/head
script type="text/javascript"
function addcontact()
{
addcontactwindow=window.open("addcontact.jsp","addcontactwindow","status=1,scrollbars=1,resizable=1");
addcontactwindow.moveTo(2,2);


}
/script



body

html:errors/

h2 welcome /h2<%=session.getAttribute("ausername")%
h2MyProfile h2

NAME %=session.getAttribute("ausername")%

EMAIL %=session.getAttribute("aemail")%
h2Contacts/h2
html:text property="" name="" styleId="name"/
html:text property="" phno="" styleId="phno"/
html:text property="" email="" styleId="email"/
INPUT TYPE="button" VALUE="Add Contact" onklick="addcontact()"/
/body
/html



my addcontact.jsp is:

%@ taglib uri="/tags/struts-bean" prefix="bean" %
%@ taglib uri="/tags/struts-html" prefix="html" %
html:html
headtitleAddContact page/title/head
script type="text/javascript"
function add()
{
window.opener.document.getElementById("name").value=
document.getElementById("nameId").value;
window.opener.document.getElementById("phno").value=
document.getElementById("phnoId").value;
window.opener.document.getElementById("email").value=
document.getElementById("emailId").value;

window.close();


}
/script


body

html:form action="/addform.do"
html:errors/
bName/b
html:text property="name" styleId="nameId"/br
bemail/b
html:text property="email" styleId="emailId"/br
bphno/b
html:text property="phno" styleId="phnoId"/br

html:submit value="add" onklick="add()"/
/html:form>
/body
/html:html

please look into that and let me know the mistake i made!

Thankyou,

Regards,
sreelakshmi
16 years ago