Arvind Chavar

Ranch Hand
+ Follow
since May 16, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Arvind Chavar

I want to sell my voucher for SCEA exam CX-310-051 for $130.
The expiration date is Nov 30th.
Anybody interested email me at arvindbc@yahoo.com
hi everybody
Anybody facing same problem as mine , is there a way to change scwcd 1.3 voucher to 1.4 or to buy a new altogether?
plzzzzz let me know
thank u
hi,
i have already bought the voucher for scwcd 1.3 ,is there a way to change it to 1.4 or i have to buy another voucher.
thank u.
1) how should we place the class file in tomcat.
2)Should we create a subdirectory with same name as the package name in tomcat/webapps/examples/web-inf/classes.
Yes, the directory structure under classes folder should match your package name.In your case you will have to create a folder called testpack,and place the first.class in this folder.

3)how should we indicate the path of the servlet in html file .Should we invoke with the fully qualified name...

You need to configure the servlet in web.xml file and provide a servlet mapping,and then you could call the servlet from HTML pages using servlet mapping

<servlet>
<servlet-name>testpackSvlt<servlet-name>
<servlet-class>testpack.first<servlet-class>
<servlet>

<servlet-mapping>
<servlet-name>testpackSvlt<servlet-name>
<url-pattern>/servlet/testpackSvlt</url-pattern>
<servlet-mapping>

then you could call servlet from HTML as

<html>
<form action="/servlet/testpackSvlt">
........
</html>

The configurations element that I have provided may not be correct as I just typed whatever I remebered,at least it shows how you could do it.If you have problems refer to servlet dtd.

- Arvind
1) how should we place the class file in tomcat.
2)Should we create a subdirectory with same name as the package name in tomcat/webapps/examples/web-inf/classes.
Yes, the directory structure under classes folder should match your package name.In your case you will have to create a folder called testpack,and place the first.class in this folder.

3)how should we indicate the path of the servlet in html file .Should we invoke with the fully qualified name...

You need to configure the servlet in web.xml file and provide a servlet mapping,and then you could call the servlet from HTML pages using servlet mapping

<servlet>
<servlet-name>testpackSvlt<servlet-name>
<servlet-class>testpack.first<servlet-class>
<servlet>

<servlet-mapping>
<servlet-name>testpackSvlt<servlet-name>
<url-pattern>/servlet/testpackSvlt</url-pattern>
<servlet-mapping>

then you could call servlet from HTML as

<html>
<form action="/servlet/testpackSvlt">
........
</html>

The configurations element that I have provided may not be correct as I just typed whatever I remebered,at least it shows how you could do it.If you have problems refer to servlet dtd.

- Arvind
Check if JAVA_HOME setting is still correct.One more thing you could try is
open dos window , go to bin directory , and then type the startup.bat.That way you get to see at the error.Additionally you can look at log file for any errors
Jon,
Thanks a lot!!.It worked.I had read the documenation.There are so many attributes to javadoc tag, it was diffcult to notice.
Thanks a lot gaian , for your help.
Arvind
21 years ago
I am genertaing javadoc for my application there are nearly 1000 classes.When I run following build.xml file I get "Javadoc failed:java.io.IOException: CreateProcess:"
<project default="start">
<target name="start" depends="doc"/>
<!-- set global properties for this build -->
<property name="destDir" value="C:\OMNICONNECT_EJB\ResourcesForClients"/>
<property name="srcDir" value="C:\OMNICONNECT_EJB\OmniConnSource"/>
<property name="jarName" value="FrameWork.jar"/>
<property name="jarDestDir" value="C:\OMNICONNECT_EJB\ResourcesForClients"/>
<property name="omniConnHome" value="C:\OMNICONNECT_EJB"/>
<!-- ********************* TARGETS ******************** -->
<target name="doc">
<delete>
<fileset dir="${omniConnHome}\Documentation" excludes="images/** html/**"/>
</delete>

<javadoc
destdir="C:\OMNICONNECT_EJB\Documentation"
author="true"
version="true"
use="true"
private="true"
classpath="C:\j2sdkee1.3\lib\j2ee.jar;${omniConnHome}\ResourcesForClients\FrameWork.jar"
windowtitle="OmniConnectEJB API"
sourcefiles=".\**"
packagenames="com.sungard.omniconnect.framework.**,com.sungard.omniconnect.framework.webservices.**"
defaultexcludes="no"
>

<fileset dir="${srcDir}" casesensitive="yes" includesfile="includesFile.txt"/>

<fileset dir="${omniConnHome}\EJBs\regular\" casesensitive="yes" includes="*OmniConnect**\**Package\*.java"/>

<fileset dir="${srcDir}" casesensitive="yes" includes="com\sungard\omniconnect\framework\webservices\*Bean.java com\sungard\omniconnect\framework\webservices\*DE.java"/>
<fileset dir="${omniConnHome}\EJBs\webservices" casesensitive="yes" includes="*OmniConnect**\**Package\*.java"/>

<doctitle><![CDATA[<h1>OmniConnectEJB</h1>]]></doctitle>
<bottom><![CDATA[<i>OmniConnect/EJB is a trademark or registered trademark of Sungard EBS, Inc. in the US and other countries.<br>
SungardEBS, Inc. 104 Inverness Ceneter Place ,<br>
Birmingaham, AL, 35242, U.S.A. All Rights Reserved. </i>]]></bottom>
<link href="http://java.sun.com/j2se/1.3/docs/api/"/>
<link href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api/"/>
</javadoc>

</target>
</project>
I get following error.
Buildfile: docNew.xml
doc:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
BUILD FAILED
file:C:/OMNICONNECT_EJB/AntScripts/docNew.xml:29: Javadoc failed: java.io.IOExce
ption: CreateProcess: E:\j2sdk1.4.1_03\bin\javadoc.exe -d C:\OMNICONNECT_EJB\Doc
umentation -use -private -windowtitle "OmniConnectEJB API" -doctitle <h1>OmniCon
nectEJB</h1> -bottom "<i>OmniConnect/EJB is a trademark or registered trademark
of Sungard EBS, Inc. in the US and other countries.<br>
SungardEBS, Inc. 104 Inverness Ceneter Place ,<br>
Birmingaham, AL, 35242, U.S.A. All Rights Reserved. </i>" -c
lasspath C:\j2sdkee1.3\lib\j2ee.jar;C:\OMNICONNECT_EJB\ResourcesForClients\Frame
Work.jar -version -author -link http://java.sun.com/j2se/1.3/docs/api/ -link htt
p://java.sun.com/j2ee/sdk_1.3/techdocs/api/ C:\OMNICONNECT_EJB\AntScripts\** C:\
OMNICONNECT_EJB\OmniConnSource\com\sungard\omniconnect\framework\KeyPair.java C:
\OMNICONNECT_EJB\OmniConnSource\com\sungard\omniconnect\framework\OmniHalogenInf
o.java C:\OMNICONNECT_EJB\OmniConnSource\com\sungard\omniconnect\framework\OmniK
ey.java C:\OMNICONNECT_EJB\OmniConnSource\com\sungard\omniconnect\framework\Omni
Message.java C:\OMNICONNECT_EJB\OmniConnSource\com\s?
21 years ago
Sorry for the post guys.It was problem with my path settings.
I have html form which on submitting invokes the servlet.I do the following in doPost method of the servlet
public void doPost(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException{
RequestDispatcher rd = getServletContext().getRequestDispatcher("/loadBean.jsp");
//request.setAttribute("input",new OmniPacketTesterInputBean());
log(request.getAttribute("input")+"");
log(request+"");
rd.include(request,response);
log(request+"");
log(request.getAttribute("input")+"");
}
What I am trying to do here is forward the request to loadBean.jsp to take care of loading of values. loadBean.jsp looks has only two following lines
<jsp:useBean id="input" scope="request" class="com.sungard.omniconnect.framework.packettester.OmniPacketTesterInputBean"/>
<jsp:setProperty name="input" property="*"/>
So it should cretae an instance of the bean and load the values form request,and when I return to my servlet from this include the bean should be avaialable, but I am getting null.Any idea why this behaviour?

Thanks.
Arvind
Amer,
What do you mean by inconsistent?.Are you expecting them to be no duplicates?,and you are getting some duplicates?.
If it is true that you are getting duplicates, then the implementaion of SingleThread model by serlet container should be that there are multiple instances of servlet are created.
Arvind
<%! is a declaration, which means it will not be part of _jspService and therefore will not be a local variable.
Ans : TRUE.It will be an instance variable.
In this context, it would be an instance variable regardless of the threading model. It would have to be declared <%! static ... before it would be a static variable regardless of the number of threads.
Ans : TRUE
I also understand the concept of the SingleThreadModel which would keep multiple instances from being created and thereby have the same effect as instance/static.
Ans : Not true.SingleThreadModel only ensures that there will be only thread using this instance.This effect could be achieved by the servlet container in either of the two following ways.
First : Create only one instance of servlet.Queue up the requests and handle one request after the other in sequence.In this case instance and static variable have equivalent effect.
Second : Create many instances of servlet.In such a case there will be as many instance variables as there are instances of servlet, where as there is one and only one static variable.This static variable is avaialable to all instances of servlets.
I think the authentication mechanism provided by Servlet container is not very flexible, and I guess industry strength authentication systems will use their own authentication system.This is my understanding, may be I could be wrong.
SCWCD Study Kit by Hemant Deshmukh is an excellent book.Very well written ,very clear in expressing concepts with examples.
The above book coupled with the reading of Servlet and JSP specifications from SUN, practicing of some online maock exams , and the three tests that come with the book should be excellent preparation for exam, and also from the point of view of doing this for knowledge
As there is only one servlet(default behaviour) servicing all the worker threads.So any instance variables are shred by all the threads.Hence you get a feeling that it is static variable, but is not so.
In the default threading model for servlet the instance variable and the static variable have the same effect, but you could observe the difference if your servlets use single thread model.In single thread model there could be more than one instance of the servlet servicing the user requests.In such case static variable will be shared by all instances of servlet, hence could be accessed in any thread being serviced by servlet of this type.Whereas instance variables are accessible by only the threads accessing a particluar instance.

Hope this clarifies your understanding of static and instance variables against the servlet threading model.
Arvind