Search Results

Search found 2 results on 1 pages for 'amertune'.

Page 1/1 | 1 

  • empty file from tomcat https redirect?

    - by amertune
    I am using tomcat 6.0.20, with jdk 1.6.0_18 on 64 bit linux (tomcat downloaded from tomcat.apache.org, not installed from repositories). I have iptables redirects from port 80 - 8080 and 443 - 8443. In server.xml, the connector for port 8080 redirects to 443, and the 8443 connector has proxyPort="443". In conf/web.xml, I have added this bit at the end of the file (but still inside the <web-app</webapp tags). <security-constraint> <web-resource-collection> <web-resource-name>Protected Context</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint> I also have two contexts, ROOT and mywebapp. If I go to http://myurl.com, then I get redirected to https://myurl.com. If I go to http://myurl.com/mywebapp/, then I get redirected to https://myurl.com/mywebapp/. The problem I'm having is when I go to http://myurl.com/mywebapp (no trailing slash). When I do this I get a prompt to download an empty file that has an empty name. Going to https://myurl.com/mywebapp works. I would think that a user typing myurl.com/mywebapp is far from rare. Is there something I'm missing?

    Read the article

  • How do I get the username in Java (ie, who -m in Java) (or Jython 2.1)

    - by amertune
    Here's the situation. I have a jython 2.1 script in a shared account that needs to know who is calling it. In bash, I can simply use 'who -m' and it will give me the correct username. I haven't been able to find anything in java (or jython) that would give me a similar result. Even trying to call Runtime.getRuntime().exec("who -m") doesn't do anything. When I try to read the InputStream from the process returned by exec, the stream is empty.

    Read the article

1