Re: [Resin-interest] Forward or Redirect

2010-08-19 Thread Riccardo Cohen
In the servlet that receives the request, you can get the current uri: 
request.getRequestURI() and check if it is "/" or more. the 
servlet-mapping cannot help you here because you're at the site root.

one more thing, as you cannot redirect "/" in the conf, what I've done 
is putting a simple code in the very first line of the main index.jsp :

<%UrlManager.in.process_index(request,response);%>

This way every request on "/" will be processed also by the url manager.

On 19/08/10 18:15, Francis, Steve (IHG) wrote:
> Ok..so I believe I will use forward, but the question still remains can
> I have it exact match ONLY if it has nothing following the ".com", as in
> the http://hmisupport.hiw.com  because if I forward anything else, the
> application wouldn't work.  The regexp doc isn't clear on what all the
> special characters mean.
> Thx,
>
>
> Steve Francis
> Technical Advisor - zSeries, zLinux, z/OS
> IHG
> Alpharetta Data Center
> Ph:  770-442-7157
> Cell:  770-906-3122
> IM: francisihg

-- 
Riccardo Cohen
Architecte du Logiciel
http://www.architectedulogiciel.fr
+33 (0)6.09.83.64.49
Membre du réseau http://www.reflexe-conseil-centre.org




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] Forward or Redirect

2010-08-19 Thread Scott Ferguson
Francis, Steve (IHG) wrote:
> Ok..so I believe I will use forward, but the question still remains can
> I have it exact match ONLY if it has nothing following the ".com", as in
> the http://hmisupport.hiw.com  because if I forward anything else, the
> application wouldn't work.  The regexp doc isn't clear on what all the
> special characters mean.
>   

If you use regexp="^/$" you'll exactly match the root. The "^" means 
"only match at the beginning" and the "$" means "only match at the end." 
So "^/$" matches exactly the root and nothing else.

-- Scott
> Thx, 
>
>
> Steve Francis
> Technical Advisor - zSeries, zLinux, z/OS
> IHG
> Alpharetta Data Center
> Ph:  770-442-7157
> Cell:  770-906-3122
> IM: francisihg
>
> -Original Message-
> From: resin-interest-boun...@caucho.com
> [mailto:resin-interest-boun...@caucho.com] On Behalf Of
> resin-interest-requ...@caucho.com
> Sent: Thursday, August 19, 2010 10:55 AM
> To: resin-interest@caucho.com
> Subject: resin-interest Digest, Vol 50, Issue 20
>
> Send resin-interest mailing list submissions to
>   resin-interest@caucho.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>   http://maillist.caucho.com/mailman/listinfo/resin-interest
> or, via email, send a message with subject or body 'help' to
>   resin-interest-requ...@caucho.com
>
> You can reach the person managing the list at
>   resin-interest-ow...@caucho.com
>
> When replying, please edit your Subject line so it is more specific than
> "Re: Contents of resin-interest digest..."
>
>
> Today's Topics:
>
>1. Redirect or forwarding (Francis, Steve (IHG))
>2. ConcurrentModificationException whenInjectManager.findByName
>   (Wesley Wu)
>3. Re: Redirect or forwarding (Riccardo Cohen)
>4. JSP error page -- javax.servlet.error.exception not
>   accessible? (Marcin Koziej)
>5. Resin 4,maven plugin complains about session-config
>   (Olaf Krische)
>
>
> --
>
> Message: 1
> Date: Wed, 18 Aug 2010 14:52:29 -0400
> From: "Francis, Steve (IHG)" 
> Subject: [Resin-interest] Redirect or forwarding
> To: 
> Message-ID:
>   
>  l>
>   
> Content-Type: text/plain; charset="us-ascii"
>
> I'm not sure if I want a redirect of a forward here.  I'll explain.  I
> have a linux host with multpile IP addresses, and therefore, multiple
> DNS names.  I'd like to be able to send requests for a base dns name
> with nothing after the .com to a specific application.
>  
>  http://hmisupportqa.hiw.com    to
> http://hmisupportqa.hiw.com/support/SupportServer
>  
>  
> and
>  
> http://hmi-qa.hiw.com    to
> http://hmi-qa.hiw.com/mqsservlet/ViewHdxMsg
>  
>  
> and still allow the standard website to be viewed via 
>  
> http://adczlnxhmiqa1.hiw.com  
>  
> What I don't want is a bad url that redirects other  valid urls such as
> http://hmisupportqa.hiw.com/support/DisplayHotelStatus
>    back to  the
> http://hmisupportqa.hiw.com/support/SupportServer
>    as that would
> break the application.
>  
> Is this possible?  I couldn't really tell from the doc.
>  
> Thanks,
>  
> Steve Francis
> Technical Advisor - zSeries, zLinux, z/OS IHG Alpharetta Data Center
> Ph:  770-442-7157
> Cell:  770-906-3122
> IM: francisihg
>  
> -- next part --
> An HTML attachment was scrubbed...
> URL:
> http://maillist.caucho.com/pipermail/resin-interest/attachments/20100818
> /85d78442/attachment-0001.html 
>
> --
>
> Message: 2
> Date: Thu, 19 Aug 2010 17:20:14 +0800
> From: Wesley Wu 
> Subject: [Resin-interest] ConcurrentModificationException when
>   InjectManager.findByName
> To: Resin 
> Message-ID:
>   
> Content-Type: text/plain; charset=ISO-8859-1
>
> Often happened at 30 seconds after appserver start.
>
> [10-08-19 17:11:44.378] {server://*:6801-487}
> java.util.ConcurrentModificationException
> at
> java.util.HashMap$HashIterator.nextEntry(HashMap.java:977)
> at
> java.util.HashMap$KeyIterator.next(HashMap.java:1012)
> at
> java.util.HashMap.buildCache(HashMap.java:590)
> at
> java.util.HashMap.resize(HashMap.java:576)
> at
> java.util.HashMap.addEntry(HashMap.java:939)
> at
> java.util.HashMap.put(HashMap.java:477)
> at
> com.caucho.config.inject.InjectManager.findByName(InjectManager.java:759
> )
>