Help coderanch get a
new server
by contributing to the fundraiser

Viswa

Greenhorn
+ Follow
since May 17, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Viswa

Hi,
Thanks for your effort. I got few more info.

Many vendor has their own API approach for singleton way. below is the way for weblogic...

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/cluster/service_migration.html#wp1051458

If you do not want to use API, you can go for JMS/DB/thirdparty JVM Clustering for the same.

cheers.
15 years ago
Hi,
I have few basic doubt about clustering....
a) How can we maintain single instance model / no duplicate instance across JVM (without terracota server)
b) Do we need any programatic code required for single instance (like keep the db locked and do not allow second server to create instance?
c) If my load balancer (app server level& hardware level) is perfect, still do I need any program/ code to handle?
thanks in adv.
15 years ago
Hi,
I have some bunch of basic queries... I'm not clear about these.
Please clarify
1.Why we need Factory pattern & in which situation we implement?
2.Why we need Command pattern & in which situation we implement?
3.Differentiate Interceptor Pattern/Filter Pattern/Front Controller Pattern

Thanks in adv.

Regards, V
Hi Jenn,
If you compare with ResultSet CachedRowSet is best. B'coz it is connectionless result set. So, you can thro like a ball from one layer to another layer- means from Persistence layer to Presentation layer(CachedRowSet is Serialized one). Iterating and fetch values from CachedRowSet is very easy. If you use java version >=1.4.2 no probs. else you should download it from net.

cheers
vichu
[ March 28, 2005: Message edited by: Vichu ]
19 years ago
What is the main difference between Front Controller and View Helper?
Where we use Front Controller and View Helper?

Thanks in advance.

regards,
Vichu
Hi all,
Could you give me idea, how to create dynaActionForm for dynamic fields (in a JSP page).
Thanks n advance
Cheers
Viswanath
19 years ago
Hi All,
We can use Torque as Persistence layer to seperate Business logic and DB. What all are the features of using these type of persistence layer above the database?


Thanks in advance.

Cheers,
Viswanath
Fetch the values from database and construct that values in a XML format.
Using java.util.Vector.
plz help me to do this
Viswa
20 years ago
Hi,
I'm trying to create a custom tag. tld file and taglib java file both are fine. there is no prob.
If i try to start the server(tomcat 4.X.X), it shows exception. This error related to Header the header is,

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

<web-app>
<display-name>Welcome to Tomcat</display-name>
<description>
Welcome to Tomcat
</description>

.
.
.
</web-app>
the exception is,

ContextConfig[/OBA] Parse error in application web.xml
java.net.UnknownHostException: java.sun.com
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:143)
at java.net.Socket.connect(Socket.java:425)
at java.net.Socket.connect(Socket.java:375)
at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:366)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:582)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:292)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:253)
at sun.net.www.http.HttpClient.New(HttpClient.java:321)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:301)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
ction.java:463)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
.java:454)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:556)
at java.net.URL.openStream(URL.java:955)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown So
urce)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source
)
at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown Sourc
e)
at org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1548)
at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
nfig.java:282)
at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:63
9)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:243)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
587)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:821)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)

at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDe
ployer.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.jav
a:252)
at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
at org.apache.commons.digester.Rule.end(Rule.java:276)
at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.commons.digester.Digester.parse(Digester.java:1567)
at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:385)
at org.apache.catalina.core.StandardHost.install(StandardHost.java:819)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.j
ava:442)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:399
)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:358)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:166)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363
)
at org.apache.catalina.core.StandardService.start(StandardService.java:4
97)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:219
0)
at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

ContextConfig[/OBA]: Pipline Configuration:
ContextConfig[/OBA]: org.apache.catalina.core.StandardContextValve/1.0
ContextConfig[/OBA]: ======================
ContextConfig[/OBA]: Marking this application unavailable due to previous error(
s)

Thanks in advance.

Viswa
20 years ago
JSP
Hi all,
why we use this <html:base/> tag?
what is the purpose?
thanks & regards,
Viswa
20 years ago
Hi,
I want to get values from Oracle database and keep that value in a xml format.Then I should read the xml file in to my Java program.
Is it possible? If possible how to do? Give a sample. What are the parsers we need to do this.
Thanks in Advance.
Viswa
Hi,
In Action class
...
request.setAttribute("sendToJsp",arrayListObj);
...
In JSP page
...
<logic:iterate id="myIter" name="sendToJsp">
<bean:write name="myIter"/>
</logic:iterate>
For example,
Your arrayListObj contains firstname,midname,lastname,mailid.
here in jsp page logic:iterate iterate the loop depends upon the size of the arraylist object.
So this 'll iterate 4 times according to our example.
bean:write gives values from that array list.
Try this.
Regards,
Viswa
20 years ago
Hi,
if the array list is a bunch of value from Java Bean. follow,
In action class
....
request.setAttribute("sendToJSP",arrayListObj);
...
In your jsp page
<bean:write name="sendToJSP" property="firstName"/>
<bean:write name="sendToJSP" property="middleName"/>
<bean:write name="sendToJSP" property="lastName"/>
if not bean,
use iterator and find the size using <bean:size/> and iterate continuously.
that's all
Viswa
20 years ago
If you have real time practice then it is very easy. there is no need of books or material. Best go thro a good Example.
20 years ago
Consider, One page contains Static Text, means in future I may change the content. This is a paragraph.
If it is a small sentence I can add thro Resource Bundle.
How can I do this for a Paragraph.
Thanks&Regards
Viswam
20 years ago