Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!

Nagesh Rachakonda

Ranch Hand
+ Follow
since Dec 04, 2003
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 Nagesh Rachakonda

We have a setup in DEV environment where two weblogic instances are set as one cluster on a single machine. We have 4 clusters on that machine.

The issue is Set-2 is FAILING.

The EXCEPTION: The request to start the server AppServer1B of domain XXXDomain failed because the node manager did not hear from the managed server in the configured timeout period. Despite this, if the managed server has not failed, it will come up and the node manager will start monitoring it. To adjust this timeout so that the task does not fail prematurely, please refer to the node manager property ScavangerDelaySeconds (Default value : 180 seconds. Current value : 180 seconds)

On Linux box console,
$ more AppServer1B_error.log
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server

Any other information is required can be provided.

Please help me in the resolving this issue.

Thanks
13 years ago
You are right!

Using JSTL's custom tags, we can achive this!

In the JSP place:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>

<c:import url="Action_NAME" context="WEB_CONTEXT"/>

Thanks
13 years ago
JSP
I have a base JSP in which I need to include the content from the result of an action/servlet...

How I can accomplish this?

This is similar to the portal home (like my yahoo home page) where different gadgets sit in one home page... (is our goal)....

Thanks in advance for your help.
13 years ago
JSP
Dear Moderator,

Would you please take a minute in helping me out?

Appreciate your time.

Thanks
14 years ago
Hi All,

I am experiencing a problem with forwarding the request to the client.

Please see below what I am doing

public void doPost()(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

// Send the response to client.
forwardToJsp(xmlResponse, request, response);

// Log the performance statistics into database.
bd.logStatistics(startTime, endTime, getServerVersion());

}

private void forwardToJsp(
String xml,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {

request.setAttribute("ImsResponse", xml);

RequestDispatcher rd = getServletContext().getRequestDispatcher("/jsp/ImsOut.jsp");
rd.forward(request, response);

}

The above method forwardToJsp() calls ImsOut.jsp.

Code in ImsOut.jsp is

<%
response.setContentType("application/xml; charset=UTF-8");
String strResponse = (String)request.getAttribute("ImsResponse");
out.print(strResponse);
out.flush(); // Flush the content to client.

%>

What I observed is servlet is sending the response to the client only after completing the database call bd.logStatistics().

For some reason flush() is not working. This is happening if the client is Java http client or Microsoft ASP/COM client. It works fine if the client is a browser. Is this the expected behavior? or Is it a bug in IBM servlet engine?

This problem is occurring in WSAD and shared WAS servers. Is there any way to make the servlet send the response to the Java http or MS COM client before completing the database call? Your help is greatly appreciated.

Note: For a reason the method call order is in that way in doPost(). Program has to work calling both methods one AFTER another.
[ September 27, 2005: Message edited by: Nagesh Rachakonda ]
14 years ago
How to overcome/solve for security issue while accessing a server context from the other server context (same application is at the two places)? Its a clustered environment (failover & loadbalancing [sticky only] mechanisms implemented)...
15 years ago

Originally posted by Jeanne Boyarsky:
Nagesh,
I would suggest writing to a property file on the app server. This property could have the status of the database (on or off) and the apps could check it before each database access for every few minutes.



If we write to a properties file, these will be loaded to the application once when the server boots-up! Once they are available at the application context, it is not possible to alter the setting unless we restart the server...(my understanding). Am I on the right pace? If not, what do you mean? Please explain!
15 years ago

Originally posted by Jeanne Boyarsky:
Nagesh,
There is no platform independent way of doing this. You would have to be able to direct the JSP request to a specific server, which is not possible.

I imagine there is some WebSphere specific API that you could use to have one clone call the other clone, but this would be messy. What are you trying to accomplish with this variable? Maybe there is another way.



Our application logs metrics into the database and acts as a middleware component. When the database is hung or not responding (recently happened -- due to a infinite thread process caused by other shared database app), I need to stop logging transactions metrics into the database. We are trying to achieve this in two ways:

1. Programetically (defined a global app level variable; checking the connection timeout occurances etc., to set the variable; finally based on this global flag, turning the database entries on & off.)

2. (Otherway - for immediate effect - based on other monitor messages) Through web, with the help of a secured JSP, admins(managers/team leads) should be able to turn this flag on/off.

My question above to accomplish the second step.

Thanks for your reply. Any thoughts/suggestions are highly appreciated.
[ April 12, 2005: Message edited by: Nagesh Rachakonda ]
15 years ago
We have an application level variable, which is set dynamically through a JSP page (uses Authentication and Authorization - restricted page). We tested the set/reset functionality of this variable/flag using our ONE server. Currently, for our application, in Production, we have two servers.

My question is how I can set/reset this variable/flag for the application running in one particular server? In my user-interface JSP, the admins should be able to select a particular server (one of the two) and decide to turn-on or turn-off this flag.

How we can achieve this functionality? What needs to be changed at Web-server or App Server levels? Any information or references are highly appreciated.

Our app is running on WAS5 ... Developing in WSAD 5.1.2

Thanks
We have an application level variable, which is set dynamically through a JSP page (uses Authentication and Authorization - restricted page). We tested the set/reset functionality of this variable/flag using our ONE server. Currently, for our application, in Production, we have two servers.

My question is how I can set/reset this variable/flag for the application running in one particular server? In my user-interface JSP, the admins should be able to select a particular server (one of the two) and decide to turn-on or turn-off this flag.

How we can achieve this functionality? What needs to be changed at Web-server or App Server levels? Any information or references are highly appreciated.

Our app is running on WAS5 ... Developing in WSAD 5.1.2

Thanks
15 years ago
Issue:
======
If a particular connection is taking longer time (hanging for a while, let us say 3sec), I need to identify the situation and terminate this connection to the database proceede with further activities...

Understanding:
==============
I knew that there are connection parameter settings in Websphere (like ConnectionTimeout, Max Connections, Min Connections, Reap Time, Unused Timeout and Aged Timeout) which are not useful to determine/satisfy the need.

Current Settings:
=================
ConnectionTimeout= 3sec
Max Connections= 50
Min Connections= 1
Reap Time= 180
Unused Timeout = 1800
Aged Timeout= 0

Somebody suggested to use Timer & TimeTask around this task (fetching connection) thread. Is there any best way (like setting in somewhere in WAS) to deal with this situation.

Above issue occured due to the fact that our application is sitting in a shared environment where one of the application caused infinite processes in a short time caused 100% CPU utilization... so all the connections to the database in 'hang' state.

Appreciate your input.
15 years ago
Guys,
Any inputs on this . . . .please . . . ?
I am using JDK 1.3 and JSP 1.1 versions for WAS 4.
Thanks.
[ May 03, 2004: Message edited by: Nagesh Rachakonda ]
16 years ago
JSP
Hello,
I am calling main.jsp from a html page. This main.jsp consists of few include files e.g. as below:
*************************************************************
html content ...
<%@ file="x.jsp" %>
html content ...

<%@ file="y.jsp" %>
html content ...
<jsp:include page="../summaryReport.do" flush="true">
<jsp aram name="app_name" value="FVP" />
</jsp:include>
html content ...

<%@ file="z.jsp" %>
html content ...
*************************************************************
Where the problem is occuring due to JSP:INCLUDE action.
I am getting the following error:
Error 500: ERROR: Cannot forward. The response has already been committed.
In that action, I am calling a struts action with few input parametrs. This prepares a sql, executes it, get the output data and displays in a jsp (e.g a.jsp). The ActionForward is set to this a.jsp page on success. I have debugged the code. I was able to see the proper execution till this actionforward. After that it displays above error message with the remaining HTML content. The whole request is part of a session.
Requested Questions:
How I can avoid this problem?
Is there any other best way to do it?
What is the problem with my code?
Any solutions are welcome.

Thanks
Nagesh.
16 years ago
JSP
I have a results html document (using JSPs) at my front. If I click on a link, say 'Printable Page', how can I dynamically format the pop-up page which has part of the content of the parent document with out any links/images, also which should include the parent styles.
I appreciate if anyone can guide me for the good solution. I would like to achive this without making any database query? Can we just do this using HTML and JavaScript?
Thanks in advance.
Nagesh.
Hi guys,
Any GOOD books / resources on EJB Query Language???
Thanks
Nagesh.