jsp - WebApplication not working properly while running Tomcat as service -
i have web application infobase.war
created on eclipse
, hosted on tomcat (7.0.27) (os: windows server 2003)
. index.jsp
of application navigates location on network access files , display on webpage (see complete index.jsp
code below).
the problem application works fine when tomcat
run console
manually running startup.bat
. if tomcat
run service
(through windows services) application runs fails access files on remote machine
, webpage gets displayed error message put such cases (non-access)in code.
the tomcat
service settings through tomcat7w.exe
have been done. heap limit has been increased.
the code index.jsp is:
<html> <head> <title>infobase </title> <link rel="stylesheet" type="text/css" href="my.css"></link> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ //$("div#block").load('https://`inggnh018cfr`:8443/infobase/navigate.do'); //ads //string path="\\\\"+getservletcontext().getinitparameter("server_ip")+getservletcontext().getinitparameter("filepath"); $("div#block").load('https://132.186.18.155:8443/infobase/navigate.do?f=\\\\132.186.198.175\\\\gc_sl_pg\\quota\\efie\\documents\\efie_new\\1.%20quality'); $("div#block1").load('https://132.186.18.155:8443/infobase/navigate.do?f=\\\\132.186.198.175\\\\gc_sl_pg\\quota\\efie\\documents\\efie_new\\2.%20process'); $("div#block2").load('https://132.186.18.155:8443/infobase/navigate.do?f=\\\\132.186.198.175\\\\gc_sl_pg\\quota\\efie\\documents\\efie_new\\3.%20documents'); $("div#block3").load('https://132.186.18.155:8443/infobase/navigate.do?f=\\\\132.186.198.175\\\\gc_sl_pg\\quota\\efie\\documents\\efie_new\\4.%20information%20handbook'); }); function expand(){ // $(obj).click(function(){ obj=window.event.srcelement; if(obj.value=='true'){ //alert('http://localhost:8080/infobase/navigate.do?f='+window.event.srcelement.id); //$.ajax({url:'https://inggnh018cfr:8443/infobase/navigate.do?f='+obj.id ,success:function(result){ $.ajax({url:'https://132.186.18.155:8443/infobase/navigate.do?f='+obj.id ,success:function(result){ //alert(result); //$(obj).append("<div class='panel' id='div-"+obj.id+"'>"+result+"</div>"); $(obj).after(result); //$("div#"+window.event.srcelement.id).load(result); }}); obj.value='false'; //alert('http://inggnh018cfr:8080/infobase/screenserv.do?f='+obj.firstchild.nodevalue); /*screen change*/ //$.ajax({url:'https://132.186.18.155:8443/infobase/screenserv.do?f='+obj.firstchild.nodevalue ,success:function(result){ $.ajax({url:'https://132.186.18.155:8443/infobase/screenserv.do?f='+obj.id,success:function(result){ //alert(result); if(result!=0) //document.getelementbyid("frame").src="\\\\132.186.18.155\\gc_sl_pg\\deptt_quota\\efie\\documents\\efie\\obsolete documents\\ppts\\"+result; { var ppt="\\\\132.186.198.175\\gc_sl_pg\\quota\\efie\\documents\\efie\\obsolete documents\\ppts\\"+result; window.open(ppt); } //else //document.getelementbyid("frame").src="infobase.pps"; //$(obj).append("<div class='panel' id='div-"+obj.id+"'>"+result+"</div>"); //$(obj).after(result); //$("div#"+window.event.srcelement.id).load(result); }}); } else if(obj.value=='false'){ // alert(obj.firstchild.nodevalue); obj.value='true'; // alert(.nodename); $(obj.nextsibling).remove(); //alert('done'); } }
when running console, process runs logged on user - appears - has access network locations. when running service process runs localsystem not have access network locations.
to fix this, create domain user minimum necessary permissions access network locations , configure service run user.
Comments
Post a Comment