File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

cleared SCWCD with 81%

 
Arun Kumar
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations.... and Thanks for the files.
 
Rancy Chadha
Ranch Hand
Posts: 135
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Arun!!!
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
 
NDP Prasad
Ranch Hand
Posts: 177
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Arun. Iam planning to prepare something like this....
 
Joe Harry
Ranch Hand
Posts: 10045
3
Eclipse IDE Mac PPC Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats!
 
Manish Agarwal
Ranch Hand
Posts: 34
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations !!! what's next.

 
Arun Kumar
Ranch Hand
Posts: 62
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Man!!!
Nice Score.

Regards,

Amit Goyal
 
T Madhavi
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Marc, I have changed my name according to the Naming Policy. Thanks
 
Khaled Mahmoud
Ranch Hand
Posts: 361
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations
 
vaishoo Dhembre
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congrats!!
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic