Gaurav Chikara

Ranch Hand
+ Follow
since Jun 09, 2000
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Gaurav Chikara

Welcome Yakov Fain & Anton Moiseev

I always want o learn new technologies

I just learnt React. Angular is also upcoming language in recent years

Does your book tells why Angular is better than other languages like php,React etc?
Hi Anthony
I have one question on the topic mentioned above
Which Java API shall we know by heart?
There was a case that in interview question interviewers stared grilling me on Thread and API asking what are new things in Java 1.6
I was out of touch of latest in Java API and didn't do good
8 years ago
I am looking for some sample to start with so that I can parse String containing xml using Javax.xml.parsers.SAXParser;
Any inputs are appreciated

Yes, that's true. And if you need your servlet to have access to a UNC path like \\server\etc, here's what you have to do:

  • Create a user profile which has read/write access to that path (don't use your account, make a new one just for this)
  • Configure the service where the servlet container runs, and have it log in as that user profile

  • Thanks a lot for the reply
    I am not sure how to achive the point 2 suggested. Is there some help around (which you are available that can help me in knowing its details)

    13 years ago
    I have mapped my "R" drive to a network shared location (I have read/write access to this shared location)

    When I am trying to create file using Servlet Action class I get the following error
    R:\SUNONELOCAL.txt (The system cannot find the path specified)

    but if I try to do the same through standalone program it works fine

    Can anyone please suggest what could be the reason for it

    Thanks in advance

    From standalone program

    From Action class code is

    13 years ago
    I have tab characters stored as delemitors in a string like

    String str = "\t\t";

    When I use Printstream and try to print tab .My intention is to created tab seperations in file but
    when i see file comes up like this


    But when I use ps.write("\t\t"); (Putting value directly in printstream
    My results are correct as expected


    Is there a way we can get the first case working ?

    Thanks in advance

    13 years ago
    Dear All

    I have a requirement to have a backup copy of orginal HashMap so that when some deletion,addition is done on original HashMap I can use a backup Map to track it

    My Map structure is like this

    key-----value (nested Map)
    key-----value (nested Map)
    key-----value (List)

    I am not able to have a backup copy as whenever something happens to original copy backup copy is also getting affected with same operation

    If anyone can please help as I am really stuck

    13 years ago
    I am using XYChart and its API's
    I am facing the following problem

    The getHTMLImageMap of this class returns a dymanic tags list something like
    <area shape="rect" coords="58,255,77,255" title='BC: 5 ' href="javascript:sbmt(bpid[0],'');">
    <area shape="rect" coords="95,255,114,255" title='BS: 3 ' href="javascript:sbmt(bpid[1],'');">
    <area shape="rect" coords="131,255,150,255" title='FB: 1 ' href="javascript:sbmt(bpid[2],'');">
    <area shape="rect" coords="167,255,186,255" title='FB: 1 ' href="javascript:sbmt(bpid[3],'');">
    <area shape="rect" coords="204,66,223,255" title='FI: 28121 ' href="javascript:sbmt(bpid[4],'');">

    problem is that in the last entry I have thousands of records so bar grpah become tallest and we get a clikable area as the wall of this graph

    But the remaiining graphs contain only 1 record so I don't get their height and also I cannot even click on their top to call the javascript function
    Is there a way to make top of BarGraph as clickable ?

    Yeah all set of inserts are with in a same transaction
    Therefore ideally shall be there any synchrnonization issues?
    Your Logic is quite fuzzy
    As said by earlier respondent please move all JDBC related code to some Controller or some Business Layer

    Please don't open connections in jsp.

    You can't handle exceptions in elegant way here

    Besides this,move our actions event oriented Like on clicking of some button pass the values from jsp to some servlet and there insert values appropriately
    Dear All
    I am facing a strange issue. We have to delete some roles from our application .As per business logic before deletion of roles we store them into ou archive table and once they are stored then we delete them from our main table

    This logic works fine with single user environment but whenever testing is performed on multi user we are losing the roleName value of the record and getting exception from table

    In our code we are first selecting the record from our main table VT_RE_ROLE
    and putting it into dto.closing prepared ststement,resultset

    opening another preparedststement and now using same dto tryin to insert this record

    Sample code snippet is as follows

    Some how the dto's name property is lost and therefore in subsequent preparedstatement it throws the error mentioned above

    If any one can share some inputs that will be of great help

    If the URL is from the same web app, the session will be retained.

    I am opening a URL to another application but when I am checking the session value for the key I inserted in first application it comes as null.

    The session key of this application contains value before window is popped up but after pop up it loses the value.
    15 years ago
    Dear All
    I am not sure as which section my question fits in therefore I am posting it in jsp forum

    I am openeing a popup window using and the servlet called using that popup window decides which jsp to render
    But when I check session value which I had put before invoking
    in the servlet the session value is null

    I had heard that session is not retained when we pop up a window but am not 100% sure on it.If any one has any idea that will really be helpful

    Thanks in advance
    15 years ago
    Thanks Jim I am using same mechanism with only diff that I am associating a server node name also with My scheduler
    Now my only question is that will it be safe for my scheduler (which extends timer task) to have non-static private variables

    I will be initializing scheduler through constructor and this variable will also be initialsed there itself.
    We are using Netweaver Application Server