Process.getInputStream() and process.waitfor() block in web application

Hi folks,
i am really stuck with a problem which drives me mad.....
What i want:
I want to call the microsoft tool "handle" (see http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/Handle.mspx) from within my web-application.
Handle is used to assure that no other process accesses a file i want to read in.
A simple test-main does the job perfectly:
public class TestIt {
   public static void main(String[] args){
      String pathToFileHandleTool = "C:\\tmp\\Handle\\handle.exe";
      String pathToFile = "C:\\tmp\\foo.txt";
      String expectedFileHandleSuccessOutput = "(.*)No matching handles found(.*)";
      System.out.println("pathToFileHandleTool:" + pathToFileHandleTool);
      System.out.println("pathToFile: " + pathToFile);
      System.out.println("expectedFileHandleSuccessOutput: " + expectedFileHandleSuccessOutput);
      ProcessBuilder builder = null;
      // check for os
      if(System.getProperty("os.name").matches("(.*)Windows(.*)")) {
         System.out.println("we are on windows..");
      } else {
         System.out.println("we are on linux..");
      builder = new ProcessBuilder( pathToFileHandleTool, pathToFile);
      Process process = null;
      String commandOutput = "";
      String line = null;
      BufferedReader bufferedReader = null;
      try {
         process = builder.start();
         // read command output
         bufferedReader = new BufferedReader(new InputStreamReader(process.getInputStream()));
          while((line = bufferedReader.readLine()) != null) {
             commandOutput += line;
          System.out.println("commandoutput: " + commandOutput);
         // wait till process has finished
         process.waitFor();
      } catch (IOException e) {
         System.out.println(e.getMessage());
         e.printStackTrace();
      }  catch (InterruptedException e) {
         System.out.println(e.getMessage());
         e.printStackTrace();      }
      // check output to assure that no process uses file
      if(commandOutput.matches(expectedFileHandleSuccessOutput))
         System.out.println("no other processes accesses file!");
      else
         System.out.println("one or more other processes access file!");
} So, as you see, a simple handle call looks like
handle foo.txtand the output - if no other process accesses the file - is:
Handle v3.2Copyright (C) 1997-2006 Mark RussinovichSysinternals - www.sysinternals.com
No matching handles found.
no other processes accesses file!(Wether the file exists or not doesnt matter to the program)
If some processes access the file the output looks like this:
commandoutput: Handle v3.2Copyright (C) 1997-2006 Mark RussinovichSysinternals - www.sysinternals.com
WinSCP3.exe        pid: 1108    1AC: C:\tmp\openSUSE-10.2-GM-i386-CD3.iso.filepart
one or more other processes access file!So far, so good.........but now ->
The problem:
If i know use the __exact__ same code (even the paths etc. hardcoded for debugging purposes) within my Servlet-Webapplication, it hangs here:
while((line = bufferedReader.readLine()) != null) {if i comment that part out the application hangs at:
process.waitFor();I am absolutely clueless what to do about this....
Has anybody an idea what causes this behaviour and how i can circumvent it?
Is this a windows problem?
Any help will be greatly appreciated.....
System information:
- OS: Windows 2000 Server
- Java 1.5
- Tomcat 5.5
More information / What i tried:
- No exception / error is thrown, the application simply hangs. Adding
builder.redirectErrorStream(true);had no effect on my logs.
- Tried other readers as well, no effect.
- replaced
while((line = bufferedReader.readLine()) != null)with
int iChar = 0;
              while((iChar = bufferedReader.read()) != -1) {No difference, now the application hangs at read() instead of readline()
- tried to call handle via
runtime = Runtime.getRuntime();               
Process p = runtime.exec("C:\\tmp\\Handle\\handle C:\\tmp\\foo.txt");and
Process process = runtime.exec( "cmd", "/c","C:\\tmp\\Handle\\handle.exe C:\\tmp\\foo.txt");No difference.
- i thought that maybe for security reasons tomcat wont execute external programs, but a "nslookup www.google.de" within the application is executed
- The file permissions on handle.exe seem to be correct. The user under which tomcat runs is NT-AUTORIT-T/SYSTEM. If i take a look at handle.exe permission i notice that user "SYSTEM" has full access to the file
- I dont start tomcat with the "-security" option
- Confusingly enough, the same code works under linux with "lsof", so this does not seem to be a tomcat problem at all
Thx for any help!

Hi,
thx for the links, unfortanutely nothing worked........
What i tried:
1. Reading input and errorstream separately via a thread class called streamgobbler(from the link):
          String pathToFileHandleTool = "C:\\tmp\\Handle\\handle.exe";
          String pathToFile = "C:\\tmp\\foo.txt";
          String expectedFileHandleSuccessOutput = "(.*)No matching handles found(.*)";
          logger.debug("pathToFileHandleTool: " + pathToFileHandleTool);
          logger.debug("pathToFile: " + pathToFile);
          logger.debug("expectedFileHandleSuccessOutput: " + expectedFileHandleSuccessOutput);
          ProcessBuilder builder = new ProcessBuilder( pathToFileHandleTool, pathToFile);
          String commandOutput = "";
          try {
               logger.debug("trying to start builder....");
               Process process = builder.start();
               logger.debug("builder started!");
               logger.debug("trying to initialize error stream gobbler....");
               StreamGobbler errorGobbler = new StreamGobbler(process.getErrorStream(), "ERROR");
               logger.debug("error stream gobbler initialized!");
               logger.debug("trying to initialize output stream gobbler....");
               StreamGobbler outputGobbler = new StreamGobbler(process.getInputStream(), "OUTPUT");
               logger.debug("output stream gobbler initialized!");
               logger.debug("trying to start error stream gobbler....");
               errorGobbler.start();
               logger.debug("error stream gobbler started!");
               logger.debug("trying to start output stream gobbler....");
               outputGobbler.start();
               logger.debug("output stream gobbler started!");
               // wait till process has finished
               logger.debug("waiting for process to exit....");
               int exitVal = process.waitFor();
               logger.debug("process terminated!");
               logger.debug("exit value: " + exitVal);
          } catch (IOException e) {
               logger.debug(e.getMessage());
               logger.debug(e);
          }  catch (InterruptedException e) {
               logger.debug(e.getMessage());
               logger.debug(e);
     class StreamGobbler extends Thread {
          InputStream is;
         String type;
         StreamGobbler(InputStream is, String type) {
             this.is = is;
             this.type = type;
         public void run() {
              try {
                 InputStreamReader isr = new InputStreamReader(is);
                 BufferedReader br = new BufferedReader(isr);
                 String line=null;
                 logger.debug("trying to call readline() .....");
                 while ( (line = br.readline()) != null)
                     logger.debug(type + ">" + line);   
             } catch (IOException ioe) {
                     ioe.printStackTrace(); 
     }Again, the application hangs at the "readline()":
pathToFileHandleTool: C:\tmp\Handle\handle.exe
pathToFile: C:\tmp\openSUSE-10.2-GM-i386-CD3.iso
expectedFileHandleSuccessOutput: (.*)No matching handles found(.*)
trying to start builder....
builder started!
trying to initialize error stream gobbler....
error stream gobbler initialized!
trying to initialize output stream gobbler....
output stream gobbler initialized!
trying to start error stream gobbler....
error stream gobbler started!
trying to start output stream gobbler....
output stream gobbler started!
waiting for process to exit....
trying to call readline().....
trying to call readline().....Then i tried read(), i.e.:
     class StreamGobbler extends Thread {
          InputStream is;
         String type;
         StreamGobbler(InputStream is, String type) {
             this.is = is;
             this.type = type;
         public void run() {
              try {
                 InputStreamReader isr = new InputStreamReader(is);
                 BufferedReader br = new BufferedReader(isr);
                 logger.debug("trying to read in single chars.....");
                 int iChar = 0;
                 while ( (iChar = br.read()) != -1)
                     logger.debug(type + ">" + iChar);   
             } catch (IOException ioe) {
                     ioe.printStackTrace(); 
     }Same result, application hangs at read()......
Then i tried a dirty workaround, but even that didnt suceed:
I wrote a simple batch-file:
C:\tmp\Handle\handle.exe C:\tmp\foo.txt > C:\tmp\handle_output.txtand tried to start it within my application with a simple:
Runtime.getRuntime().exec("C:\\tmp\\call_handle.bat");No process, no reading any streams, no whatever.....
Result:
A file C:\tmp\handle_output.txt exists but it is empty..........
Any more ideas?

Similar Messages

  • Runtime error and unable to create new web application

    Hi
    when i create new web application i faced this error Runtime error and unable to create new web application.
    in this farm we have
    2 wfe servers
    2 application servers.
    adil

    Adil,
    There could be many reason like IIS issue, Space issue, Permission issue, SQL issue which is not possible us to guess rather
    you need to jump in the SharePoint log(Program Files\Common files\Microsoft Shared\Web Server Extensions\14\LOGS) and find out the specific error log its throwing after which trouble shoot can be start.
    You can refer few similar threads here -
    Link
    Please 'propose as answer' if it helped you, also 'vote helpful' if you like this reply.

  • Processing exported data from web application

    Hi all,
    here's my problem: I've got a Web Application designed in WAD and want to get the current navigation state (which is in the data provider) into an external application (i.e. a web service). What I already tried was to export the navigation state via SAP_BW_URL COMMAND='EXPORT' FORMAT='XML' and redireted it to a web service. But I wasn't able to get the XML document, I only got a XML_ID (as you can see in forum thread Accessing XML File).
    Has anyone another approach to get the data exported and ready to be processed by a custom web service or external application (ABAP FM,..)?
    Thanks in advance and best regards!
    Dominik

    Dear Dominik,
    maybe is XMLA for Analysis in BW a solution for you:
    try this links
    http://help.sap.com/saphelp_nw04/helpdata/en/ba/e380e03c3a4dbf8cf082f0c910f9cf/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/content.htm
    This a SOAP Web Service which gives back query content, the query is defined within MDX Statement in a XML file.
    There also exists a detailed How To Document in SAP Service Marketplace - but unfortunately i can´t found it.
    Regards
    Marcus

  • Creating Extranet and Intranet in a single web application?

    I'm confused ... again! Maybe you can help.
    Microsoft's best practices for setting up SharePoint 2013 is to utilize a single web application in a single web application pool.
    My Network Topology
    I am setting up my intranet AND extranet in a back-to-back perimeter network topology using Claims and Kerberos Constrained Delegation. I will have a dedicated AD instance on the DMZ which my clients will be added to. My corporate users will access the site
    via ADFS using their credentials on our internal network. There will be only a One Way Trust wherein the extranet AD will trust the corporate AD. We will be using Host named site collections and giving clients their own URL. They will basically be accessing
    a single list and perhaps a page that gives them some reports about tasks across a few sub-sites and the a status of a single workflow on the root site of their site collection.
    My SharePoint Topology
    I would like to follow MS' Best Practice as stated above but I'm not clear on a few things.
    1. Does it matter whether my extranet or intranet is on the Default Zone? I'm thinking that the intranet should be on the default since that is where Search crawls and that's the only place where search will be used in any way.
    Is it possible to have two sets of permissions on a single web application, one for internal and one for external, without extending the default zone to create the extranet and thereby creating a new IIS website (webapp) in the process?
    Thank you!
    Love them all...regardless. - Buddha

    Hi,
    Please refer below.
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/47081f77-fccb-4bc3-906b-76d187861f8c/intranet-and-extranet-web-applications-on-same-port?forum=sharepointadminlegacy
    http://blogs.technet.com/b/speschka/archive/2013/06/26/logical-architecture-guidance-for-sharepoint-2013-part-1.aspx
    https://social.msdn.microsoft.com/Forums/sharepoint/en-US/c0702003-8d53-46cf-ac09-49cbd270a43e/extranet-access-to-the-intranet-web-application-sharepoint-2010?forum=sharepointgeneralprevious
    Krishana Kumar http://www.mosstechnet-kk.com
    Please mark the replies and Proposed as answer if they help and solve your issue

  • Can I copy text from a website or Facebook account and paste it into another web application?

    Can someone read my question above and help to resolve. It does not make sense that I cannot copy from the web????

    I've done it. Select your text, copy and then go into the other application and paste it.
    If you want to see what it'll look like you can open the notes app or a word processing app and paste it there, then into your final destination.

  • How do I get info from Active Directory and use it in my web-applications?

    I borrowed a nice piece of code for JNDI hits against Active Directory from this website: http://www.sbfsbo.com/mike/JndiTutorial/
    I have altered it and am trying to use it to retrieve info from our Active Directory Server.
    I altered it to point to my domain, and I want to retrieve a person's full name(CN), e-mail address and their work location.
    I've looked at lots of examples, I've tried lots of things, but I'm really missing something. I'm new to Java, new to JNDI, new to LDAP, new to AD and new to Tomcat. Any help would be so appreciated.
    Thanks,
    To show you the code, and the error message, I've changed the actual names I used for connection.
    What am I not coding right? I get an error message like this:
    javax.naming.NameNotFoundException[LDAP error code 32 - 0000208D: nameErr DSID:03101c9 problem 2001 (no Object), data 0,best match of DC=mycomp, DC=isd, remaining name dc=mycomp, dc=isd
    [code]
    import java.util.Hashtable;
    import java.util.Enumeration;
    import javax.naming.*;
    import javax.naming.directory.*;
    public class JNDISearch2 {
    // initial context implementation
    public static String INITCTX = "com.sun.jndi.ldap.LdapCtxFactory";
    public static String MY_HOST = "ldap://99.999.9.9:389/dc=mycomp,dc=isd";
    public static String MGR_DN = "CN=connectionID,OU=CO,dc=mycomp,dc=isd";
    public static String MGR_PW = "connectionPassword";
    public static String MY_SEARCHBASE = "dc=mycomp,dc=isd";
    public static String MY_FILTER =
    "(&(objectClass=user)(sAMAccountName=usersignonname))";
    // Specify which attributes we are looking for
    public static String MY_ATTRS[] =
    { "cn", "telephoneNumber", "postalAddress", "mail" };
    public static void main(String args[]) {
    try { //----------------------------------------------------------        
    // Binding
    // Hashtable for environmental information
    Hashtable env = new Hashtable();
    // Specify which class to use for our JNDI Provider
    env.put(Context.INITIAL_CONTEXT_FACTORY, INITCTX);
    // Specify the host and port to use for directory service
    env.put(Context.PROVIDER_URL, MY_HOST);
    // Security Information
    env.put(Context.SECURITY_AUTHENTICATION, "simple");
    env.put(Context.SECURITY_PRINCIPAL, MGR_DN);
    env.put(Context.SECURITY_CREDENTIALS, MGR_PW);
    // Get a reference toa directory context
    DirContext ctx = new InitialDirContext(env);
    // Begin search
    // Specify the scope of the search
    SearchControls constraints = new SearchControls();
    constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
    // Perform the actual search
    // We give it a searchbase, a filter and the constraints
    // containing the scope of the search
    NamingEnumeration results = ctx.search(MY_SEARCHBASE, MY_FILTER, constraints);
    // Now step through the search results
    while (results != null && results.hasMore()) {
    SearchResult sr = (SearchResult) results.next();
    String dn = sr.getName() + ", " + MY_SEARCHBASE;
    System.out.println("Distinguished Name is " + dn);
    // Code for displaying attribute list
    Attributes ar = ctx.getAttributes(dn, MY_ATTRS);
    if (ar == null)
    // Has no attributes
    System.out.println("Entry " + dn);
    System.out.println(" has none of the specified attributes\n");
    else // Has some attributes
    // Determine the attributes in this record.
    for (int i = 0; i < MY_ATTRS.length; i++) {
    Attribute attr = ar.get(MY_ATTRS);
    if (attr != null) {
    System.out.println(MY_ATTRS[i] + ":");
    // Gather all values for the specified attribute.
    for (Enumeration vals = attr.getAll(); vals.hasMoreElements();) {
    System.out.println("\t" + vals.nextElement());
    // System.out.println ("\n");
    // End search
    } // end try
    catch (Exception e) {
    e.printStackTrace();
    System.exit(1);
    My JNDIRealm in Tomcat which actually does the initial authentication looks like this:(again, for security purposes, I've changed the access names and passwords, etc.)
    <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99"
    connectionURL="ldap://99.999.9.9:389"
    connectionName="CN=connectionId,OU=CO,dc=mycomp,dc=isd"
    connectionPassword="connectionPassword"
    referrals="follow"
    userBase="dc=mycomp,dc=isd"
    userSearch="(&(sAMAccountName={0})(objectClass=user))"
    userSubtree="true"
    roleBase="dc=mycomp, dc=isd"
    roleSearch="(uniqueMember={0})"
    rolename="cn"
    />
    I'd be so grateful for any help.
    Any suggestions about using the data from Active directory in web-application.
    Thanks.
    R.Vaughn

    By this time you probably have already solved this, but I think the problem is that the Search Base is relative to the attachment point specified with the PROVIDER_URL. Since you already specified "DC=mycomp,DC=isd" in that location, you merely want to set the search base to "". The error message is trying to tell you that it could only find half of the "DC=mycomp, DC=isd, DC=mycomp, DC=isd" that you specified for the search base.
    Hope that helps someone.
    Ken Gartner
    Quadrasis, Inc (We Unify Security, www -dot- quadrasis -dot- com)

  • Logotype and Current Date in PDF - Web Applications

    Is possible to insert an image (company logotype) and a text (title and date) in PDF generate through “Printed Version” functionality? The generated PDF only contains result table of the report.
    By the way, how can I insert current date in a web application? I don’t want to use javascript because javascript would return de time/date of the end user computer.
    Thanks in advance.
    Best regards,
    Raphael Barboza

    Hi Raphael,
    Q1) Is possible to insert an image (company logotype) and a text (title and date) in PDF generate through “Printed Version” functionality? The generated PDF only contains result table of the report??
    A)In PDF Print Properties you should be able enter "Title and Date" and also When you define command sequence make sure to call "Analaysis Item only" otherwise the whole template will be downloaded to PDF. Please play with the properties when defining Command Sequence.
    Q2) how can I insert current date in a web application? I don’t want to use javascript because javascript would return de time/date of the end user computer ???
    A) Use Web Template "TEXT ITEM" and in the web item properties "LAST UPDATED or KEY DATE" is the property you should assign.
    Sorry I dont have my system as of now to send you code for these but they are pretty easy.
    thanks,
    Deepak
    SAP BI Consultant
    D N Tech

  • How to dynamically define a file name and its path in a web application

    Hi, I want to create a simple web application that reads from an XML file and displays the data back to the user. The xml file is created independent of my application on the same machine that the Application Server runs. How can I define my xml file name and/or path to be independent of my code and not hard-coded in my application?

    By an external configurationfile? That can be a propertiesfile, a xml file, an ini file, a plain vanilla txt file, etcetera.

  • Look And Feel (branding) change in web application?

    I am doing a research and I neeed advice from people who have more experience in dynamic customizing of java web applications.
    In my custom case I have a simple login page with some images, labels and so on. The idea is to implement it in such a way to allow easy customization of some parts from the page.
    For example let's say that the application is used by company AAA. Thay might want to change the logo image with their own image and change the default 'disclaimer' text with some other text by using appropriate admin module which allows user-friendly interaction.
    The task seems very easy and it really IS very easy, I just wonder if there are any 'best practices' for such a situation.
    One approach is to define all changable resources in standard .properties file. Having in mind that I have < 10 changable resources this seems reasonable enough. Anyway I still prefer to use additional table with two columns (key->value) which is the same as using .properties file, only the API to access these resources would be slightly different. I have in mind that the DB approach is somehow more flexible because in the future I might need more changable resources in more than one page, and reading/writing large .properties file might not be the best solution.
    Any recommendations or other approaches to solve the 'problem'?

    U have an another option "XML".
    sample :
    <profile>
    <company1>
    <logo></logo>
    <disclaimer></disclaimer>
    </company1>
    <company2>
    <logo></logo>
    <disclaimer></disclaimer>
    </company2>
    </profiles>

  • Good for processing data from a web application?

    It seems like all the examples provided for ASA are about processing data streaming in from IoT or mobile apps. Is ASA appropriate for processing data from websites? For example, I have a multi-tenant web API and I need to roll up usage and calculate billing
    for my clients. My clients can upload resources with me which I store in blob storage. But blob storage gives me no way of knowing how many resources have been uploaded and how long I have stored them. Would ASA be a good fit for calculating these figures?

    I have solved this task in folowing way:
    I have add ADF read only form to my page (which I need anyway). The form displays data selected in the graph (using another VO, which is linked to graph VO). Command button calls my managed bean, which handles the data via the bindings executables (view iterators).

  • Separating heavy duty business process from web application

    I'm working with a web application that just runs in a Servlet container, Jetty actually. I'm wondering what the best way to separate resource intensive processes, such as a search indexing process, from the main web application. These resource intensive processes might run at scheduled times, or they might be triggered by the events in the web application. I assume the second thing might incur much more complications on the solutions. I have a lot of questions about this, but for now, I'd just like to have some folks point out the common solutions. Changing to a EE application server is NOT an option.

    chadmichael wrote:
    Couple of questions:
    1) What's the benefit of going to another app if you're still on the same server? I'm not being coy, I'm just trying to get a feel for the pros and cons. You could always run something on a timer from within the web application. Is there a performance benefit from being in another JVM? Then run it on the same server. No need to run it on another server if a separate JVM will do it for you.
    2) How would you communicate with the main app if you needed to receive events or something? RMI?You stated it was on a timer. There is no need to be on the same server to run things from a timer. If it needs to be event driven a simple way would be to set up a separate instance of Tomcat (or Jetty) on the same or different server. Refactor out what ever the offending code is into separate servlet and have your main app just send the events off to the other instance.
    There are a lot of ways to go about this. They depend on what your needs are.

  • Single Sign on using SAML between JWS application and Web Application

    Hi,
    We have two applications one is swing based Java Web Start application and other is a normal web application. We are trying to enable single sign on between both the applications. Can SAML be used to enable single sign on? If yes, can some one let us know how to do this?
    Thanks,
    Rama

    Thanks. But it is based on two WEB applications deployed on two different weblogic domains. What I am looking for is one application which is launched using Java Web Start(JNLP) and other a web application. The Java Web Start application uses its proprietary authentication implementation and the web application used DefaultAuthenticator of weblogic. Hope this detail will help you to answer my question better. I should have given this information earlier.
    Thanks.
    Rama

  • Configure Service Principle Name for Application Pool account and web application?

    Hello Community
        On WS2012 Server running Sharepoint 2013 Server when you
    configure SPN you configure it for the SQL server object "MSSQLSvc" (domain account)
    and the user object "HTTP" (domain account).
        The question is if you also should configure SPN for the Application Pool account and
    configure SPN for the web application, how do you configure SPN for the Application Pool
    account and the web application?
        Thank you
        Shabeaut

    The Web Application is only an IIS Site. You're configuring the SPN for the Domain User running the IIS Application Pool (that the Web Application (IIS Site) leverages).
    So you would just need to use the format of:
    setspn -A HTTP/webAppUrl domain\iisapppoolacctusername
    setspn -A HTTP/webAppUrl.fqdn.com domain\iisapppoolacctusername
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • How do I define my web application path in Tomcat6

    Hi friends,
    Can anybody tell me how to define and where to define my web-application path in tomcat 6 server?
    I absolutely don't want to change any files inside tomcat6\conf\ folder (like its server.xml or context.xml)
    My problem comes in the following scenario:
    i) My Webapplication path is c:\tomcat6\webapps\test-servletii) I have one html form file registration.html in c:\tomcat6\webapps\test-servlet\registration.htmliii) I have a form processing servlet in path c:\tomcat6\webapps\test-servlet\WEB-INF\classes\pkg_register\Process_Registration.classiv) web.xml file inside WEB-INF\ has contents
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
       version="2.5">    
    <servlet>
         <servlet-name>Process_Registration</servlet-name>
         <servlet-class>pkg_register.Process_Registration</servlet-class>     
    </servlet>
    <servlet-mapping>
         <servlet-name>Process_Registration</servlet-name>
         <url-pattern>/Process_Registration</url-pattern>
    </servlet-mapping>
    </web-app>PROBLEM : In html <form action="/test-servlet/Process_Registration"> works fine.
    But every time I don't want to give my web application folder name in URLs( not in web.xml or in form action, it should be default relative path).
    I want to give just, <form action="/Process_Registration"> in registration.html file's form action.
    Any help is appreciated.
    Thanks.
    ---Sujoy

    Thanks...
    It solved the problem by putting <form action="Process_Registration"> instead of <form action="/Process_Registration">When I was using <form action="/Process_Registration"> it was directly taking me to
    http://localhost:8888/Process_Registration .
    But, now when i use <form action="Process_Registration"> it takes me to
    http://localhost:8888/test-servlet/Process_Registration which IS CORRECT.
    But, still i don't know why the <form action="/Process_Registration"> was taking me out of my current webapplication path. It should have given me ERROR.
    --Sujoy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Can not restart Microsoft SharePoint Foundation Web Application after stopping

    All, thanks for any help.
    I have a SP2010 instance running and am in the process of adding custom web parts, activities, and timer jobs.  As part of troubleshooting an odd problem where my code did not seem to be getting updated on deployments, I decided to try restarting the
    Microsoft SharePoint Foundation Web Application in Central Administration/Services on Server.  It stopped well enough, but on restart it now fails with the error "Expression must evaluate to a node-set.
    ".  I thought it might have something to do with the updated web.config, so I took it back to the original one, but the problem still persists.  I have tried multiple PC restarts and iisresets, along with trying to start the service via the use of
    stsadm.  My SP2010 instance is deployed on a Windows Vista box for testing.  I have successfully deployed this very same custom timer job to that very box in the past; it just won't deploy now and the Microsoft SharePoint Foundation Web Application
    constantly shows "error starting" on the Services on Server page.
    As a result I can no longer deploy timer jobs - they deploy but never show up Central Administration after deployment, and never execute.  Can anyone tell me how to get Microsoft SharePoint Foundation Web Application to restart?
    ~Thanks!
    Mitch

    Old post, but in case others come across this. From:
    http://sharepointumar.wordpress.com/2013/10/11/restart-microsoft-sharepoint-foundation-web-application-service-stuck-at-stopping/comment-page-1/#comment-146
    Stop it by running:
    $svc = Get-SPServiceInstance | where {$_.TypeName -like "*Foundation Web*"}
    $svc.Status = "Offline"
    $svc.Update()
    And then start:
    $svc = Get-SPServiceInstance | where {$_.TypeName -like "*Foundation Web*"}
    $svc.Status = "Online"
    $svc.Update()
    Optionally, you may need to run (I didn't):
    $wa = Get-SPWebApplication http://webAppUrl
    $wa.ProvisionGlobally()
    Ben Weeks
    SharePoint Consultant @ Webtechy Ltd
    T: +441223922070 F: +448701315220
    Web: http://www.webtechy.co.uk Blog:
    http://blog.webtechy.co.uk

Maybe you are looking for

  • Boot from 10.4.8 Install CD causes kernel panic

    I spent 3 months convincing my boss that I would not settle for anything but a Mac for a new laptop and that I would rather use my old beat up G4 than the best Dell had to offer. My incesant begging finally worked and I got one. Not one day after tak

  • Hanging on Loading Screen

    We are using Presenter v7.07 and have a quiz embedded. When we export to presenter, the file 'hangs' on the loading screen. When we changed the 'viewer.xml' file to an older version of the file it works fine - although obviously we cannot use the old

  • WSUS - Clients stopped reporting on downstream replicas

    Just looking for some advice on what could be wrong here. Some of our downstream WSUS replicas have stopped 'receiving' updates from machines on the network.  Below is an example of one group affected.  In this case WSUS is on a 2003 server but there

  • AdvancedDatagrid scroll bar buttons

    Hello Guys, I've created an AdvancedDataGrid and i've populated it with an XML file. I need to increase the size of the Scroll Bar buttons. Is it possible? How can I do? byee!

  • Pacman + -Syu = system freeze

    I cannot post console output because system freeze so i cannot cut& paste. My pacman output is localized so my translation may not be 100% accurate After i pacman -Syu i get a list of packages hit y they get downloaded then pacman is checking depende