• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help with some Tips About SWCD.

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys i am getting ready for SCWCD. Please help with some tips.
1). If i have a tag with a attribute set rtexprvalue as true if i create the tag and pass the attribute as literal what would happen? Nothing or a exception.
2). If i have a tag with a attribute set rtexprvalue as false if i create the tag and pass the attribute as a runtime expression what would happen? Nothing or a exception.
(the last question works for custom tags simple tags and tag files in the same behavior or are different for each one)
3). If a have a filter to a servlet. The filter is process to the request only or the filter should filter the response as well.. i am receiving the filtering only to the request and not to the response..

4). If a duplicate the context param as show below.


In tomcat. I am getting the last value(javiut@gmail.com) is this servlet spec or vendor specific.??
5). In Servlet init param the same example as the show in the last question i am getting the first result. Not the overwritten value.. again is this servlet spec or vendor specific behavior.

sorry is this question are stupid or something.

best regards from Venezuela sorry by my poor english.
Cristian Daniel Ortiz Cuellar
 
Ranch Hand
Posts: 634
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1). If i have a tag with a attribute set rtexprvalue as true if i create the tag and pass the attribute as literal what would happen? Nothing or a exception.


Code will work,there will be no exception.

If i have a tag with a attribute set rtexprvalue as false if i create the tag and pass the attribute as a runtime expression what would happen? Nothing or a exception.


There will be a exception.

. If a have a filter to a servlet. The filter is process to the request only or the filter should filter the response as well.. i am receiving the filtering only to the request and not to the response


Filter process both the request and reponse.Please post your code,so that we can solve your problem.

4). If a duplicate the context param as show below.
view plaincopy to clipboardprint?



In tomcat. I am getting the last value(javiut@gmail.com) is this servlet spec or vendor specific.??
5). In Servlet init param the same example as the show in the last question i am getting the first result. Not the overwritten value.. again is this servlet spec or vendor specific behavior



I too was suprised when i tried the thing you have posted.
I think fellow ranchers can help us with this situation.
 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mohitkumar gupta wrote:

.



Thanks Gupta. good answers. God Bless.

 
Cristian Daniel Ortiz Cuellar
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Sometimes i am getting the last value sometimes the first one..

can somebody explain.
thanks a lot
 
Ranch Hand
Posts: 247
Eclipse IDE Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If a have a filter to a servlet. The filter is process to the request only or the filter should filter the response as well.. i am receiving the filtering only to the request and not to the response



Filters can only be used to filter requests not the response... However, before using standard response, You can create a customized HttpServletResponse and pass it on FilterChain which
Servlet uses it...

For e.g., example extracted from HFSJ Book...

In that book, you can get the idea of creating customized response which has capability of compressing the very big response sent to Client.

That is instead of repeating the activity of compressing the response in each servlet code... you can pass it on Customized ServletResponse having OutputStream
capable of compressing it... So that redundant compressing logic can be reduced...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic