James Byars

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

Recent posts by James Byars

Matt Cartwright wrote:
the default listener address is "*" or when setting it in the console or via JMX, an empty string ("").
This will cause the WL Server instance to listen on all available interfaces on that box.

So, if you have a listen address specified, just replace it with an empty String.
When using the console, just leave that field blank, save and activate, then restart...

If you want to listen only on dedicated interfaces, configuring channels is the way forward.

Hope that helps.
Matt





Thanks, Matt, yes, that worked
13 years ago

James Byars wrote:Hi,

My Linux box has Weblogic running on it. It also has two network interface cards, and hence has two different IP addresses. I want users to be able to access my Weblogic using either of the IP addresses. How can I do this?

Thanks.




Sorry for bumping up, but I have waited rather long for an answer.

Can anyone help?

Thanks.
13 years ago
Hi,

My Linux box has Weblogic running on it. It also has two network interface cards, and hence has two different IP addresses. I want users to be able to access my Weblogic using either of the IP addresses. How can I do this?

Thanks.
13 years ago
hi all,

i am writing a program where i will have a list of two objects, the first will be a string, and the second an integer.

e.g.

list = ((string1, int1), (string2, int2) ... (stringN, intN))

i then have to go through the list of these two objects, look at intX, do some calculation on it, and depending on the result, put (stringX, intX) it into another list.

can someone please suggest to me what data structure would be best to use for (stringN, intN). I am just thinking of simply having a Vector for each (stringN, intN) i.e. have a list of Vectors, but maybe there is a better way?

thanks
14 years ago
hi guys,

i am using a linux box and there is some java programs on it

the CLASSPATH is not set, so i am curious as to how the programs are all running?

also, in one file i am getting an error that

does this mean that the jar for CheckRAF is missing from the CLASSPATH? But then that confuses me, because the CLASSPATH is not set for anything, yet all the other java programs are running.

thanks
14 years ago

David Newton wrote:Webapps disallow file access from the *client* side. The *server* side, i.e. the webapp code, can access any file the user running the Tomcat instance has access to (I think I already said that).



Sorry, you probably did but I am just confused.

At the moment I am displaying an image from $CATALINA_BASE/webapps/test/testImage.jpg

I want the images to instead be in /fs1/images

Are you saying I can use my servlet to a href to an image in /fs1/images?

thanks
15 years ago

David Newton wrote:Um... oh. So the next person that tried to use the interface couldn't even connect?

IMO this is a really bad idea. In any case, server side code can access any file anywhere, if the user running the container has access to the directory/file. I suppose you could look at the Tomcat Ant task to see about how to restart, unless it's set up to restart automagically on a file change. And hope that the user remembers the port they typed in or didn't make a typo.



thanks.

I am trying to link to a file outside my webapps, using rhe page below which I googled, but am confused as to what I should be using for [context-path].xml - my web page address is http://localhost:7777/test/test1

thanks





By default, Tomcat prevents all webapps from accessing files or directories outside the container. Even if you define a symlink inside the container that can be properly navigated outside using the file system, Tomcat's resource loader will normally refuse to follow a symlink.
If you already have a lot of files and directories that you manage elsewhere in the file system, e.g. a photo collection, then you will need to circumvent the security feature in the best way possible.

1. Create a symbolic (soft) link within the jspWiki container to your external directory, e.g.

ln -s /real/path/to/my/photos/ /[tomcat-home]/[webapps-dir]/[wiki-path]/files/photos

1. Verify the new symlink works properly, e.g. these two commands should produce the same results:

ls -l /real/path/to/my/photos/
ls -l /[tomcat-home]/[webapps-dir]/[wiki-path]/files/photos/

1. Permit your webapp to follow symlinks by pre-defining a Context entry in an xml file available to Tomcat when it starts, but outside the webapp container. The path and filename should be...

$CATALINA_HOME/conf/[engine-name]/[host-name]/[context-path].xml

You can discover the correct values for your [engine-name] and [host-name] from your server.xml file, by referring to the Engine and Host xml elements. The [context-path] is the url path to your webapp, e.g. "jspWiki".
The [context-path].xml file can be as simple as this...

<Context allowLinking="true">

1. Finally, restart Tomcat to establish the new environment for your webapp.
15 years ago

David Newton wrote:Why on earth would you want to?



I want to have a user intercfae on my web page which only certain people with an admin role can use to change the port number and restart tomcat.
15 years ago
hi,

how can I update servlet.xml from inside a servlet. I ask this question because we can only access stuff under webapps, server.xml is outside webapps.

thanks
15 years ago
hi,

I have a string that is separated by a delimeter -. I want to basically extract all the values from this string, and check if there is any whitespace between the values.

e.g.

if my string is
hello-world- this - is-me

the values would be
hello
world
this
is
me

and if the string is
hello world- bye-world-hello again world

then the values would be
hello world
bye
world
hello again world

as you can see, in the second example two of the values "hello world", and "hello again world" are separated by whitespaces, and I need to find such values.

thanks

thanks

15 years ago
Please remember that Tomcat does not use the CLASSPATH of your system, it has it's own CLASSPATH.

I was getting this exact error until someone pointed it out to me.
15 years ago
to elaborate, from http://www.onjava.com/pub/a/onjava/2003/05/14/java_webserver.html:

If the request is for a servlet, load the servlet class and invoke its service method, passing the ServletRequest and ServletResponse objects. Note that in this servlet container, the servlet class is loaded every time the servlet is requested.



what does the servlet class is loaded means? That a new instance is created for the servlet? If so, the above is saying that each time a request happens, a new instance of the servlet is created, surely that is wrong, yes?
15 years ago
sorry, I am still confused.

some places seem to say that after the service() method is called, the servlet dies. Others seem to suggest it is kept alive to handle more requests. Which one is true?

thanks
15 years ago
hi guys,

if i have a simple servlet that has a doGet() that simple creates a Date object and then outputs the date to the screen, and say it is accessed by 10 people using their web browsers

1) are 10 servlet instances created? or is just one servlet instance created, and doGet() is executed 10 times, and so each time it is executed, then a Date object is created?
2) how long will the servlet instance stay created for?
3) how long will the date instances stay created for?

thanks
15 years ago

Pat Farrell wrote:

James Byars wrote: I will just use some client side disabling I guess


Seriously, don't do that. It breaks the user's expectations and does not solve your problem.



ok, I won't! I'll find the time to read up on the earlier link and work through it.
15 years ago