Gayathri Neti

Greenhorn
+ Follow
since Mar 08, 2002
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 Gayathri Neti

Hey guys,
I am planning to take SCWCD but I see that a new version of this exam is available. Can any one of let me know are there any big changes from SCWCD 1.3 TO 1.4. I was preparing for 1.3 version had to stop in after 50% preparation. Any help or information provided is greatly appreciated.

Thanks,
Gayathri
If I were passing the INTEGER ARRAY alone that might have worked fine.
I am passing 4 parameters. One of them is an INTEGER ARRAY.
Here is the code that I have:
20 years ago
Hi,
I have a standalone client which invokes a Servlet.
I want to send an INTEGER ARRAY as a parameter to the Servlet. Can I do that?
If so, can anybody show me how??
Thanks
20 years ago
Yeah, you are correct. I was trying all different things to debug it.
OK..here it is. I am pasting a part of the main page. The main page doesn't have any JSP in it.
<%! String logout = "true"; %>
<table width="90%" height="80%" border="0" cellpadding="0" cellspacing="0" bordercolor="#003399" >
<tr>
<td height="31" align="center"><a href="LogOut.jsp?logout=<%=logout%>" ><font color="#FFFFFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">Log Out </font></a></td>
</tr>
Thanks.
21 years ago
JSP
Please Phil, Do POST IT. I am right now, at the end of developing my application in JSP, TomCat4.1.18 and MySQl with JavaBeans.
I would like to host the application in IIS environment.
Thanks
21 years ago
JSP
I have a web application developed in JSP, TomCat 4.1.18.
In the application, I am logging a user and setting the userId in the session. After the user does whatever he needs to do, he would click on LogOut.
In the LogOut.jsp, I have the following code.
<%@ page language= "java" %>
<%@ page import="javax.servlet.http.HttpSession" %>
<%
if(request.getParameter("logout")!=null){
out.println("called Me");
session.removeValue("loginid");
session.removeValue("isadmin");
session.invalidate();
}
response.sendRedirect("login.jsp");
%>
My problem is that 'login.jsp' is never being called. Instead, it's staying on the screen from where I clicked 'LogOut'.

Can any body help me?? :roll:
21 years ago
JSP
Well, (I am a newbie) The only reason I put my question here was..
I am using Tomcat AppServer. I did not know if I needed to make any configuration changes too...
(even now, I am not sure if I have to make configuration changes. I guess I need not..)
thanks,
21 years ago
Could you please show me as an example??
Thanks.
21 years ago
I have web application on TomCat 4.1.18. I am using a couple of images in my application.
I am setting the 'img' tags' src property as an absolute path..like:
file:///E:\folder1\images\sample_logo.gif

I want to use a relative path. How is it possible?
Please indicate if I need to make any configuration changes? OR
Is it only a change in the SRC attribute of IMG tag
21 years ago
Hi All,
I am new to this. I am trying to write a simple application in JSP to access MySQL on TomCat4.1.18.
I have downloaded the MySQL JDBC Driver from www.sourceforge.net/projects/mmmysql/.
I have copied the mm.mysql-2.0.14-bin.jar into 'lib' directory under my TomCat Default installation directory (E:/jakarta-tomcat-4.1.18/server/lib).
I have written this JSP :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> Employees List </TITLE>
</HEAD>
<@ page import="java.sql.*" %>
<BODY>
<TABLE border=1 width=75%>
<TR><TH>Last Name</TH><TH>First Name</TH></TR>
<%
Connection conn = null;
Statement st = null;
ResultSet rs = null;
try
{
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost/cartapp");
st = conn.createStatement();
rs = st.executeQuery("select * from employees");
while(rs.next()){
%>
<TR><TD> <%= rs.getString("lname_txt") %> </TD>
<TD><%= rs.getString("fname_txt") %> </TR>
<%
}
%>
</TABLE>
<%
}catch(Exception ex) {
ex.printStackTrace();
%>
</TABLE>
Ooops, Something bad happened:
<%
}finally{
if(rs != null) rs.close();
if(st != null) st.close();
if(conn != null) conn.close();
}
%>
</BODY>
</HTML>

I have included the Context Path information in the 'server.xml' file.
<Context path="/JSPTestSamples" docBase="E:\JSPTestSamples" debug="1"
reloadable="true" crossContext="true"/>
When I execute in the browser, I get
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 10 in the jsp file: /employees_list.jsp
Generated servlet error:
[javac] Compiling 1 source file
E:\jakarta-tomcat-4.1.18\work\Standalone\localhost\JSPTestSamples\employees_list_jsp.java:57: cannot resolve symbol
symbol : class Connection
location: class org.apache.jsp.employees_list_jsp
Connection conn = null;
^
I AM UNABLE to RESOLVE....

Can any OF YOU tell me what's wrong??
21 years ago
JSP
I have ONLY TOMCAT4.1.18 installed on my machine. My machine is Win2k and I am using for development purposes ONLY. I do not have any WebServer (like apache).
My question is...
Is it possible that I can install and use JSPSmartFile tool on my machine and USE it ONLY with TOMCAT?? (without Apache??)
if so, could anyone can show this particular installation setup?? (or give links. I tried in www.jspsmart.com. this seems to indicate that I need Apache..!!!)
Thanks a bunch
21 years ago
JSP
Hai Java Gurus,
The question may soud dumb but ...let me ask. I have a varchar column and in my program I have a string variable that take sdata from thr textbox in the gui and inserts it into database. My problem is if th evalue in text box is empty then it is entering empty string into database. I want it to enter nothing.....I canno tchange any database setting and database I am using is Sql server.
Thanks,
Thank You guys....I got it working. Now, I understand why it was not finding earlier.
21 years ago
Hi,
I am new to this. I am running TomCat4.1.18 version. I am trying to run a sample JSP.
I created a folder called "inc" in e:/jakarta-tomcat-4.1.18/webapps/ROOT/inc. I have included "index1.jsp" in this folder.
In folder e:/jakarta-tomcat-4.1.18/conf/server.xml file, I have added
<Context path="/inc" docBase="inc" debug="1" reloadable="true"/>
I restatred the server and
When I execute http://localhost:8080/inc/index1.jsp,
I get "HTTP:404" server error.
I am pretty sure, I am missing something here.... Please correct me..
Could ANYONE PLEASE HELP ME??
Thank You.
21 years ago
My code is pretty simple. When I execute http://localhost:8080/examples/jsp/num/numbguess.jsp, I am able to see the webpage.
Now, I have a sample JSP "index.jsp" in "jakarta-tomcat-4.1.18/webapps/inc/. I have modified the server.xml file with
<Context path="/inc" docBase="inc" debug="0"
reloadable="true" crossContext="true"/>
INDEX.JSP Code:
<html>
<head>
<style>p { font-family:tahoma; font-size:14pt; }</style>
</head>
<body>
<%
String name = "World";
%>
<p>Hello <%= name %>!</p>
</body>
</html>

I know I am missing some part of configuration. But I am unable to figure it out....

Thanks,
21 years ago
JSP