File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes cleared SCWCD with 81% Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "cleared SCWCD with 81%" Watch "cleared SCWCD with 81%" New topic
Author

cleared SCWCD with 81%

Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
I have not been very active in posting topics but been kinda passive observer.....thanks to community members........this community is best for exam prep!!

I just want to share two files that i found very useful to just mug up.

################# web.xml.......

<web-app>

<display>A Sample Application</display>

<!-- If the element below appears the application is distributable -->

<distributable/>

<!-- WELCOME FILES -->

<!-- if a url includes folder name, and one of the welcome file is in that folder, it picks that, first match wins -->

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>

<!-- FILTER CONFIGURATION -->

<filter>
<filter-name>MyFilter</filter-name>
<filter-class>com.example.HelloFilter</filter-class>

<!-- optional and multiple -->
<init-param>
<param-name>FilterName</param-name>
<param-value>Hello Filter</param-value>
</init-param>
<init-param>
<param-name>LogFileName</param-name>
<param-value>UserLog.txt</param-value>
</init-param>
</filter>

<filter-mapping>
<filter-name>MyFilter</filter-name>


<!-- all the mapping urls mapped first them the servlets -->
<url-pattern>*.do</url-pattern>
<!-- or -->
<servlet-name>MyServlet</servlet-name>



<!-- optional and multiple -->

<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>ERROR</dispatcher>


</filter-mapping>

<!-- LISTENER CONFIGURATION/where the attribute itself need to be notified does not require configuration -->
<listener>
<listener-class>com.example.MyContextListener</listener-class>
</listener>



<!-- SERVLET CONFIGURATION -->

<servlet>
<servlet-name>MyServlet</servlet-name>

<servlet-class>com.example.HelloServlet</servlet-class>
<!-- or -->
<jsp-file>/hello.jsp</jsp-file>

<!-- optional and one only, greater value than 0 means don't wait for the first request load it beforehand -->
<load-on-startup>1</load-on-startup>


<!-- optional and multiple -->
<init-param>
<param-name>emailid</param-name>
<param-value>abc@def.com</param-value>
</init-param>

<!-- optional and multiple -->
<security-role-ref>
<role-name>Manager-TOM HENRY</role-name>
<role-link>admin</role-link>
</security-role-ref>
</servlet>

<servlet-mapping>
<servlet-name>MyServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


<!-- JSP CONFIGURATION -->
<jsp-config>
<jsp-property-group>
<url-pattern>*.do</url-pattern>
<scipting-invalid>true</scipting-invalid>
<el-ignored>false</el-ignored>
</jsp-property-group>
<taglib>
<taglib-uri>helloWorld</taglib-uri>
<taglib-location>/WEB-INF/hello.tld</taglib-location>
</taglib>
</jsp-config>


<!-- SESSION CONFIGURATION -->
<session-config>
<session-timeout>15</session-timeout>
</session-config>

<!-- ERROR PAGE CONFIGURATION -->
<error-page>

<exception-type>java.lang.ArithimeticException</exception-type>
<!-- or -->
<error-code>500</error-code>

<location>/WEB-INF/error.jsp</location>
</error-page>

<!-- CONTENT TYPE CONFIGURATION -->
<mime-mapping>
<extension>text</extension>
<mime-type>text/html</mime-type>
</mime-mapping>


<!-- ALL SECURITY RELATED CONFIGURATIONS -->
<security-role>
<role-name>admin</role-name>
<role-name>manager</role-name>
</security-role>



<security-constraint>
<web-resource-collection>
<web-resource-name>My Security</web-resource-name>
<!-- one or many -->
<url-pattern>/hello/*.do</url-pattern>

<!-- optional and multiple/ if below tag is not specified all the methods are constrained -->
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>

<auth-constraint>
<!-- optional and multiple/none means all empty means none -->
<role-name>admin</role-name>
<role-name>manager</role-name>
</auth-constraint>

<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
<!-- or
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
<transport-guarantee>INTEGRAL</transport-guarantee>
-->
</user-data-constraint>
</security-constraint>

<login-config>
<auth-method>BASIC</auth-method>
<!-- one or many -->
<!-- or
<auth-method>DIGEST</auth-method>
<auth-method>CLIENT-CERT</auth-method>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
-->
</login-config>

<!-- ALL EJD/JNDI RELATED CONFIGURATIONS -->
<env-entry>
<env-entry-name></env-entry-name>
<env-entry-type></env-entry-type>
<env-entry-value></env-entry-value>
</env-entry>

<ejb-local-ref>
<ejb-ref-name>ejb/Customer</ejb-ref-name>
<ejb-ref-type>ENTITY</ejb-ref-type>
<local-home>com.example.CustHome</local-home>
<local>come.exampleCust</local>
</ejb-local-ref>

<ejb-ref>
<ejb-ref-name>ejb/Customer</ejb-ref-name>
<ejb-ref-type>ENTITY</ejb-ref-type>
<home>com.example.CustHome</home>
<remote>com.example.Cust</remote>
</ejb-ref>

<resource-env-ref>
<resource-env-ref-name>jms/stockQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>

<resource-ref>
<res-ref-name>jdbc/EmpDB</res-ref-name>
<res-type>javax.sql.Datasource</res-type>
<res-auth>CONTAINER</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>

</web-app>



################# and taglib.tld


<taglib>

<tlib-version>1.2</tlib-version>
<short-name>Hello</short-name>
<uri>hello</uri>

<!-- CALLING STATIC METHODS FROM EL(EL FUNCTION CONFIGURATION -->

<function>
<name>rollIt</name>
<function-class>foo.DiceRoller</function-class>
<function-signature>int rollDice(java.lang.String)</function-signature>
</function>

<!-- CUSTOM TAGS(SIMPLE/CLASSIC) CONFIGURATION -->

<tag>
<description>For Classic/Simple Tags</description>
<name>custom</name>
<tag-class>com.example.TagHandler</tag-class>

<body-content>empty</body-content>
<!-- any of the below -->
<body-content>scriptless</body-content>
<body-content>tagdependent</body-content>
<body-content>JSP</body-content> (only for classic tags)

<attribute>
<name>age></name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>

<variable>
<name-from-attribute>id</name-from-attribute>
<variable-class>example.person.Contact</variable-class>

<declare>true</declare>
<!-- optional and one -->
<declare>false</declare>
<declare>yes</declare>
<declare>no</declare>

<scope>AT_BEGIN</scope>
<!-- optional and one -->
<scope>AT_END</scope>
<scope>NESTED</scope>
</variable>

<dynamic-attributes>true</dynamic-attributes>
</tag>

<!-- LET KNOW THE CONTAINER WHERE THE TAG FILES ARE KEPT(ONLY IN CASE OF JAR) -->

<tag-file>
<name>custom</name>
<path>/META-INF/tags/custom.tag</path>
</tag-file>
</taglib>
[ May 02, 2007: Message edited by: Arunkumar AK ]
T Madhavi
Greenhorn

Joined: Apr 19, 2007
Posts: 10
Congratulations.... and Thanks for the files.
Rancy Chadha
Ranch Hand

Joined: Jul 12, 2006
Posts: 135
Congratulations Arun!!!


Thanks,<br />-Rancy
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

"Arunkumar AK" and "Madhavi TR", we don't have many rules around here but we do have a naming policy. The policy states that you may use initials for your first name but not for your last name. Please update your display names accordingly. Thanks.


A good workman is known by his tools.
NDP Prasad
Ranch Hand

Joined: Apr 13, 2006
Posts: 177
Thanks a lot Arun. Iam planning to prepare something like this....


SCJP,SCWCD<br />
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9243
    
    1

Congrats!


SCJP 1.4, SCWCD 1.4 - Hints for you, SCBCD Hints - Demnachst, SCDJWS - Auch Demnachst
Did a rm -R / to find out that I lost my entire Linux installation!
Manish Agarwal
Ranch Hand

Joined: Jun 22, 2004
Posts: 34
Congratulations !!! what's next.



Thanks and Regards,<br />Manish Agarwal<br />SCJP 1.4 (100%)<br />SCWCD 1.4 (98%)<br />SCBCD 1.3 (Preparing)
Arun Kumar
Ranch Hand

Joined: May 22, 2006
Posts: 62
Thanks guys.......I will take on SCBCD next

Marc - I have formatted my name also as per the policy
[ May 03, 2007: Message edited by: Arun Kumar ]
Amit Goyal
Ranch Hand

Joined: Feb 21, 2006
Posts: 95
Congratulations Man!!!
Nice Score.

Regards,

Amit Goyal
T Madhavi
Greenhorn

Joined: Apr 19, 2007
Posts: 10
Marc, I have changed my name according to the Naming Policy. Thanks
Khaled Mahmoud
Ranch Hand

Joined: Jul 15, 2006
Posts: 361
Congratulations


SCJP, SCJD,SCWCD,SCDJWS,SCEA 5 MCP-C#, MCP-ASP.NET - http://www.khaledinho.com/
Life is the biggest school
vaishoo Dhembre
Greenhorn

Joined: Apr 20, 2007
Posts: 17
Congrats!!
 
Don't get me started about those stupid light bulbs.
 
subject: cleared SCWCD with 81%
 
Similar Threads
about web.xml
web.xml hard work
Web.xml
Sample web.xml.. may be useful for SCWCD Ranchers
ELEMENT init-param(param-name, param-value, description?