Problem setting up startup servlets in iWS 4.x
I have configured iPlanet Web Server(iWS) 4.1 SP9 to use a startup servlet. However, the error log does not show that the servlet has been initialized. Instead, it shows only the following entries:
Loading Simple Session Manager by default. Specify MMapSessionManager in servlets.properties to load persistent session manager
I found in the Knowledgebase that we need to copy the the configuration entry that was created in context.properties file into the servlets.properties file
My question that ...do we need to copy all the contents of the context.properties file or some portion of that file to servlets.properties .
Please suggest asap, I cant take a risk as this is a live server.
Thanks.
Hi,
You need not to copy entry file. In your servlets.properties file at the end of the file you can see the parameters settings of servlet which you have been configured as a servlet.
For example the below setting are for "HelloWorldServlet" servlet configuration. You need to copy that line only.
servlet.HelloWorldServlet.classpath=/export/home/41sp9/docs/servlet
servlet.HelloWorldServlet.code=HelloWorldServlet.class
Note: Make sure that before changing(copying)any changes in file take backup of the old file(present).
Regards,
Dakshin.
Developer Technical Support
Sun Microsystems
http://www.sun.com/developers/support.
Similar Messages
-
Weblogic 7.0 startup servlet problem
I have added a new startup servlet to my existing web application.
While deploying the same, weblogic is throwing the following
exception.
I'm very sure that class (com/lbx/util/LbxProperties) is part of
webapp war file I created. Can somebody please throw some light about
this.
I'm trying to do the .ear file deployment.
Thank you very much
Santhosh.
<Dec 30, 2002 12:04:27 PM PST> <Error> <HTTP> <101216> <Servlet:
"StartupServlet" failed to preload on startup in webapp: "wliWEB"
javax.servlet.ServletException: com/lbx/util/LbxProperties
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:912)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:833)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:773)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2763)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2708)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:2681)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:4746)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:539)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1017)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
Hi Santhosh,
Yeah , if its part of the system class path, it should find it. How are u referencing
the file? Try wrapping the code that gets the Resource and see what exception
you get.
-Raj
"Santhosh Kumar" <[email protected]> wrote:
>
>Raj, you are right. I'm trying to load the properties from within the
>that class.
>However, path (external to ear file) where I placed all those properties
>is part
>of system class path. So wl should find those property files, right?
>
>-Santhosh.
>
>"Raj" <[email protected]> wrote:
>>
>>Hi
>>Are you trying to load any property file in your startup servlet? I
>think
>>WL does
>>not extract the file "automatically" from within the war file. You should
>>probably
>>try referencing the file using some other mechanism or try loading it
>>from ur
>>EJB(as EJB JARs are loaded before WARs).
>>
>>-Raj
>>
>>
>>[email protected] (Santhosh Kumar) wrote:
>>>I have added a new startup servlet to my existing web application.
>>>While deploying the same, weblogic is throwing the following
>>>exception.
>>>
>>>I'm very sure that class (com/lbx/util/LbxProperties) is part of
>>>webapp war file I created. Can somebody please throw some light about
>>>this.
>>>
>>>I'm trying to do the .ear file deployment.
>>>
>>>Thank you very much
>>>Santhosh.
>>>
>>><Dec 30, 2002 12:04:27 PM PST> <Error> <HTTP> <101216> <Servlet:
>>>"StartupServlet" failed to preload on startup in webapp: "wliWEB"
>>>javax.servlet.ServletException: com/lbx/util/LbxProperties
>>> at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:912)
>>> at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:833)
>>> at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:773)
>>> at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2763)
>>> at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2708)
>>> at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:2681)
>>> at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:4746)
>>> at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:539)
>>> at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
>>> at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1017)
>>> at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
>>> at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
>>> at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
>>> at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
>>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>>>>
>>
>
-
I have added a new startup servlet to my existing web application.
While deploying the same, weblogic is throwing the following
exception.
I'm very sure that class (com/lbx/util/LbxProperties) is part of
webapp war file I created. Can somebody please throw some light about
this.
I'm trying to do the .ear file deployment.
Thank you very much
Santhosh.
<Dec 30, 2002 12:04:27 PM PST> <Error> <HTTP> <101216> <Servlet:
"StartupServlet" failed to preload on startup in webapp: "wliWEB"
javax.servlet.ServletException: com/lbx/util/LbxProperties
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:912)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:833)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:773)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2763)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2708)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:2681)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:4746)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:539)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1017)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
I have added a new startup servlet to my existing web application.
While deploying the same, weblogic is throwing the following
exception.
I'm very sure that class (com/lbx/util/LbxProperties) is part of
webapp war file I created. Can somebody please throw some light about
this.
I'm trying to do the .ear file deployment.
Thank you very much
Santhosh.
<Dec 30, 2002 12:04:27 PM PST> <Error> <HTTP> <101216> <Servlet:
"StartupServlet" failed to preload on startup in webapp: "wliWEB"
javax.servlet.ServletException: com/lbx/util/LbxProperties
at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:912)
at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:833)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:773)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:2763)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:2708)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:2681)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:4746)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:539)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:983)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1017)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1112)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:732)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
>
-
Startup servlet problem in weblogic81
Hi
I created one web application in weblogic81 and it contains one servlet and act as startup servlet.When i m trying to get jndi context to connect to DataSource in init method, i m getting the following exception
javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://16.138.181.88:7501: Dest
ination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to de
stination]
init method
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL,"t3://16.138.181.88:7501" );
jndiContext = new InitialContext(env);
web.xml
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>com.MyServlet</servlet-class>
<load-on-startup>0</load-on-startup>
</servlet>
Please help me out.
Regards
ChandraTo use the /servlet/ notaton you will need to enable the invoker servlet. To do this open the conf/web.xml and search on "invoker". Follow the directions.
An alternative would be to map the servlet to a url and use that url to call the servlet
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>TestServlet</servlet-name>
<url-pattern>/TestServlet</url-pattern>
</servlet-mapping>
now you should be able to access the servlet with /Fortune/TestServlet -
Problem with form or servlet???
hello..
i am trying to send some form data to a servlet for processing..
here is the code for the form
<table border="0">
<form action="details.upd" method="post" name="upd">
<tr><td>Username</td><td><input name="uname" type="text" size="25" maxlength="30"
value=<%=session.getAttribute("user") %> /></td>
</tr>
<tr>
<td>password</td><td><input name="pass" type="password" size="25" maxlength="30" />
</td></tr>
<tr><td>confirm password</td><td><input name="pass2" size="25" maxlength="30" type="password"/></td></tr>
<tr><td>Email</td><td><input name="mail" type="text" size="25" maxlength="30"
value=<%=session.getAttribute("EMAIL") %> /></td></tr>
<tr><td align="center"><input name="submit" type="button" value="Update" /></td></tr>
<tr><td align="center"><input name="ch" type="hidden" value="det"/></td></tr>
</form>
</table>
here is the web.xml entry for my compiled servlet
<servlet>
<servlet-name>update</servlet-name>
<description>
Servlet used for updates sent from landlord sessions
</description>
<servlet-class>UpdateServlet</servlet-class>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>update</servlet-name>
<url-pattern>*.upd</url-pattern>
</servlet-mapping>
the problem is that when i click the submit button to send the data, nothing happens....absolutely nothing. the page just stays as it is...please can u spot any fatal error in the code?
I have looked and looked without success..please helpyeah..i solved that.. but now i am getting another
problem...
why does this code...
Stringuser=(String)session.getAttribute("user");
gives me a class cast exception????
please helpBecause the object named "user" in your session isn't
a String.ok...thks -
A Chairde,
Am having problems setting up MPLS between a AS5350 and 7609 , I have used commands stated in this link, enable MPLS incrementally on a network.
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/switch_c/xcprt4/xcdtagc.pdf
The commands below are added to each router, and some troubleshooting.
7609
ip cef distributed
interface Loopback0
ip address 192.168.254.1 255.255.255.255
tag-switching advertise-tags
interface GigabitEthernet3/12
ip address 192.168.230.162 255.255.255.248
mpls label protocol tdp
tag-switching ip
AS5350
ip cef
mpls label protocol tdp
tag-switching advertise-tags
interface Loopback0
ip address 192.168.254.2 255.255.255.255
interface FastEthernet0/0
ip address 192.168.230.161 255.255.255.248
duplex auto
speed auto
mpls ip
h323-gateway voip interface
h323-gateway voip id cnibhco111 ipaddr 192.168.230.129 1719
h323-gateway voip h323-id cnibhco112
h323-gateway voip tech-prefix 71401
h323-gateway voip tech-prefix 0030
h323-gateway voip bind srcaddr 192.168.230.161
ip rsvp bandwidth 64 64
cnibhco112#sh tag-switching tdp neighbor
Peer TDP Ident: 192.168.254.1:0; Local TDP Ident 192.168.230.161:0
TCP connection: 192.168.254.1.49842 - 192.168.230.161.711
State: Oper; PIEs sent/rcvd: 18/23; Downstream
Up time: 00:12:54
TDP discovery sources:
FastEthernet0/0, Src IP addr: 192.168.230.162
Addresses bound to peer TDP Ident:
192.168.100.17 192.168.100.25 159.107.212.49 172.16.8.81
192.168.230.130 192.168.230.77 192.168.230.81 192.168.254.1
192.168.210.6 192.168.127.6 192.168.210.106 192.168.127.66
192.168.127.138 192.168.210.146 192.168.210.142 192.168.210.122
192.168.210.17 192.168.230.140 192.168.230.26 192.168.230.74
192.168.230.10 192.168.230.14 192.168.127.130 192.168.127.142
192.168.230.6 192.168.230.70 192.168.230.34 192.168.210.178
192.168.200.25 192.168.210.126 192.168.232.1 192.168.231.1
192.168.200.17 192.168.210.102 190.168.200.245 190.168.200.225
190.168.201.241 192.168.230.98 192.168.210.14 190.168.201.201
190.168.201.209 192.168.210.162 192.168.210.210 190.168.201.205
192.168.230.38 190.168.200.249 190.168.200.217 190.168.200.253
192.168.230.162
cnibhco112#
cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
cnibhco112#traceroute 192.168.254.1
Type escape sequence to abort.
Tracing the route to 192.168.254.1
1 192.168.230.162 0 msec 0 msec *
cnibhco112#traceroute 192.168.230.162
Type escape sequence to abort.
Tracing the route to 192.168.230.162
1 192.168.230.162 0 msec 0 msec *
cnibhco112#Ro,
Thanks for the respone, have been playin, with MPLS for last few hours.
The routing between the loopbacks is now working, can PING 7609 Loopback from AS5350 ,and vice versa. (used static routes).
Having problem with TDP / LDP on routers,
mpls label protocol ldp / tdp command works correctly on both routers, but the
tag-switching tdp router-id Loopback0 force
command works on the 7609, but when I add it onto the AS5350 , the command "mpls ldp router-id Loopback0 force" appears on the startup script.
The opposite is true for the 7609 , you add MPLS LDP command, and TAG-SWITCHING command appears instead.
Any Ideas, as different configs of this leave me with forwarding table with both tags added, but not been able to ping the loopbacks !!!
When I can ping bot loopbacks, the OUTGOING TAG , disapears.....
Problem is LOOPBACK Commands on bot routers default to LDP (AS5350) , or TDP (7609). Any Ideas ...
mpls label protocol tdp
tag-switching tdp router-id Loopback0 force
mpls label protocol tdp
mpls ldp router-id Loopback0 force
cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
Local Outgoing Prefix Bytes tag Outgoing Next Ho
tag tag or VC or Tunnel Id switched interface
18 17 192.168.254.0/24 0 Gi3/12 192.168.2
MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
00097CA3293000127FCDBA808847 00011000
No output feature configured
Per-packet load-sharing
cnibhco100#traceroute 192.168.254.2
Type escape sequence to abort.
Tracing the route to 192.168.254.2
1 192.168.230.161 [MPLS: Label 17 Exp 0] 0 msec 0 msec 0 msec
2 192.168.230.162 0 msec 0 msec 0 msec
But no PINGING 192.168.254.2
cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
17 18 192.168.254.0/24 1915668 Fa0/0 192.168.230.162
MAC/Encaps=14/18, MRU=1500, Tag Stack{18}
00127FCDBA8000097CA329308847 00012000
No output feature configured
Per-packet load-sharing
cnibhco100#sh tag-switching forwarding-table 192.168.254.2 detail
Local Outgoing Prefix Bytes tag Outgoing Next Ho
tag tag or VC or Tunnel Id switched interface
18 17 192.168.254.0/24 752551 Gi3/12 192.168.2
MAC/Encaps=14/18, MRU=1500, Tag Stack{17}
00097CA3293000127FCDBA808847 00011000
No output feature configured
Per-packet load-sharing
WHEN BOTH LOCAL AND OUTGOING TAG, CANNOT PING EITHER WAY !!!
HAVE LABEL PROTOCOL AND LOOPBACK FORCE on AS5350
HAVE LABEL PROTOCOL ON 7609
WHEN ADD LOOPBACK FORCE on 7609 , CAN PING BOTH LOOPBACKS,
BUT OUTGOING TAG DISAPEARS
cnibhco112#PING 192.168.254.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.254.2, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
cnibhco112#sh tag-switching forwarding-table 192.168.254.1 detail
Local Outgoing Prefix Bytes tag Outgoing Next Hop
tag tag or VC or Tunnel Id switched interface
17 Untagged 192.168.254.0/24 598678 Fa0/0 192.168.230.162
MAC/Encaps=0/0, MRU=1504, Tag Stack{}
No output feature configured
Per-packet load-sharing
cnibhco112#
mpls label protocol tdp
tag-switching tdp router-id Loopback0 force -
Problems setting up a Domain - javax.management.InstanceNotFoundException
I am having problems setting up a Domain. The following steps summarize
what I have done.
1. Created FooDomain in d:/bea/wlserver6.0/config and created
appropriate config.xml, startup scripts, security, etc... (FooDomain
boots ok)
2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
3. Connected to FooDomain via console (works ok).
4. Defined machine FooMachine (happens to be localhost)
5. Defined new server FooServer (in addition to default myserver) and
assigned it to FooMachine.
6. Created a new directory d:/managedServers/FooServer (note - outside
installation directory)
7. Created directories d:/managedServers/FooServer/logs &
d:/managedServers/FooServer/applications
8. Copied sample startManagedServer.cmd from mydomain to
d:/managedServers/FooServer & modified appropriately.
9. Ran startManagedServer.cmd (Note: I was able to connect to the
Administration Server ok)
The problems are as follows. (From the console - pointing to the
Administration Server for the FooDomain)
1. I am unable to configure a DefaultWebApp_FooServer to be located at
d:/managedServers/FooServer/applications. I get the following exeption:
javax.management.InstanceNotFoundException:
FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
2. I get a similar error when trying to set FooServer log locations to
d:/managedServers/FooServer/logs
Any ideas as to why? This then begs the question, what if FooServer was
on a different physical server altogether. How would I define the
location of the DefaultWebApp and logs.
Thanks
jay ()If you want your application work, think my way. At least, all my teammates have used this method to build their development environment. If you are more interested to debug for Weblogic, contact your support representative. The tools from Administration console look very nice, but not function as you want (e.g., the tool to convert version 5.1 application to version 6, even monitor tools). Administration console is very nice to be used to configue the parameters for a domain, but not so trustful and not for application setup in my own experience and that is why I suggest you use mydomain and DefaultWebApp_MyServer as templates. By the way, I did modify config.xml manually to change the default web application entry, etc, to what I want.
Jay Zammit <[email protected]> wrote:
I did not modify config.xml manually. In fact, I am able to boot both the Administration Server & Managed Server. The problem happens when using the Administration console to assign my logs and Default Applications directory to the d:/managedServers/FooServer/logs, and d:/managedServers/FooServer/applications/DefaultWebApp_FooServer directories. Try it yourself. Go to the Configurer WebApp option and type in a fully qualified directory such as d:/managedServers/FooServer/applications/DefaultWebApp_FooServer
and see if it works on your system.
thanks
jay ()
Xiang Rao wrote:
One suggestion. Use the default domain mydomain as a template. Just make a copy of "mydomain" in folder config and rename the copy to whatever you like. Use some help tools to search all files (non-binary files) in new domain for key word "mydomain" and replace these words with your new domain name. To build an application, just rename the DefaultWebApp_MyServer to what you like and search "DefaultWebApp_MyServer" in all files (non-binary files) in your new domain and replace these words with yournew application name. Note you need to modify the scripts accordingly. Then you can run "startWeblogic" in your new domain directory to start your new domain. Other parameters should be configured by Administration console. If you manually modify configuration files, you could expect some bad news without reason.
Jay Zammit <[email protected]> wrote:
I am having problems setting up a Domain. The following steps summarize
what I have done.
1. Created FooDomain in d:/bea/wlserver6.0/config and created
appropriate config.xml, startup scripts, security, etc... (FooDomain
boots ok)
2. Moved console.war to bea/wlserver6.0/config/FooDomain/applications
3. Connected to FooDomain via console (works ok).
4. Defined machine FooMachine (happens to be localhost)
5. Defined new server FooServer (in addition to default myserver) and
assigned it to FooMachine.
6. Created a new directory d:/managedServers/FooServer (note - outside
installation directory)
7. Created directories d:/managedServers/FooServer/logs &
d:/managedServers/FooServer/applications
8. Copied sample startManagedServer.cmd from mydomain to
d:/managedServers/FooServer & modified appropriately.
9. Ran startManagedServer.cmd (Note: I was able to connect to the
Administration Server ok)
The problems are as follows. (From the console - pointing to the
Administration Server for the FooDomain)
1. I am unable to configure a DefaultWebApp_FooServer to be located at
d:/managedServers/FooServer/applications. I get the following exeption:
javax.management.InstanceNotFoundException:
FooDomain:Name=DefaultWebApp_FooServer,Type=WebAppComponent.
2. I get a similar error when trying to set FooServer log locations to
d:/managedServers/FooServer/logs
Any ideas as to why? This then begs the question, what if FooServer was
on a different physical server altogether. How would I define the
location of the DefaultWebApp and logs.
Thanks
jay () -
How can I call EJB from JSP/Servlets in iWS?
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park-Park,
Why Are you running your JSP/Servlets in iWS instead of iAS? For whatever
reason,
look at the Converter sample from iAS. You will be doing RMI/IIOP in this
case and the sample explains in detail what to do.
hth,
-robert
"SungHyun, Park" <[email protected]> wrote in message
news:9jpfmt$[email protected]..
Hi!!
My JSP/Servlets are on iWS, and I deploy EJB on iAS.
In this case, I don't know how JSP/Servlet call EJb on iAS.
I'd like to know how I can set JNDI name in JSP/Servlet on iWS.
I will thank you if you give me a simple example source using JSP/Servlet
and EJB.
Thanks in advance!!!
- Park- -
Weblogic startup servlet loading
Hi
I am encountering problems in loading a Servlet on Weblogic
server startup.
The steps to be followed to load a servlet on webLogic
Server startup are as follows
Register the following in the Weblogic properties
file.
1.register the servlet
weblogic.httpd.register.MyServlet=\
examples.servlets.myservletclass
2.weblogic.system.startupClass.StartMyServlet=\
weblogic.servlet.utils.ServletStartup
3.weblogic.system.startupArgs.StartMyServlet=\
servlet=MyServlet
where MyServlet is the synonym used for registering the
servlet in the file and myservletclass is the Actual
name of the servlet.
I have followed the steps accordingly but the server
is failing to load my servlet on startup.
Any suggestions,solutions for the above problem
will be most welcome.
Thanx
Tapan.Hi
I am encountering problems in loading a Servlet on Weblogic
server startup.
The steps to be followed to load a servlet on webLogic
Server startup are as follows
Register the following in the Weblogic properties
file.
1.register the servlet
weblogic.httpd.register.MyServlet=\
examples.servlets.myservletclass
2.weblogic.system.startupClass.StartMyServlet=\
weblogic.servlet.utils.ServletStartup
3.weblogic.system.startupArgs.StartMyServlet=\
servlet=MyServlet
where MyServlet is the synonym used for registering the
servlet in the file and myservletclass is the Actual
name of the servlet.
I have followed the steps accordingly but the server
is failing to load my servlet on startup.
Any suggestions,solutions for the above problem
will be most welcome.
Thanx
Tapan. -
Hi,
I am encountering problems in running a Servlet on Weblogic
server startup.
The steps to be followed to execute a servlet on webLogic
Server startup are as follows
Register the following in the Weblogic properties
file.
1.register the servlet
weblogic.httpd.register.MyServlet=\
examples.servlets.myservletclass
2.weblogic.system.startupClass.StartMyServlet=\
weblogic.servlet.utils.ServletStartup
3.weblogic.system.startupArgs.StartMyServlet=\
servlet=MyServlet
where MyServlet is the synonym used for registering the
servlet in the file and myservletclass is the Actual
name of the servlet.
I have followed the steps accordingly but the server
is failing to execute my servlet on startup.
Any suggestions,solutions for the above problem
will be most welcome.
Thanx
Tapan.
HOw did you specified the load-on-startup? and what error you get
upon startup/deployment time?
Kumar
Giulia Esposito wrote:
> I try to load my servlet on startup of Bea WebLogic Server 6.1 (SP 3) cluster.
> This load failed.
>
> Can you help me?
>
> Tank's!
>
-
Set a new servlet to form.action in a Javascript method
Hi!
I have a JSP page with a form where I set a servlet to call on submit in the action attribute. This servlet is supposed to be called when pressing the submit button at the end of the page.
In JSP:
<form action="<c:url value="/commitment"/>" method="POST" name="CommitmentAdd">
My problem is that I have a select box inside my form where I use 'onchange' to call a Javascript method, and in that method I want to set another servlet to the forms action (using the servlet-mapping url-pattern name in my web.xml file).
(I want the JSP page to change due to what you choose in the select box and I'd like to have that code in a separate servlet.)
In Javascript:
document.CommitmentAdd.action="/commitmentAddReload";
document.CommitmentAdd.submit();
When the Javascript method is called I get the error:
"The requested resource (/commitmentAddReload) is not available."
How can I set a new servlet to be found and called on submit?
Thanks,
AsaTry putting the whole URL in.
-
Problem with Sessions in Servlets
Hi,
I'm having a problem with sesions with servlets. It seems that if someone logs into my website, which is running on all servlets, while another person is logged on, the second person gets the session of the first person.
I'm using
HttpSession session = request.getSession(true);to get the session in each page. The session contains a user object which shows if the user is logged in and what permissions.
The session should be unique to the client computer right? Or am I jsut screwing this up big time?Yes, each client will have their own session. However, you may be testing incorrectly:
In Firefox, for example, all instances of the application running on the same machine will share the same cookies, therefore the same session, and would be considered one client.
MS IE will do the same if you use File - New to open a new wondow rather than clicking on the desktop icon.
If the different clients are using different machines and still getting shared data, then you may be using class-level variables in the servlet, which would not be thread safe and could lead to your problems...
public class MyServlet extends HttpServlet {
String data; //bad
int moredata; //bad
public void doGet(...) ... { ... }
} -
Problem with logout in servlet After logging out i need to expire the pages
I have a problem in logout using servlet.
I introduced sessions in my page and while logout i used
session.removeAttribute("name");
session.removeAttribute("password");
res.setHeader("Cache-Control","no-store"); //Directs caches not to store the page under any circumstance
res.setDateHeader("Expires", 0); //Causes the proxy cache to see the page as "stale"
res.setHeader("Pragma","no-cache"); //HTTP 1.0 backward compatibility
String user=(String)session.getAttribute("name");
System.out.println(user);
if(user==null)
System.out.println("hi");
req.setAttribute("Error", "Session has ended. Please login.");
res.sendRedirect("http://localhost:8080/homepage.html");
and after i logout im redirected to login page but after clicking back button im getting back to restricted pages(the pages b4 logout).
what should i do?????Thanks Dear BalusC,
I tried with this,
rs.getString("DATA_SCAD1")// where the source from .xls files
String pattern = "yyyy-MM-dd";
SimpleDateFormat format = new SimpleDateFormat(pattern);
try {
Date date = format.parse("DATA_SCAD1");
System.out.println(date);
} catch (ParseException e) {
e.printStackTrace();
System.out.println(format.format(new Date()));
this out put gives me Tue Apr 03 00:00:00 IST 2007
But I want to display the date format in yyyy-mm-dd.
regards,
maza -
Problems setting up username & password for SQL
Due to the outstanding advice I recieved from this excellent forum, I have managed to overcome my first problem with declaring a new Class.
This leads me to request help with my next biggest problem:
Setting up a user GUI that takes a "username" & "password" that will be used to access a password protected database.
I am a simple bloke, with simple thought processes, so please, go easy on me...
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery1 {
String username = "" , password = "";
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + username, "" + password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
String username = "", password = "";
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
username = uname.getText();
password = pword.getText();
This code generates two errors, stating:
C:\Java_progs>javac DBQuery1.java
DBQuery1.java:14: non-static variable username cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
DBQuery1.java:14: non-static variable password cannot be referenced from a static context
Connection conn = DriverManager.getConnection(data, "" +
username, "" + password);
^
2 errors*****************************
The code works when I remove the reference to the variables "username" & "password" in Connection "conn" call & replace them with the actual username & password, but this is not exactly what I was after. I was hoping to make the program responsive to each individual user, not set in code.
I also would like to make the program pause after the call in "main" to "PassDB" to wait for "PassDB" to exit before continuing.
I would also like to make "PassDB" destroy itself after the "OK" button is pressed & the "username" & "password" set.
If that isn't enough for you, I would really like the program to search 2 different database tables, return their values & compare them to be sure that they are the same.
When I try & search 2 different tables, as in:
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID")javac tells me that "ResultSet" is set to null 0
As always, I am extremely appreciative of any assistance you are able to offer.
Kind regards
duBedat
[email protected]This is where I'm at now:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
public class DBQuery {
static String username = "" ;
static String password = "" ;
public static void main(String[] arguments) {
PassDB UPass = new PassDB();
String data = "jdbc:odbc:JavaTestDataBase";
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn = DriverManager.getConnection(data, "" + DBQuery.username, "" + DBQuery.password);
Statement st = conn.createStatement();
ResultSet rec = st.executeQuery(
"SELECT Title, ContactID, First, Last, Dear FROM Contacts "
+ "WHERE (Title='Mr') ORDER BY ContactID");
/* ResultSet rec2 = st.executeQuery(
"SELECT Subject, ContactID FROM Calls "
+ "WHERE (Subject Is Not Null) ORDER BY ContactID");
System.out.println("\nFirst Name\tSurname\t\tNick Name\t\tSubject\n");
while(rec.next()) {
System.out.println(rec.getString(3) + "\t\t" + rec.getString(4) + "\t\t" + rec.getString(5) /* + rec2.getString(1) */ );
st.close();
catch (SQLException s) {
System.out.println("SQL Error: " + s.toString() + " " + s.getErrorCode() + " " + s.getSQLState());
catch (Exception e) {
System.out.println("Error: " + e.toString() + e.getMessage());
class PassDB extends javax.swing.JFrame implements ActionListener {
static boolean getOut = false;
JTextField uname = new JTextField(10);
JTextField pword = new JTextField(10);
// JPasswordField pword = new JTextField(10);
public PassDB() {
super("duBe's database logon");
setSize(220, 160);
setDefaultCloseOperation(EXIT_ON_CLOSE);
JPanel pane = new JPanel();
JLabel unameLabel = new JLabel ("Username: ");
JLabel pwordLabel = new JLabel ("Password: ");
JButton submit = new JButton("OK");
submit.addActionListener(this);
pane.add(unameLabel);
pane.add(uname);
pane.add(pwordLabel);
pane.add(pword);
pane.add(submit);
setContentPane(pane);
while(getOut == false)
setVisible(true);
public void actionPerformed(ActionEvent evt) {
PassDB clicked = (PassDB)evt.getSource();
DBQuery.username = uname.getText();
DBQuery.password = pword.getText();
getOut = true;
} Any advice is greatly appreciated
duBe -
Problems setting up an NFS server
Hi everybody,
I just completed my first arch install. :-)
I have a desktop and a laptop, and I installed Arch on the desktop (the laptop runs Ubuntu 9.10). I had a few difficulties here and there, but I now have the system up and running, and I'm very happy.
I have a problem setting up an NFS server. With Ubuntu everything was working, so I'm assuming that the Ubuntu machine (client) is set-up correctly. I'm trying to troubleshoot the arch box (server) now.
I followed this wiki article: http://wiki.archlinux.org/index.php/Nfs
Now, I have these problems:
- when I start the daemons, I get:
[root@myhost ~]# /etc/rc.d/rpcbind start
:: Starting rpcbind [FAIL]
[root@myhost ~]# /etc/rc.d/nfs-common start
:: Starting rpc.statd daemon [FAIL]
[root@myhost ~]# /etc/rc.d/nfs-server start
:: Mounting nfsd filesystem [DONE]
:: Exporting all directories [BUSY] exportfs: /etc/exports [3]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.1/24:/home".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
[DONE]
:: Starting rpc.nfsd daemon [FAIL]
- If I mount the share on the client with "sudo mount 192.168.1.20:/home /media/desktop", IT IS mounted but I can't browse it because I have no privileges to access the home directory for the user.
my /etc/exports looks like this:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home 192.168.1.1/24(rw,sync,all_squash,anonuid=99,anongid=99))
/etc/conf.d/nfs-common.conf:
# Parameters to be passed to nfs-common (nfs clients & server) init script.
# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".
# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=
# Options to pass to rpc.statd.
# See rpc.statd(8) for more details.
# N.B. statd normally runs on both client and server, and run-time
# options should be specified accordingly. Specifically, the Arch
# NFS init scripts require the --no-notify flag on the server,
# but not on the client e.g.
# STATD_OPTS="--no-notify -p 32765 -o 32766" -> server
# STATD_OPTS="-p 32765 -o 32766" -> client
STATD_OPTS="--no-notify"
# Options to pass to sm-notify
# e.g. SMNOTIFY_OPTS="-p 32764"
SMNOTIFY_OPTS=""
# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=
# Options to pass to rpc.idmapd.
# See rpc.idmapd(8) for more details.
IDMAPD_OPTS=
# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=
# Options to pass to rpc.gssd.
# See rpc.gssd(8) for more details.
GSSD_OPTS=
# Where to mount rpc_pipefs filesystem; the default is "/var/lib/nfs/rpc_pipefs".
PIPEFS_MOUNTPOINT=
# Options used to mount rpc_pipefs filesystem; the default is "defaults".
PIPEFS_MOUNTOPTS=
/etc/hosts.allow:
nfsd: 192.168.1.0/255.255.255.0
rpcbind: 192.168.1.0/255.255.255.0
mountd: 192.168.1.0/255.255.255.0
Any help would be very appreciated!Thanks, I finally got it working.
I realized that even though both machines had the same group, my Ubuntu machine (client) group has GID 1000, while the Arch one has GID 1001. I created a group that has GID 1001 on the client, and now everything is working.
I'm wondering why my Arch username and group both have 1001 rather than 1000 (which I suppose would be the default number for the first user created).
Anyway, thanks again for your inputs.
Maybe you are looking for
-
Automatic PO creation - only for PRs based on catalog SRM/EBP items
Dear Experts, i am facing the following question w.r.t. automatic PO creation: Is it possible to have automatic PO creation in R/3 only for those purchase requisition items, that are based on shopping cart/EBP/SRM items that are from a third party pu
-
it connects to wifi at my uncles and at school. i dont understand why it wont connect at home, im starting to regret getting this. please help. i have a research paper due soon and i need to be able to do research at home!! PLEASE HELP ME!!!
-
Trying to transfer images and MP3 from PC to MacBook Pro w/Retina Display
-
Not all of my movies import to iPhoto.
Are you able to tell me which format is accepted please, and how do I convert it so I can bring them in? Sometimes if I do it one at a time it works but I have many to import. Thanks for your help.
-
Hi Everybody, I have a serious problem. I want to compile a Java file withing another Java program, without using the "javac" command or this compiler. Is there any function or class which helps compile a Java source file created withing another Java