JavaTechie

Its all about Technology

How to Remove jsessionid from URL December 31, 2008

Filed under: Java — javatechie @ 9:05 am
Tags: ,

This is standard J2EE behavior.  When you start a HTTP session, the
session ID is appended to the URL and a cookie is set.  If the browser
has cookies enabled, the JSESSIONID is not used on subsequent requests.

Here is a urlrewrite rule to get rid of it, substitute JSESSIONID for
the name of the parameter your app server uses to track sessions.

<outbound-rule encodefirst=”true”>
<name>Strip URL Session ID’s</name>
<from>^(.*?)(?:\;JSESSIONID=[^\?#]*)?(\?[^#]*)?(#.*)?
$</from>
<to encode=”false”>$1$2$3</to>
</outbound-rule>

Just be aware that removing the session id will make sessions not work
for clients that do not support cookies.

 

pop3: refused connect from ipadress December 20, 2008

Filed under: Uncategorized — javatechie @ 7:14 am
Tags:

I have already posted sshd problem. This problem is also related to this only. I googled lot about this problem but no solution. So i tried adding pop3: ipaddress: ALLOW in hosts.allow. Bingo it worked.

 

sshd: refused connect from ::ffff December 19, 2008

Filed under: Uncategorized — javatechie @ 6:16 am
Tags:

Hello friends i faced this problem before 2 days.. To solve this problem you have to see hosts.deny and hosts.allow files under /etc/. So you have to add your ISP or Local ip address in hosts.allow files as
sshd sshd1 sshd2 : ipaddress : ALLOW
and in hosts.deny ALL:ALL so that other hosts are not allowed.

 

Replace Single Quote in Java using str.replaceAll() December 10, 2008

Filed under: Java — javatechie @ 12:12 pm
Tags:

String input = “Replace Single Quote’s in Java”;
String output = input.replaceAll(” ‘ “, “\\\\’ “);
System.out.println(output);