Help coderanch get a
new server
by contributing to the fundraiser

Rob Deer

Greenhorn
+ Follow
since Jan 10, 2005
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rob Deer

Ah, thanks! I'm blind as a bat.
17 years ago
I have this code that's giving me error.

/home/dev/WEB-INF/classes/db/mysqlconnector.java



when i compile this below,
/home/dev/WEB-INF/test.java
it gives me the error
mysqlconnector() is not public in db.mysqlconnector; cannot be accessed from outside package
mysqlconnector c = new mysqlconnector();


test.java


Any ideas on what's wrong?
[ February 10, 2007: Message edited by: Ester Wong ]
17 years ago
Is there a way to seperate the classpath for multiple application?
/web1/WEB-INF/lib
/web2/WEB_INF/lib
I currently have both lib directory in the classpath.
17 years ago
can you give a little example on the servlet?
17 years ago
I'm trying to prevent people typing image.jpg in the url to go to the image directly.
17 years ago
Hi, I'm running tomcat webserver standalone. Is there a way to stop hotlinking images? I know you can do this with apache but what about standalone tomcat? Thanks.

EW
17 years ago
Hi, I creating some jsp pages which requires users to login. based on their account credentials, they're assigned certain session objects. when they try to access a page, it will check their session objects. if they have a certain session object required to view a page, it will display it. otherwise they get redirected somewhere else. Just wondering is this a safe in terms of viewing security to have session objects do this? thanks.
17 years ago
JSP
I want to get all the shared printers on the network, find out how many trays each have and mapped them. Can this be done using java?
18 years ago
I have a page called login.jsp. Its a html form which allows people to login. After they login successfully, the login html link disappears and the logout link appears. But the problem is that the visitor can type in login.jsp in the address bar and get there manually. Is there a way to prevent that?
18 years ago
JSP
Thanks!
18 years ago
JSP
Oh, i see. That jsp is part of a html form file. So on first request, its null. Is there a way to keep it from being null on first loading of the form?
18 years ago
JSP
Can you explain a little further? I have, request.setAttribute("error","userinvalid");
in a servlet which forwards to a jsp below.

<%
Object o = request.getAttribute("error");
String error = o.toString();
%>

What's wrong with it?
18 years ago
JSP
Why does this give me NullPointerException?
<%
Object o = request.getAttribute("error");
String error = o.toString();
%>
18 years ago
JSP
I got a html form in /form.jsp which calls a servlet, /validate, to validate form information. if validation doesn't pass, it gets redirected back to form.jsp with error message. to differentiate different types of messages, i pass params to forms.jsp like form.jsp?error=1. However, I don't want to allow people seeing the error message unless it comes from the servlet /validate. I tried using getHeader("referer"), but it seems to get the form.jsp header rather than the /validate servlet. any way around this? Thanks.
18 years ago
I want to put my index.jsp in this directory. /home/www
How should server.xml be setup? I keep getting 404 error or a blank page.

<Host name="localhost" appBase="/home/www"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/home/www" reloadable="true" />
</Host>

tried a ton of configs. still don't work.
18 years ago