You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kace <me...@hotmail.com> on 2007/03/17 00:08:23 UTC

creating user url...

Hi fellas,

I am looking to develop the following and would be grateful if anyone can
offer any assistance as to how I can make it happen - what do i have to read
up on etc.  ive developed my app in jsf/hibernate and spring and i have this
still to work out.

I would like to give users access  from their own url e.g.
www.domain-name.com/~companyname which should be set automatically upon
registration (if that is possible).   Would be hosting on tomcat.

Any advice would be appreciated.

thanks
kace




-- 
View this message in context: http://www.nabble.com/creating-user-url...-tf3417316.html#a9524122
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: creating user url...

Posted by EDMOND KEMOKAI <ek...@gmail.com>.
You can create directories using the java.io package. Unless you're going to
store a lot of per company info like images and such, using the getPathInfo
is the better solution. Even if you want to store per company data, you can
store all such files in one directory with ids stored in a database. So for
instance if you want to store logo.png for each company, you'll have a
directory called "logo" and a database table called logo with company id as
a key and logo id as another column. Then you can use the logo id as part of
the file name.

On 3/17/07, kace <me...@hotmail.com> wrote:
>
>
> thanks Edmond, ill google for getPathInfo().  Can the directory for each
> company be created on the fly?
>
> Kace
> --
> View this message in context:
> http://www.nabble.com/creating-user-url...-tf3417316.html#a9528021
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)

Re: creating user url...

Posted by kace <me...@hotmail.com>.
thanks Edmond, ill google for getPathInfo().  Can the directory for each
company be created on the fly?

Kace
-- 
View this message in context: http://www.nabble.com/creating-user-url...-tf3417316.html#a9528021
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: creating user url...

Posted by EDMOND KEMOKAI <ek...@gmail.com>.
I have never implemented such a solution but I know a lot of sites have
similar setup. There are two ways you could do it, one would be to create a
directory for each company and then drop an index.jsp file in there . A
second and perhaps better solution would be to get the path info of the
request from javax.servlet.http.HttpServletRequest.getPathInfo().

so in essence whenever a request comes to your servlet, getPathInfo would
extract the part that has the company name. Google to get further info.

On 3/16/07, kace <me...@hotmail.com> wrote:
>
>
> Hi fellas,
>
> I am looking to develop the following and would be grateful if anyone can
> offer any assistance as to how I can make it happen - what do i have to
> read
> up on etc.  ive developed my app in jsf/hibernate and spring and i have
> this
> still to work out.
>
> I would like to give users access  from their own url e.g.
> www.domain-name.com/~companyname which should be set automatically upon
> registration (if that is possible).   Would be hosting on tomcat.
>
> Any advice would be appreciated.
>
> thanks
> kace
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/creating-user-url...-tf3417316.html#a9524122
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
"talk trash and carry a small stick."
PAUL KRUGMAN (NYT)