satnam singh negi

Greenhorn
+ Follow
since Aug 13, 2011
satnam singh likes ...
Hibernate Spring Java
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
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by satnam singh negi

Martin Vajsar wrote:Doesn't Oracle itself come with utilities to monitor performance? I'd say there is something like Enterprise Manager for Oracle, though it might be a standalone product. There are plenty of tools (including third-party ones) to monitor infrastructure nowadays; it seems strange that someone with an infrastructure so large would get to develop proprietary solution....

Anyway, measuring response time of a query is quite a crude way to asses database performance. The timing might be affected by events outside the database, what if the delay will be in your application? Oracle provides dedicated views to query performance data which are going to be much more precise (distinguish several types of bottlenecks, for example). This is quite a broad topic, but you might start here.




Thanks for the response Martin, of course there are plenty of utilities but they have complicated representation, the client does not understand them,so the requirement is to make a simple graphical format like red and green buttons to show the performance, if performance is ok then green one otherwise red .

A bunch of thanks to aware me about application impacts and performance.

Jan Cumps wrote:No difference for MySQL or Oracle.


Do you need to connect with all 50 at the same time, or is it: connect to #1-> do somethiong -> disconnect -> connect to #2 .... ?



actually the scenario is ,this is an Enterprise data management and i have to develop an application in java to monitor it, means i have to check the performance of database(s) , there are many parameters to monitor the database(s). like cpu performance,hit ratio,memory utilization. suppose there is select query and i got results in 3 sec, but the best case was suppose 1 sec. so 2 sec is kind of threshold. this is how i have to check the performance but got stuck with first point that how to get connected with database(s) in java.

it may be like a cronjobservlet that will run in each 5 minutes in order to Monitor the performance.

Thanks for the quality time.
Hi All,

I have to communicate with more then 50 Oracle databases from a single application , how can i achieve this ? If i am succeeded in this then i have to check the performance with several databases by firing the queries to each one.

Please share your ideas as i have only worked with MySql .


Thanks in advance.

Zandis Murāns wrote:You are seeing full path to the file in that output message.
If you're not seeing such file in you'r file explorer, perhaps it's hidden or somehow invisible to the user. Copy full path of that file, run notepad or other you'r text editor and click open -> paste copied path -> return key press.





Absolutely , you are correct !! i did that thing and an notepad turns into a .txt file ,it show the name of file. but why it is happening like

that..what do i need to do if i want to create a file on my workspace, e.g like relative to web-inf or anywhere in workspace.


Please Suggest.

Thanks !!
10 years ago

Zandis Murāns wrote:I belive this does not works because "somefolder" does not exists or test.txt exists already.
Have a try:





That is a great help....and it says file already exists..but i can't find it in the folder. where it has been created already ?
Thanks
10 years ago

bhanu chowdary wrote:Hi Satnam,
How are you generating the file? Please put the code here.







This should create a file in my workspace,in somefolder under webcontent.but not working.

any other approach will appreciable.

Thanks !!
10 years ago
Hi all,

please help me to create a file on server, i want to create a directory above the web-inf and then want to generate a file inside it.



I am trying this and i am able to go the place where i want to but, No file is getting generated.

Please suggest.


Thanks in Advance.
10 years ago

Anshul K Jain wrote:HI satnam,
Try using the validate='true' inside your form tag.


Anshul



i guess this is for client side validation, but in case i want to do some server side validation then i want to use validation framework..and i am able to use it....just need to configure some validation rules with respect to each action ...it pretty simple and good to work with struts validation framework..


thanks for the responses.

cheers
10 years ago

olivier dutranoit wrote:here is a quick and dirty example :



Thank you so much for quick responses,
The problem is that we are trying to implement browser re-direction without a browser, which is not a good idea. In order to invoke the servletTwo on other server , we need to work with help of browser redirections at this phase.

Its like there are three different server, server1 is requestor server from where all the incoming request will come to server2 which is the main server where all the request validations are taken care of. my situation is while validating that request means in between the code i need to reach to server 3 ,collect the response from there and again return to server 1.

this is the whole scenario. how can implement browser redirection in between java code.

Please suggest, and moreover thanks for the time to read the post.

cheers.

10 years ago

olivier dutranoit wrote:for interservercommunications on this level, i use the HttpURLConnection.

for writing use *.getOutputStream();

for getting the response, use *.getInputStream()

for example, you can send an xml, and receive an answer, also as xml.

Search for the specifications of this one, you'll find it!




can you please share some piece of code for better understanding. this would be great help.

Thanks in advance
10 years ago
Hello everyone,

Greetings !! hope you all doing great with your kith and kin.

I have a new problem(not actually a problem but something new to learn about ) ,i am doing some manipulations with one servlet ,say

ServletOne, now i have ServletTwo on different tomcat server.

now i want to send a request from ServletOne to ServletTwo and want a response back from ServletTwo to ServletOne.

what is best way to achieve it. I am using URL CLass for this.but i want to send response back from ServletTwo to ServletOne with some values. will sendRedirect will help in this,in case i need some values with it.

Please suggest.

Thanks
10 years ago

Vijitha Kumara wrote:

when server respond back to me the url remain same as it was at the time of request. so here my confusion is ,when server respond back than the that url should be client url. is it correct ?


Your browser(client) send a request to a server which will be the URL at the time you send it, and you'll see the response on the same. This does not change whether you send the request to any other server than the one you used before.




Thanks for your comments vijitha !!
10 years ago

Vijitha Kumara wrote:

but when i click the submit button from my requestGenertor.html then url becomes "http://otherserverdetails:8020/ValidateServlet" which i think is fine because that is where the request has to be validated, but when i get the response from server the url remain the same. which i guess should be "http://myserverdetails:myPort/responseMessage" .


Why? What is that "http://mysever...." URL? When you send a request to a URL it doesn't change unless server sends a redirect to the browser, rather you'll see the response.




Actually "http://myserver..." is my tomcat server from where i am making a request to other server.when server respond back to me the url remain same as it was at the time of request. so here my confusion is ,when server respond back than the that url should be client url. is it correct ? this is just as when we made a request to any server from our browser then it respond with desired result but without server details . i am confused. in server side how should i handle the request,it may be any http post or get request,after capturing the data and validating it ,i want to send the response to same requestor from where request came.how can i achieve this .
i have written code for server side ,now i am generating a request and using that code to validate it.but response handling become a problem to me now. my technical knowledge about servlets is not so good.

Hope i am able to describe my problem.Please suggest!
10 years ago
hello everyone,

Greetings !!

i am working with a web application where i have written a servlet to validate the request data.

here is the scenario.

i have servlet on my localhost,which generates the request page with all the neccessory data, and the task of this servlet is just this means to create html page with some values in it,or later they can be entered.when i submit the details then it goes to another server

e.g like i am using tomcat ,so my server is http://localhost:8080/requestGenrator.html and this servlet will create an html page with many details.

now i have hardcoded the server details in my requestGenerator servlet like "http://otherserverdetails :8020/ValidateServlet"

on other server i have a ValidateServlet which will validate the servlet and send the response to Me.

everything working fine, but when i click the submit button from my requestGenertor.html then url becomes "http://otherserverdetails:8020/ValidateServlet" which i think is fine because that is where the request has to be validated, but when i get the response from server the url remain the same. which i guess should be "http://myserverdetails:myPort/responseMessage" .

how can i achieve this ,or am i right on understanding . that ValidatorServlet is written by me and i have deployed the code in another tomcate server in some other machine and now i am sending request from my machine to that server. i am getting the response but my browser still showing me the server url and details...is it something like, that i have moved to server. if yes how can receive the response from server.

i have used simple out.println() to send the response from server. no forwards and dispatchers are being used.

Please share your suggestions.

Thanks in advance.
10 years ago
hi i am working with struts 2 with hibernate .

i want to use validation framework with my application ,and i made ApplicationResources.properties file under src/resources/ .

and the myAction-validation.xml in the package where my action class is located.

but m not able to work with it,i started using a simple text field in my jsp


i have used valdiation framework with struts1.x it was cool there but this is first time m working with struts2. Please suggest


10 years ago