Ram Kumar Rengarajan

Greenhorn
+ Follow
since Apr 28, 2005
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 Ram Kumar Rengarajan

I have got an error in the following error in the below program:
DisplayAllUsersAction.java:49: cannot find symbol
symbol : method setAttribute(java.lang.String,java.util.ArrayList)
location: interface javax.servlet.http.HttpServletRequest
request.setAttribute("users", list);
^
Note: DisplayAllUsersAction.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error


package strutsTutorial;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.util.*;

import java.sql.Connection;
import javax.sql.DataSource;
import java.sql.PreparedStatement;
import java.sql.*;
import java.io.Serializable;

public class DisplayAllUsersAction extends Action
{
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception
{

try

{

DataSource dataSource = getDataSource(request, "userDB");

Connection conn = dataSource.getConnection();
Statement statement = conn.createStatement();



ResultSet rs = statement.executeQuery("select FIRST_NAME, LAST_NAME, EMAIL from USER2");
ArrayList list = new ArrayList();
while(rs.next())
{
String firstName = rs.getString(1);
String lastName = rs.getString(2);
String email = rs.getString(3);
User user = new User();
user.setEmail(email);
user.setFirstName(firstName);
user.setLastName(lastName);
list.add(user);
}
if (list.size() > 0)
{
request.setAttribute("users", list);
}
}
catch(Exception e)
{
}

return mapping.findForward("success");
}


//return mapping.findForward("success");
}

Can anyone help me in this regard?

Regards,
Ram Kumar.
hi,

I think the problem was in my web-inf folder. I did deleted web-inf folder which is in jsp-examples. After I pasted new one from my friend system. Now Jsp program is working fine. May be i deleted some files in my old web-inf folder. so i could not able to run it.

Now it is working fine. Thank you very much to all.

Ram..
15 years ago
JSP
Hi Santhosh,

Shall I reinstall my tomcat? or Is anyother solution available?
15 years ago
JSP
Hi pop,

Which version Tomcat are you using now?. Pls Send ur java coding.
15 years ago
JSP
Hi pop,

Which version are you using now? In tomcat 5.0, you should put in the following location.

Tomcat 5.0\webapps\servlets-examples\WEB-INF\classes
15 years ago
JSP
Hi Santosh and Chetan,

I got this error message.

HTTP Status 404 - /jsp-examples/

--------------------------------------------------------------------------------

type Status report

message /jsp-examples/

description The requested resource (/jsp-examples/) is not available.


--------------------------------------------------------------------------------

Apache Tomcat/5.0.28

Thanks and regards,

Ram..
15 years ago
JSP
hi Chetan Parekh,

http://localhost:8080/ this url is working fine. I clicked on the jsp examples link in this page. But i got error message. Servlet program works fine. I got a problem in jsp only.


Thank you Mr.chsanthosh kumar. Is it neccessary to uninstall the tomcat? Because Servlet program works fine. how is it possible once the problem is in tomcat?

Thanks..
Ram..
15 years ago
JSP
Hi,

I have installed Tomcat 5.0. I created one simple jsp file name as sample.jsp. I put in C:\Tomcat 5.0\webapps\jsp-examples\sample.jsp. But I could not able to run this program.
Pls anyone help me. But Servlet program is working fine in my system.

I used this url: http://localhost:8080/jsp-examples/sample.jsp

This program is working fine in my colligue system. I have more confused. Why this is happend? I could not able to access default examples @ tomcat. Even i typed http://localhost:8080/jsp-examples/ i got this error "The requested resource (/jsp-examples/) is not available".
Pls help me...

Thanks in advance..

Ram..
15 years ago
JSP
*
***
*****

Hi all good evening. I have simple doubt. How to print like above shape in java. Pls can any one help me.

Thanks in advance.

Ram..
15 years ago
Hi i want like triangle shape stars.. Thanks..
15 years ago
*
***
*****

Hi all good evening. I have simple doubt. How to print like above shape in java. Pls can any one help me.

Thanks in advance.

Ram..
15 years ago
hi,

I have another problem in weblogic. If I open the weblogic builder's Open an exploded or archived module, I could not able to view the directory structure. Pls Can anyone help me?

Thanks in advance.

Ram..
Hi all,

I have weblogic 7.0. I have created home, remote, bean files. I have deployed the jar file successfully. I did run the client java program. It works fine. I got result. But now I wants to use JSP for client program. One of My friend told should create ear file for jsp. I dont know how to create the ear file. I know to create jar file. Pls explain the steps about .ear files.

Thanks in advance..

Ram...
hi,

I have installed weblogic 7 server.I am facing one problem. I Cannot able to view the left frame of admin console. I got this error.

java.lang.classnotfoundexception: weblogic.management.console.applets.Navapplet

Pls help me..

Thanks in advance..

Ram..
hi Valentin,

Again thanks for ur help. Now my weblogic server works fine. Even I restart my machine, it works fine. I deleted the file, which was told by you. Thank u very much. Thanks a lot.

I am facing another one problem. I Cannot able to view the left frame of admin console. I got this error.

java.lang.classnotfoundexception: weblogic.management.console.applets.Navapplet

Pls help me..

Thanks in advance..