Ricardo Alvarado

Greenhorn
+ Follow
since Feb 23, 2004
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 Ricardo Alvarado

I could fix the problem.. thank you very much..
19 years ago
I'm trying to get clients info from a client... I tested on a jsp and it works fine but it seems that it's not working with my servlet...

This is my code

String HTTP_USER_AGENT ="";
String REMOTE_HOST = "";
String REMOTE_ADDR= "";
String REMOTE_USER= "";
String SERVER= "";
String SERVER_PORT= "";

if (req.getHeader("HTTP_USER_AGENT") != null) {
HTTP_USER_AGENT = req.getHeader("HTTP_USER_AGENT").toString();
req.getSession().setAttribute("HTTP_USER_AGENT",HTTP_USER_AGENT);
}
if (req.getHeader("REMOTE_HOST") != null) {
REMOTE_HOST = req.getHeader("REMOTE_HOST").toString();
req.getSession().setAttribute("REMOTE_HOST",REMOTE_HOST);
}
....



There is nothing really special in this servlet, all I need is client info. Do someone nows what could this be happening ....

Thanks
19 years ago
Thanks Bill

I'm only storying this sessions for testing.

To your suggestions...
I will take a look to the code, do you
think that some null values in session
variables can do this. What else can invalidate a session?.

The second one "the server does not consider all parts of your application to be the same web application", how can I look for this, is there a configuration file that I should be looking?

The third one I'm not really sure where the timing for the sessions is set; where are this configuration files? or its a server kind of issue.

I really appreciate your help..

Thanks a lot...

Ricardo
19 years ago
I'm using WebSphere Application Server 4.x

I found other inusual thing. I am storing my session id in a database and it seems that on every page that I go within my applicaction (in the same window browser) seems to be changing. So I have a different session id for each page. It's seems to me that I'm loosing the session but I'm not sure what I could do for storying it...

Thanks
19 years ago
I am storing my session id into a database and I realiza that on every new page I enter, the session id is changing.

How did this happen? I'm not using session(true) nor session(false) statements in any of the pages...

Does anyone has this problem?

Thanks
19 years ago
Lets say its a smaller type of session object. I'm still loosing my session variable from one page to another even if we are talking of 1/2Kb or less. The weird thing is that I'm not loosing the others variables.
I have tested this application in other servers and it seems to be ok, but in this server doesn't quite follow with the session variables. Now, I think it can be a server issue but I'm not sure where to look.
So as you see, the server is loosing an specific session variable.
Does the session variables has a maximum definition name, or in an application can you place a maximum set of variables?

Thank you very much :0
19 years ago
Currently I need to store up to 80 Kb in a session variable and it seems that I kind of lost the session variable. I'm pretty sure that the reason of this is that the server on which my application is install has some sort of session variable maximum.
Do someone know where can I check this, or how can I increase this..

I'll really appreciate all you help

Thank you very much....
19 years ago
I have this problem...

Lets say we have 3 jsp pages (or servlets)....

A ----> B ----> C---->

When I pass session variables from A to B, the session persistence seems to be ok, I'm getting all the values and everything looks great.
When I pass these values from B to C it seems some of these
session variables are missing.. (NullPointerException)

I'm working with WebSphere and the weird thing it is working in a specific server and in other it is not working.

I think it could probably be a session persistence configuration issue but I can't find the source of this problem...

Do someone know, or maybe have experience this kind of problem?

Thank you
19 years ago
I have this problem...

Lets say we have 3 jsp pages (or servlets)....

A ----> B ----> C---->

When I pass session variables from A to B, the session persistence seems to be ok, I'm getting all the values and everything looks great.
When I pass these values from B to C it seems some of these
session variables are missing..

I'm working with WebSphere and the weird thing it is working in a specific server and in other it is not working.

I think it could probably be a session persistence configuration issue but I can't find the source of this problem...

Do someone know, or maybe have experience this kind of problem?

Thank you
19 years ago
I'm using WebSphere 4 and I already did the datasource ...
ok ...
20 years ago
I have this code, and I have the following error....
Name comp/env/jdbc not found in context "java:".
When I do this:
DataSource myDS =
(DataSource) initialContext.lookup(
"java:comp/env/jdbc/databaseName");
What it could be?
Thank you very much
import java.io.IOException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;

public class pruebaDataSource extends HttpServlet {
public void doPost(
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException, java.io.IOException {
}
public void doGet(
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException, java.io.IOException {

System.out.println("\n");
System.out.println("\n");
System.out.println("\n");
System.out.println("\n");
System.out.println("Accessing Data Source");
try {
Context initialContext = new InitialContext();
DataSource myDS =
(DataSource) initialContext.lookup(
"java:comp/env/jdbc/databaseName");
...
20 years ago
Thank you kyle, I will do that.
I was a little lost on this. I remember that I did that with the jdbc classes for Oracle Connection.
Thank you.
20 years ago
I'm trying to develop XML-RPC
Trying to communicate a C program as server running in a Unix system with a Java program using WebSphere as client.
20 years ago
How can I add that to the classpath. Can you help me with that. Were I can find that. Thank you very much
20 years ago