Invalidate problem with Opera

2010-06-11 Thread Søren Blidorf
In my webapp I use session.invalidate().

 

It works fine in IE, but not in Opera.

 

I get no error but the user is still logged in.

 

Any idears?

 

Soren

 



OT: Pluto and Tomcat

2010-06-03 Thread Søren Blidorf
Hi.

 

I am new to portlets and Pluto.

 

I have installed Pluto on my existing Tomcat and it works fine.

 

However I am having difficulties setting up a helloworld portlet.

 

I have created the portlet.xml and the helloworld.java. Compiled and deploy
but nothing happens.

 

I have tried different examples on google, but nothing works.

 

Does anybody have a helloworld.war file of a describsion for dummies on how
to get a helloworld to work on tomcat/Pluto?

 

Soren

 



Tomcat and Pluto

2010-06-02 Thread Søren Blidorf
Hi.

 

I am trying to use Pluto together with Tomcat.

 

When I use the startup.bat I get a CATALINA_HOME problem: Environment
variables not defined correctly. I cannot see any problems with my
CATALINA_HOME (C:\Programmer\Apache Software Foundation\Tomcat 5.5)

 

Any idears?

 

Soren 



Where to place log4j.properties

2010-05-25 Thread Søren Blidorf
Hi.

 

Where in my war file should log4j.properties be?

 

I have it in WEB-INF/classes but it seems like it can’t be found.

 

I get: No appender could be found for logger (org.apache.jasper.JspC) when I
compile.

 

Soren, DK



Scheduling an action

2010-05-18 Thread Søren Blidorf
Hi.

 

I am trying to schedule an action in tomcat.

 

What I want is to setup Tomcat to start an struts action mapping when a date
in my mysql db equals now().

 

Fx a calendar reminder.

 

Hope it makes sense.

 

Soren

 



OT: Refresh (f5) add(calendar.MONTH, adj) problem

2010-04-21 Thread Søren Blidorf
I have a page that changes month by request.getParameter(”adj”).

 

How do I avoid add(calendar.MONTH, adj) when refresh(f5) is pressed

 

I know its off topic, but does anybody have an idear?

 

Soren, DK



set time out based on userInRole

2010-04-19 Thread Søren Blidorf
Is it possible to set time out time on the server base don how is logged
id

 

Soren, DK

 



SV: set time out based on userInRole

2010-04-19 Thread Søren Blidorf
Sure.

Fx if you are admin no connectionTimeout and if you are user
connectionTimeout 20 min

Soren

-Oprindelig meddelelse-
Fra: Pid [mailto:p...@pidster.com] 
Sendt: 19. april 2010 13:55
Til: Tomcat Users List
Emne: Re: set time out based on userInRole

On 19/04/2010 12:51, Søren Blidorf wrote:
 Is it possible to set time out time on the server base don how is logged
 id

Any chance you can rephrase the question?


p




-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



JSP not updated before app reload

2010-04-08 Thread Søren Blidorf
Hi.

 

I am working on a project and suddenly when I make a change in my JSP I have
to reload my app before the code is updated in the browser.

 

I can’t think of any changes I have made that should cause this.

 

Any idears.

 

Soren, DK

 



path in context.xml

2010-03-24 Thread Søren Blidorf
I am trying to configure context in a META-INF context.xml which is new to
me.

I have set my path to myPath and when I am deploying my myWar.war I
thought that my app would be called myPath but instead, as usual, it is
called myWar.

What am I doing wrong??? What is path for???

Soren, DK


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



OT: Howto exclude files/folders i .war

2010-03-24 Thread Søren Blidorf
Can anybody tell me how to exclude files/folders in my .war.

 

I am using Jbuilder 2006.

 

Soren, DK



SV: SV: Icons ?

2010-03-09 Thread Søren Blidorf
Never used them. I think they can be used in the manager.

Like the display name is shown in the manager!!!

Søren

-Oprindelig meddelelse-
Fra: Ashika Umanga Umagiliya [mailto:auma...@biggjapan.com] 
Sendt: 9. marts 2010 09:11
Til: Tomcat Users List
Emne: Re: SV: Icons ?

Thanks Søren for the tip,

But what are small-icon and large-icon elements functionality ?

regards

Søren Blidorf wrote:
 It's not a favicon. Like in the addressbar. If that's what you mean.

 For that use link rel=shortcut icon href=favicon.ico on your
webpage.

 Søren

 -Oprindelig meddelelse-
 Fra: Mark Thomas [mailto:ma...@apache.org] 
 Sendt: 9. marts 2010 08:45
 Til: Tomcat Users List
 Emne: Re: Icons ?

 On 09/03/2010 01:36, Ashika Umanga Umagiliya wrote:
   
 Greetings friends,

 Has the icon usage feature implemented in Tomcat :

 icon
 small-icon/icons/small-icon.gif/small-icon
 large-icon/icons/large-icon.ico/large-icon
 /icon

 This wont show any icon in my browser?
 

 Where are you expecting them to show up?

 Mark



 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org


 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org

   



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: Icons ?

2010-03-08 Thread Søren Blidorf
It's not a favicon. Like in the addressbar. If that’s what you mean.

For that use link rel=shortcut icon href=favicon.ico on your webpage.

Søren

-Oprindelig meddelelse-
Fra: Mark Thomas [mailto:ma...@apache.org] 
Sendt: 9. marts 2010 08:45
Til: Tomcat Users List
Emne: Re: Icons ?

On 09/03/2010 01:36, Ashika Umanga Umagiliya wrote:
 Greetings friends,

 Has the icon usage feature implemented in Tomcat :

 icon
 small-icon/icons/small-icon.gif/small-icon
 large-icon/icons/large-icon.ico/large-icon
 /icon

 This wont show any icon in my browser?

Where are you expecting them to show up?

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



When I link to a *.do I get Page not found

2010-02-27 Thread Søren Blidorf
I have made a struts application and it works just fine on my testserver.

 

I have now uploaded it to my hosted webserver and struts does not work.

 

When I link to a *.do I get “Page not found”

 

Could it be a Tomcat config problem. Placing the jars and classes ect.

 

Struts 1.2 // Tomcat 5.5

 

Soren

 



SV: When I link to a *.do I get Page not found

2010-02-27 Thread Søren Blidorf
I dont have full acces to logs, but no error comes in stdout or stderr.

Same tomcat version. But not sure about the jvm - I'll start there.

Thanks.

-Oprindelig meddelelse-
Fra: David Smith [mailto:d...@cornell.edu] 
Sendt: 27. februar 2010 15:17
Til: Tomcat Users List
Emne: Re: When I link to a *.do I get Page not found

On 2/27/2010 8:31 AM, Søren Blidorf wrote:
 I have made a struts application and it works just fine on my testserver.

  

 I have now uploaded it to my hosted webserver and struts does not work.

  

 When I link to a *.do I get “Page not found”

  

 Could it be a Tomcat config problem. Placing the jars and classes ect.

  

 Struts 1.2 // Tomcat 5.5

  

 Soren

  


   
You'll have to look at your logs. It could be a lot of things causing a
404 response including an error that prevents the servlet from being
initialized. Are you sure your test environment matches the hosted
server's version of tomcat and jvm?

--David

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



ROOT.war - how to access web.xml

2010-02-27 Thread Søren Blidorf
I have deployed my ROOT.war file. Is there any way to access the web.xml.

 

I save db login info in it and I would like to be able to deploy the same
ROOT.war file on different sites and only change the web.xml after.

 

Soren

 



SV: ROOT.war - how to access web.xml

2010-02-27 Thread Søren Blidorf
Hi.

Thanks, but I dont know what you mean.

Kind of newbie in .war

-Oprindelig meddelelse-
Fra: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sendt: 27. februar 2010 19:04
Til: Tomcat Users List
Emne: Re: ROOT.war - how to access web.xml

2010/2/27 Søren Blidorf so...@nolas.dk:
 I have deployed my ROOT.war file. Is there any way to access the web.xml.

 I save db login info in it and I would like to be able to deploy the same
 ROOT.war file on different sites and only change the web.xml after.

ssh + vi should do it, eh?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: ROOT.war - how to access web.xml

2010-02-27 Thread Søren Blidorf
When it is deployed the only thing I see when I FTP the site is the ROOT.war
file.

-Oprindelig meddelelse-
Fra: Hassan Schroeder [mailto:hassan.schroe...@gmail.com] 
Sendt: 27. februar 2010 19:10
Til: Tomcat Users List
Emne: Re: ROOT.war - how to access web.xml

2010/2/27 Søren Blidorf so...@nolas.dk:

 Thanks, but I dont know what you mean.

Assuming your war is being expanded, log in and edit the file.

Or is that an incorrect assumption?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: ROOT.war - how to access web.xml

2010-02-27 Thread Søren Blidorf
Great. I'll try that.

Thanks alot

-Oprindelig meddelelse-
Fra: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sendt: 27. februar 2010 19:21
Til: Tomcat Users List
Emne: RE: ROOT.war - how to access web.xml

 From: Søren Blidorf [mailto:so...@nolas.dk]
 Subject: ROOT.war - how to access web.xml
 
 I have deployed my ROOT.war file. Is there any way to access
 the web.xml.
 
 I save db login info in it and I would like to be able to 
 deploy the same ROOT.war file on different sites and only 
 change the web.xml after.

Don't put the site-specific parameters in web.xml.  Instead, nest them
inside a Context element in a companion file to be located in
conf/Catalina/[host]/ROOT.xml on each server.  Use the Parameter or
Environment elements as appropriate.

Look here for details:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Context%20Parame
ters
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Environment%20En
tries

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



SV: ROOT.war - how to access web.xml

2010-02-27 Thread Søren Blidorf
By the way.

I also have info as init-param in my struts servlet configured in the
web.xml

So I guess I should just loose the getServlet.getInitParameter and just use
getServletContext().getInitParameter???

By the way I don’t have access to the conf. I guess I have access to ROOT or
webapps. Can I put the context.xml fil there?

-Oprindelig meddelelse-
Fra: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sendt: 27. februar 2010 19:21
Til: Tomcat Users List
Emne: RE: ROOT.war - how to access web.xml

 From: Søren Blidorf [mailto:so...@nolas.dk]
 Subject: ROOT.war - how to access web.xml
 
 I have deployed my ROOT.war file. Is there any way to access
 the web.xml.
 
 I save db login info in it and I would like to be able to 
 deploy the same ROOT.war file on different sites and only 
 change the web.xml after.

Don't put the site-specific parameters in web.xml.  Instead, nest them
inside a Context element in a companion file to be located in
conf/Catalina/[host]/ROOT.xml on each server.  Use the Parameter or
Environment elements as appropriate.

Look here for details:
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Context%20Parame
ters
http://tomcat.apache.org/tomcat-6.0-doc/config/context.html#Environment%20En
tries

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you received
this in error, please contact the sender and delete the e-mail and its
attachments from all computers.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



sessionDestroyed don't respond to the user closing t he browser window

2007-07-20 Thread Søren Blidorf
Hi.

 

I am trying to get the number of sessions that is active.

 

I have made a SessionListener and every thing works as I intended except
that the “sessionDestroyed” don’t respond to the user closing the browser
window.

 

I there a way to destroy/invalidate a session when the browser is closed
without using javascript:onunload

 

Soren, DK



How many jsessionid's is valid in my webapp

2007-07-10 Thread Søren Blidorf
Hi.

Is there a why to tell how many jsessionid's is valid in my webapp.

I want to use it to display the number of online users?

Also is there a way to connect the username from my realm to the
jsessionid so that I can display online users?

BR

Soren, DK


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



SV: How many jsessionid's is valid in my webapp

2007-07-10 Thread Søren Blidorf
Hi Chuck

Yes active is probably a better term.

I will take a look at HttpSessionListener. Any code examples will be
greatly appreciated

Soren

-Oprindelig meddelelse-
Fra: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sendt: 10. juli 2007 19:35
Til: Tomcat Users List
Emne: RE: How many jsessionid's is valid in my webapp

 From: Søren Blidorf [mailto:[EMAIL PROTECTED] 
 Subject: How many jsessionid's is valid in my webapp
 
 Is there a why to tell how many jsessionid's is valid in my webapp.

Not sure what you mean by valid here; would active be a better term?

 I want to use it to display the number of online users?

Create an HttpSessionListener (see section 10 of the servlet spec), and
have it keep track of who's logging in and out.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Realm problems - security issues?

2007-07-06 Thread Søren Blidorf
Hi.

I am having trouble setting up my application on a new laptop running XP.

Every thing works perfectly on my old laptop with the same software versions.

Only change is microsoft update upgrades. So I think that it could be security 
issues.

Any Idears???

BR

Soren, DK


Context path=/um docBase=c:/projects/um_fsik/um 
 debug=0 reloadable=true
 Realm  name=UMRealm className=org.apache.catalina.realm.JDBCRealm
 debug=99 driverName=com.microsoft.jdbc.sqlserver.SQLServerDriver
 
connectionURL=jdbc:microsoft:sqlserver://127.0.0.1;DatabaseName=XXX;ProgramName=XXX;SelectMethod=cursor
 
 connectionName=XXX connectionPassword=XXX userTable=users 
userNameCol=username userCredCol=password userRoleTable=user_roles 
roleNameCol=rolename /
/Context

*FROM LOG*

[ERROR] um] - Exception performing authentication 
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver 
for JDBC]Error establishing socket.java.sql.SQLException: 
[Microsoft][SQLServer 2000 Driver for JDBC]Error 
establishing socket.
at 
com.microsoft.jdbc.base.BaseExceptions.createException
(Unknown Source)
at 
com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at 
com.microsoft.jdbc.base.BaseExceptions.getException
(Unknown Source)
at 
com.microsoft.jdbc.sqlserver.tds.TDSConnection.init
(Unknown Source)
at 
com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open
(Unknown Source)
at 
com.microsoft.jdbc.base.BaseConnection.getNewImplConnection
(Unknown Source)
at com.microsoft.jdbc.base.BaseConnection.open
(Unknown Source)
at com.microsoft.jdbc.base.BaseDriver.connect
(Unknown Source)
at org.apache.catalina.realm.JDBCRealm.open
(JDBCRealm.java:699)
at org.apache.catalina.realm.JDBCRealm.authenticate
(JDBCRealm.java:344)
at 
org.apache.catalina.authenticator.FormAuthenticator.authent
icate(FormAuthenticator.java:257)
at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke
(AuthenticatorBase.java:416)
at 
org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:869)
at 
org.apache.coyote.http11.Http11BaseProtocol$Http11Connectio
nHandler.processConnection(Http11BaseProtocol.java:664)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.r
un(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

[DEBUG] ApplicationDispatcher - 
servletPath=/public/loginError.jsp, pathInfo=null, 
queryString=null, name=null
[DEBUG] ApplicationDispatcher -  Path Based Forward
[DEBUG] JspServlet - JspEngine -- /public/loginError.jsp
[DEBUG] JspServlet -  
ServletPath: /public/loginError.jsp
[DEBUG] JspServlet - PathInfo: null
[DEBUG] JspServlet - RealPath: 
C:\projects\um_fsik\um\public\loginError.jsp
[DEBUG] JspServlet -   
RequestURI: /um/public/loginError.jsp
[DEBUG] JspServlet -  QueryString: null
[DEBUG] JspServlet -   Request Params: 
[DEBUG] JspServlet - j_username = XXX
[DEBUG] JspServlet - j_password = XXX
[DEBUG] ApplicationDispatcher -  Disabling the response 
for futher output
[DEBUG] AuthenticatorBase -  Failed authenticate() 
test ??/um/login/j_security_check
[DEBUG] AuthenticatorBase - Security checking request 
GET /um/login/um.jsp
[DEBUG] AuthenticatorBase -  Calling hasUserDataPermission
()
[DEBUG] AuthenticatorBase -  Calling authenticate()
[DEBUG] FormAuthenticator - Save request in 
session '69C7CDF7181DB575FAECF7D04492F180'
[DEBUG] ApplicationDispatcher - 
servletPath=/public/login.jsp, pathInfo=null, 
queryString=null, name=null
[DEBUG] ApplicationDispatcher -  Path Based Forward
[DEBUG] JspServlet - JspEngine -- /public/login.jsp
[DEBUG] JspServlet -  ServletPath: /public/login.jsp
[DEBUG] JspServlet - PathInfo: null
[DEBUG] JspServlet - RealPath: 
C:\projects\um_fsik\um\public\login.jsp
[DEBUG] JspServlet -   
RequestURI: /um/public/login.jsp
[DEBUG] JspServlet -  QueryString: null
[DEBUG] JspServlet -   Request Params: 
[DEBUG] ApplicationDispatcher -  Disabling the response 
for futher output
[DEBUG] AuthenticatorBase -  Failed authenticate() test



Med venlig hilsen

Søren Blidorf
Nolas Consulting
Web:  http://www.nolas.dk
Mobil: +45 61676513


Realm works; db connection does not?

2007-06-22 Thread Søren Blidorf
Hi.

My realm is working and is able to login to my app. When I try to do anything 
in the application that need connection to db, I get a white screen.

Can anybody tell me the differance between the realm connection to the db and 
my applications connection to the db.

I use: com.microsoft.sqlserver.jdbc.SQLServerDriver and jdbc:sqlserver

Any idears is appriciated

Soren


Re: Realm works; db connection does not?

2007-06-22 Thread Søren Blidorf
Hi again.

I do mean realm and the reason why I mention it is that I can validate users
via my users and user_roles in my db, so the connection should work I guess?


Context path=/xx docBase=webapp reloadable=true
Manager pathname=xx /
 Realm  name=UMRealm
className=org.apache.catalina.realm.JDBCRealm
 debug=99
driverName=com.microsoft.sqlserver.jdbc.SQLServerDriver

connectionURL=jdbc:sqlserver://127.0.0.1;DatabaseName=xx;ProgramName=xx;Sel
ectMethod=cursor
 connectionName=xx connectionPassword=xx userTable=users
userNameCol=username userCredCol=password userRoleTable=user_roles
roleNameCol=rolename /
/Context

Get the connection with: DriverManager.getConnection(connectionUrl,
connectionUser,connectionPass)

I also just upgrade my struts could it be a taglib thing?

In my JSP:

%@ taglib uri=http://struts.apache.org/tags-bean; prefix=bean %

%@ taglib uri=http://struts.apache.org/tags-html; prefix=html %

%@ taglib uri=http://struts.apache.org/tags-logic; prefix=logic %

%@ taglib uri=http://struts.apache.org/tags-nested; prefix=logic %

In my web.xml:

  taglib
taglib-urihttp://struts.apache.org/tags-bean/taglib-uri
taglib-location/WEB-INF/struts-bean.tld/taglib-location
  /taglib
  taglib
taglib-urihttp://struts.apache.org/tags-html/taglib-uri
taglib-location/WEB-INF/struts-html.tld/taglib-location
  /taglib
  taglib
taglib-urihttp://struts.apache.org/tags-logic/taglib-uri
taglib-location/WEB-INF/struts-logic.tld/taglib-location
  /taglib
  taglib
taglib-urihttp://struts.apache.org/tags-nested/taglib-uri
taglib-location/WEB-INF/struts-nested.tld/taglib-location
  /taglib

- Original Message -
From: Johnny Kewl [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, June 22, 2007 1:00 PM
Subject: Re: Realm works; db connection does not?



 Hi Søren,

 Not sure what you saying but arnt you confusing Realm and JNDI.
 ie the Realm is for your user and password dB
 and JNDI/DBCP is for you to do other stuff with your dB

 Think you almost there just check out
 http://localhost:8080/tomcat-docs/jndi-resources-howto.html
 on your system

 If this is not the problem, please post your config and code you using

 - Original Message -
 From: Søren Blidorf [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Sent: Friday, June 22, 2007 10:44 AM
 Subject: Realm works; db connection does not?


 Hi.

 My realm is working and is able to login to my app. When I try to do
 anything in the application that need connection to db, I get a white
 screen.

 Can anybody tell me the differance between the realm connection to the db
 and my applications connection to the db.

 I use: com.microsoft.sqlserver.jdbc.SQLServerDriver and jdbc:sqlserver

 Any idears is appriciated

 Soren


 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Realm works; db connection does not?

2007-06-22 Thread Søren Blidorf
Thanks. I will look at that.

This is my connection:

package um.persistence;

import java.sql.Connection;
import java.sql.SQLException;
import javax.servlet.http.HttpServlet;
import java.sql.DriverManager;

public class PersistenceFacade {

  //--- fields -//

 public static final String CONNECTION_DRIVER =
com.microsoft.sqlserver.jdbc.SQLServerDriver;
 public static final String CONNECTION_USER   = username;
 public static final String CONNECTION_PASS   = password;
 public static final String CONNECTION_URL= url;

 static {
try {
  Class.forName(CONNECTION_DRIVER);
} catch (ClassNotFoundException ex) {
   ex.printStackTrace();
}
 }

 private String connectionUrl  = null;
 private String connectionUser = null;
 private String connectionPass = null;



 // constructors ---//

 //public PersistenceFacade() {}

 public PersistenceFacade(HttpServlet servlet) {
  connectionUser = servlet.getInitParameter(CONNECTION_USER);
  connectionPass = servlet.getInitParameter(CONNECTION_PASS);
  connectionUrl  = servlet.getInitParameter(CONNECTION_URL);
 }

 //- public methods ---//

 public Connection getConnection() throws SQLException {

System.err.println(getConnection startet!);

  if(connectionUser == null) {
   throw new SQLException(Missing parameter +CONNECTION_USER);
  } else if(connectionPass == null) {
   throw new SQLException(Missing parameter +CONNECTION_PASS);
  } else if(connectionUrl == null) {
   throw new SQLException(Missing parameter +CONNECTION_URL);
  }
  return DriverManager.getConnection(
connectionUrl,
connectionUser,
connectionPass
  );
 }

 public void closeConnection(Connection conn) {
try {
  if(!conn.isClosed()) {
conn.close();
  }
} catch (SQLException ex) {
   ex.printStackTrace();
}
 }

 // private methods --//
}


And I call the PersistenceFacade like this:

PersistenceFacade persistenceFacade = new PersistenceFacade(getServlet());

conn = persistenceFacade.getConnection();

I get no errors only a white screen!



- Original Message -
From: Christopher Schultz [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Friday, June 22, 2007 2:26 PM
Subject: Re: Realm works; db connection does not?


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Søren,

 Søren Blidorf wrote:
  I do mean realm and the reason why I mention it is that I can validate
users
  via my users and user_roles in my db, so the connection should work I
guess?

 That depends upon your connection settings.

  Context path=/xx docBase=webapp reloadable=true
   Realm  name=UMRealm

 This looks good... and it should, since it apparently works.

  Get the connection with: DriverManager.getConnection(connectionUrl,
  connectionUser,connectionPass)

 This is just about the simplest way to get a connection. Are you using
 the same URL, username, and password? I don't see why this wouldn't
 work. On the other hand, I'd never do it this way: I'd use a connection
 pool (see below).

  I also just upgrade my struts could it be a taglib thing?

 This should have nothing to do with either Struts or your taglibs
 (unless you use taglibs for SQL queries... shiver).

 My recommendation is to use a JNDI datasource and then use that for both
 your in-app database connections as well as the Realm. Basically,
 you change your Context element to include:

 Resource [see documentation for JNDI DataSource] /
 Realm [see documentation for DataSourceRealm;
 don't forget to set localDataSource=true] /

 Then, in your code, you'll need a slightly more complicated way of
 getting a database connection. But, you already have your get
 connection logic in a method used everywhere, right?

 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.swl.DataSource;

 public Connection getConnection()
 throws SQLException, NamingException
 {
 Context ctx = new InitialContext();

 DataSource ds = (DataSource)ctx.lookup(DATASOURCE_PATH);

 if(null == ds)
 throw new NamingException(Cannot obtain DataSource);

 return ds.getConnection();
 }

 This way, both the Realm and your application are using the same pool of
 connections. This avoids weird situations where your realm works but not
 your application (and vice versa).

 Hope that helps,
 - -chris
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.7 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

 iD8DBQFGe8AQ9CaO5/Lv0PARAmz5AJoCusXnwWzOobA8UaJxaLp0iJfdMwCguf9S
 OpmaxB78ll5KigAJdUB4At4=
 =Q5C4
 -END PGP SIGNATURE-

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED

The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

2007-06-21 Thread Søren Blidorf

I have just upgraded to Tomcat 6 and get the following error:

INFO: The Apache Tomcat Native library which allows optimal performance in 
production environments was not found on the java.library.path: 
C:\Programmer\Apache Software Foundation\Tomcat 
6.0\bin;.;C:\WINDOWS\System32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBEM;C:\Programmer\Fælles
 filer\Adaptec Shared\System;C:\Programmer\ATI Technologies\ATI Control 
Panel;C:\Programmer\Microsoft SQL Server\80\Tools\BINN

Can anybody tell me what is wrong?

Soren


HTTP Status 408

2006-11-01 Thread Søren Blidorf
Hi I am trying to setup my webapp.

I am using:
MS windows server 2003
Tomcat 5.5.20
MS SQL server 2000

I am trying to setup realm

I get a login error when the username or password is wrong but when it
is correct I get the following error

HTTP Status 408 - The time allowed for the login process has been
exceeded. If you wish to continue you must either click back twice and
re-click the link you requested or close and re-open your browser




type Status report

message The time allowed for the login process has been exceeded. If you
wish to continue you must either click back twice and re-click the link
you requested or close and re-open your browser

description The client did not produce a request within the time that
the server was prepared to wait (The time allowed for the login process
has been exceeded. If you wish to continue you must either click back
twice and re-click the link you requested or close and re-open your
browser).

I really need help. Any info is greatly appriciated



-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]