Re: Servlet mapping - url pattern with *

2005-08-01 Thread flower

Bill Barker wrote:

"flower" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
 


Hello,

Let's consider situation like this:
We have got some servlets responsible for genereting galery page. We want 
group galery pages by use common part in uri (/galery/):

http://x.com/galery/galery_id/firstpage.html
http://x.com/galery/galery_id/secondpage.html

firstpage.html is generated by servlet1 , secondpage.html by servlet2.

So we must url-pattern like this: /galery/*/firstpage.html and 
/galery/*/secondpage.html but this url-pattern doesn't work.

question: why ? ( I use version 5.5.9 )

Some people, with I was talking about this, said that patterns like this 
was work with previously version and that version 5.5.9 is "crazy" ;]


I've got a vague recollection that some some such Tomcat-specific extension 
was proposed on the dev list.  Can't remember if it was ever implemented 
(and to which version), and I'm much to lazy to look it up :).  However, the 
5.5.9 behavior is in strict compilance with the Servlet spec (and, hence 
anything but "crazy").
 


mhm, when some time ago I was reading Servlet spec, I noticed that.


Is any way to obtain behaviour like above with latest version ?


Simplest is with a Filter that does something like:
  RequestDispatcher rd = null;
  if(request.getRequestURI().endsWith("/firstpage.html") {
  rd = getServletContext().getNamedDispatcher("servlet1");
  } else if(request.getRequestURI().endsWith("/secondpage.html");
  rd = getServletContext().getNamedDispatcher("servlet2");
  }
  if(rd != null) {
 rd.forward(request, response);
  }
 


thx for example :)
I was thinking about somethings like this ... but my lazy force me to 
looking buildin solution :)


thx and greetings
flow


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Servlet mapping - url pattern with *

2005-07-31 Thread flower

Hello,

Let's consider situation like this:
We have got some servlets responsible for genereting galery page. We 
want group galery pages by use common part in uri (/galery/):

http://x.com/galery/galery_id/firstpage.html
http://x.com/galery/galery_id/secondpage.html

firstpage.html is generated by servlet1 , secondpage.html by servlet2.

So we must url-pattern like this: /galery/*/firstpage.html and 
/galery/*/secondpage.html but this url-pattern doesn't work.

question: why ? ( I use version 5.5.9 )

Some people, with I was talking about this, said that patterns like this 
was work with previously version and that version 5.5.9 is "crazy" ;]


Is any way to obtain behaviour like above with latest version ?

Greatings
flow




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



jspx and tag with empty content

2005-07-17 Thread flower

Hello,

I just start with jspx and I have small problem with 'empty tags' and 
'tags with empty content'.


Terminology:
empty tag:   
tag with empty content: 
jspx - JSP document file ( with XML syntax )

Ok, so when I use 'tag with empty content' they are transform into 
'empty tag' by container in proccess time.

exp.
-> 
 ->

but 'empty tag' != 'tag with empty content' so this behaviour is small 
problem.


I try use CDATA section, but it is ugly solution.
There is any other solution ?

Greetings
Flow

ps. jdk 1.5 , tomcat 5.5.4

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]