Help coderanch get a
new server
by contributing to the fundraiser

Ramin Esfandiari

Greenhorn
+ Follow
since Mar 15, 2013
Ramin likes ...
Eclipse IDE Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ramin Esfandiari

I have a class (B) which extends parent (A) which is serializable. Object A has a generated SerialVersionUID but B does not.

When reading an ObjectInputStream that should contain objects of type B, I sometimes get objects of type A.
Why is that?
I have a theory that it is because class B is missing a SeriealVersionUID so when deserializing the parent type (A) is read instead of the child type (B) and if this is the case why does this only happen occasionally?



Thanks
10 years ago
Sorry I posted the top one incomplete by mistake.

Below lines enable me to simply enter "myserver" and be redirected to the page I want

# If no context in URL, redirect to pageC
RewriteRule ^/$ /myserver/pageA/pageB/pageC [R]

However I need to enter /myserver/pageA/pageB/ and be redirected to /myserver/pageA/pageB/pageC.

Any advice?

Thanks
11 years ago
Hi

I am trying to redirect all requested pages to one page.

I have the following

# If no context in URL, redirect to pageC
RewriteRule ^/$ /myserver/pageA/pageB/pageC [R]

This
11 years ago
Thanks for the reply.

Apologies, but I am a bit confused. I am interested in the response I get from my server. I need something that I can use in the browser to say cause a page 500 error so I can see how my custom error 500 page looks. Can I do this with response.sendError(-)?

Thanks
11 years ago
Hi

I have set up my custom error pages in Tomcat 7 (running from eclipse). For testing that they work I can simply misspell a url and get my custom page 404 error, however I am not sure how I can replicate the following errors.

400, 401, 403, 500 and 503.

Any advice would be greatly appreciated.

Thanks


11 years ago
Thanks a lot for the great answer. You have definitely saved me a lot of hassle in the future. The following does the trick:

href="<%= request.getContextPath() %>/error/styles/style.css"

11 years ago
JSP
Hi

The answer is:

<link rel="stylesheet" type="text/css" href="../error/styles/style.css">

Thanks
11 years ago
JSP
Hi

I have a custom page 404 jsp page that works fine but does not pick up the css (and image).

My directory structure:
-webapp
- -error
- - -jsp
- - - -page404.jsp
- - -styles
- - - -style.css

I have tried the following but still got no result(don's want to do embedded css because it is not only the css that I need to reference in my JSP)

<link rel="stylesheet" type="text/css" href="../styles/style.css">
<link rel="stylesheet" type="text/css" href="style.css">
<link rel="stylesheet" type="text/css" href="/style.css">
<link rel="stylesheet" type="text/css" href="./style.css">
and a few more...

Any advice?

Thanks
11 years ago
JSP
Hi

I have a folder(PageNotFound) that contains a html, a css and a png file which together form my custom page not found page.

I have placed this folder in Apache2/error and have the following in my httpd.conf

ErrorDocument 404 /error/PageNotFound/page404.html

However when run, Apache sticks a htdocs in the url looking for the page in /Apache2/htdocs/error/PageNotFound/page404.html

How can I change this to search tht error folder instead?

Also the css and the png don't seem to be picked when I put my files in htdocs.

Thanks



11 years ago
Hi

I have a web application that runs on Tomcat 7.0.34. When the server is running, I expect to see page 404 error when I enter an incorrect url (say I have localhost:8080/home/app and I type in localhost:8080/home/someNonExistingPage ) but instead I get "Oops! This link appears to be broken." (in Chrome) and nothing in Firefox.

I have both Apache HTTP and Tomcat server installed. How can I replicate a page 404 error?

Many thanks in advance
Ramin

11 years ago
The solution is changing component to SortableTable:
11 years ago
I don't remember what I did that made me believe that the issue is the first parameter but now that you mentioned it, when I change the second parameter to null it compiles fine. I am kinda confused now.
This is my visitor:
11 years ago