Abhinav Sharma

Greenhorn
+ Follow
since Aug 08, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Abhinav Sharma

Thanks Manish for your immediate reply. But i wanna use the text as alt where i can show the information of that button. Don't we have any conditions where we can manipulate alt tag and display it till we don't remove our cursor. As why i was hesitant in using layers one cannot use much layers in a file. Can't we handle it thru javascript. If anyone can put some light on this. And thanks once again Manish for your help
abhinav
hello javaranchers,
Well this is a kind of problem which probably noone noticed or may be may be noone came across this. I have a problem with alt tag. What happens is when i put cursor on image which has my alt tag it shows me the text. And the text which comes in the alt tag is very long. Actually the image is a button and our home page. So on the button itself we have tried to tell the details of the page. But by the time the use reads the description the alt tag dissapears. My question is Is there any way we can display the alt tag as long as possible. Yes we can also use layers but that will make the web page heavy. Is there any way thru which we can display the alt tag as long as possible. Or any other way thru which this thing can be done. Can anyone put any light on this.
Thanking you all in advance
abhinav
Hello friends
I am a begginer in xml and xsl. I know that xsl is a stylesheet for xml documents like the way we have css for html. I wanna start from somewhere can anyone tell me what tools shall i install in order to make my xml files like for html we dreamweaver. Can anyone suggest me any tool which can help me making xml and xsl files. And can anyone tell me how shall i call xsl files into xml. Is it the same way the way we do it in html when we call css files. I need to start but i don't know how to start. I am totally lost . Your help will be appreciated. I know once i understand the basics i won't have any problems. So please help in making my base strong in xml and xslt. Thanks in advance
abhinav
Hello friends,
I am a begginer in this field. Can anyone tell me what do we mean by xslt. What can be done thru xstl. Do we have to install in order to run xslt. And how is it related to xml. I would like to know about the details of the xslt. If anyone can put some light on this. Thanks in advance
abhinav
Hello Everyone,
I have a querry. I have three pages first page where i enter the values and the third page is where i get the values. This second page i wanna use as a redirect page. I have seen in many pages where a page is launched which says that soon you will taken to so and so page. I tried to use sendRedirect. As i thought that will work. We have such thing working in javaranch site also. Can anyone help me and tell how shall i do this. Thanks in advance
abhinav
abhinav@comprointertech.com
22 years ago
JSP
Hi arun,
First of all netscape won't take input type without form. As netscape parse the whole code if you haven't followed the proper pattern then it will show error. And also while calling input type you need to write "document.formname.inputtype.value". This is the way of calling input type in both the browser. Without document it will work perfectly in IE but not in Netscape. I hope this gives you some help.
abhinav
22 years ago
JSP
Hi mike,
Let me answer you in a very simple so that you can understand. First write a applet. Save it in .java. And then compile it from the command line with javac applet.java and then execute it with this command appletviewer applet.java. But i hope you are doing all this after seeting the class path. After setting the path you can use this. Suppose you have saved your file in c:/applets folder. Go to that folder in dos prompt like this
c:/applet> javac applet.java
enter and then
c:/applet> appletviewer applet.java
enter
I hope this helps you and type inside your java code either on top or on bottom.
/*<applet code=applet.java width=100 height=100>
</applet>*/
This recognizes the code as applet
abhinav
22 years ago
Hi martha,
Hey martha. You cannot use System.exit() in Applets. That is only possible in frames. In order to use System.Exit() in Applets you have to use policytools. It gives applet permission to work like frames. But while in browser you cannot use System.exit(). You can use System.exit() only when you view applet in appletviewer. I think you can use policytool in this. I hope this solves your problem
abhinav
22 years ago
hi ted,
Thanks for reply. But my problem still not solved. Well you can add int[] in a vector. But the problem is how to display the values inside the int.
My code is like this :-
<%
Integer p=new Integer(25);
int[] u = {1,2,3,4,5,6,7,8};
String st[]={"ID1 :- ","ID2 :- ","ID3 :- ","ID4 :- ","ID5 :- ","ID6 :- ","ID7 :-","ID8 :-"};
String st1[]={"Abhinav :- ","Bharat :- ", "Shalini:- ", "Abhay:- ", "Deepak :- ", "Farhan :- ","Hanish :- ", "Jacob :- "};
%>

<% for(int i=0;i<st.length;i++){
Vector v=new Vector();
v.addElement(st[i]);
v.addElement(st1[i]);
v.addElement(p);
v.addElement(u[i]);
%>
<%=v.elementAt(0);%>
<%=v.elementAt(1);%>
<%=v.elementAt(2);%>
<%=v.elementsAt(3);%><br>
<%}%>
I have used the same method to display a string value. And it does not shows any error. But when i use the same method for the int to display the values. it gives me the foloowing error.
"Errors reported by compiler :/jsp/WEB-INF/jsp/jrun__vec_new2ejspc.java:80:1:80:18: Error: No match was found for method "addElement(int)".
".
I can add it in vector but i cannot display it and if i use this to add the values in vecotr "v.addElement(u);". And then if i display the values then it shows me some thing like this "[I@2f1ad8". I hope my problem is more clear to you. Thanks again for taking pains to answer me.
abhinav
22 years ago
JSP
Hello everyone,
I know this is a kind a very stupid question. Cuz a person who has already done database connectivityis asking this question. But these are some very easy questions due to which i am not able to learn jsp properply. Can anyone tell me what is the difference between :-
When i say
Integer p=new Integer(12);
and
int u[]={1,2,3,4,5,6,7}
Whenever i add the Integer in the vector it adds it without any difficulty. But when we add int u[] it gives me error messege "No match was found for method." I am using a vector where i am storing string and integer both. I can store string which has more than one values but i cannot store integer more than one values. For that i have to store one value at a time. My question is that how can i store a integer array in a vector so that i can call it in a vector. As my vector consist both a string and Integer. I can store string array when i write :-
String st[]={"Abhinav :-","Bharat :- ","Shalini:- ","Abhay:-","Deepak :-","Farhan :-","Hanish :-","Jacob :-"};
And then add it in a vector
c.add(st);
And later call it by
<%=v.elementAt(0);%>
0th element is my string array.
Can i call a integer array also like my string array.
Thanks in advance
abhinav
22 years ago
JSP
Thanks tim and binu for your much requiered help. I am working on your suggestions. And sorry could not come lately.
abhinav
22 years ago
JSP
hi buddy,
To generate a user defined error page. You need to first create a error page. And then the page where this error is generated write this above the html tag "<%@ page errorPage="error.jsp"%>". error.jsp is the error page created by you. This code "<%@ page isErrorPage="true" import="java.io.*" %>" you have to write in the error.jsp not on the main file. So whenever a exception occurs the error page will be generated. I hope this solves your querry
abhinav
22 years ago
JSP
jsp
Hi kirk,
To start with JSP first you need to install a server in your machine which supports jsp like you can install Jrun,weblogic and then you have to configure it. After making your computer server you can start writting JSP files and save the file with .jsp extention. But you need to ask for help from someone who can configure your computer. As you can save your jsp files only in a particular folder to which you have given permission for jsp files. For details read a good JSP book. I hope this helps you.
abhinav
22 years ago
JSP
hi buddy,
Try this example which i have made this may help you. As it displays the results on the same page.
<%@ page errorPage="error.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Generating Table </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY bgcolor=#FFCCFF>
<center>
<h1><font color="red">Colorful and Dynamic Table</font></h1>
<form method=post action="Table.jsp?name=Anthony">
<table>
<tr>
<td colspan="2"> <font size="2">
<%
int width=15;
int height=15;
%>
<font face="Arial, Helvetica, sans-serif"><b>Table width (Less than
16) =</b>
<input type=text name=width value=<%=width%> size=2>
, </font></font></td>
</tr>
<tr>
<td colspan="2"> <b><font face="Arial, Helvetica, sans-serif" size="2">Table
Height (Less than 16) = </font></b>
<input type=text name=height value=<%=height%> size=2>
, </td>
</tr>
<tr>
<td><font face="Arial, Helvetica, sans-serif" size="2"><b>Select color
: -</b></font></td>
<td>
<select name="select">
<option value="#00FFFF" selected>Not specified</option>
<option value="Red">Red</option>
<option value="Green">Green</option>
<option value="Blue">Blue</option>
<option value="Pink">Pink</option>
</select>
</td>
</tr>
<tr>
<td align=center colspan="2">
<input type=submit value="Click me Buddy !">
</td>
</tr>
</table>
</form>
<hr noshade>
<%
String w =request.getParameter("width");
String h= request.getParameter("height");
String col= request.getParameter("select");
if(w==null) w="15";
else w=request.getParameter("width");
if(h==null) h="15";
else h=request.getParameter("height");
if(col==null) col="#00FFFF";
else col=request.getParameter("select");
width = Integer.parseInt(w);
height = Integer.parseInt(h);
//if(width>15) width=15;
//if(width<0) width=0;
//if(height>15) height=15;
//if(height<0) height=0;
String[] colorArray={"00","11","22","33",
"44","55","66","77","88","99",
"AA","BB","CC","DD","EE","FF"};
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0" bordercolor="#CCCCCC" bgcolor=<%=col %>>
<tr>
<td align="center">
<table border=0 cellpadding =2 cellspacing=2>
<%
try {
%>
<%for (int y=0;y<=height;y++){%>
<tr>
<% for(int x=0;x<=width;x++) {
String bgColor="AA"+colorArray[y]+ colorArray[x];
%>
<td bgcolor=<%=bgColor%>> (<%=x%>,<%=y%> ) </td>
<%}%>
</tr>
<%}%>
<%
}
catch(Exception e)
{
out.print("<p align=justify><b>Please insert appropriate values. There is an Exception in your program which is :-"+e+"</b></p>");
}
%>
</table>
</td>
</tr>
</table>
<p>This is the following information which has been submitted to the server :-<br>
<b>This is width of the table :- <%=request.getParameter("width")%></b><br>
<b>This is heigth of the table :- <%=request.getParameter("height")%></b><br>
<b>This is bgcolor :- <%=request.getParameter("select")%></b><br>
</p>
<hr noshade>
</center>
</BODY>
</HTML>

The error page which i am printing is
<%@ page isErrorPage="true" import="java.io.*" %>
<HTML>
<HEAD>
<TITLE>This is my error </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD>
<BODY bgcolor="beige">
<h1 align=center>We have an error message here <%=request.getRemoteHost();%></h1>
<table border=1>
<tr>
<td>Exception</td>
<td><b><%=exception%></b></td>
</tr>
<tr>
<td>Message</td>
<td><b><%=exception.getMessage()%></b></td>
</tr>
<tr>
<td>Localized Messege</td>
<td><%=exception.getLocalizedMessage()%></td>
</tr>
<tr>
<td>Stack Trace</td>
<td><pre>
<%
StringWriter sw =new StringWriter();
PrintWriter pw=new PrintWriter(sw);
exception.printStackTrace(pw);
out.println(sw);
%></pre>
</td>
</tr>
</table>
<center><a href="javascript:history.back(0)">Please Enter your values again</a></center>
</BODY>
</HTML>
Use this two import the error page so that it also handles th exception. I hop ethi shelps you
abhinav
22 years ago
JSP
Hi gabby,
One more thing why don't you keep yout table in for loop and check the condition there or may be use a while loop and put the td or tr inside the loop so that whenever it will pass from that loop it will either increase the trs or the tds.
abhinav
And sorry i have posted this same answer in your another question by mistake
22 years ago
JSP