comp.lang.java.programmer
http://groups-beta.google.com/group/comp.lang.java.programmer
[EMAIL PROTECTED]

Today's topics:

* Apache 2.0.52 + Tomcat 5.0.28 + mod_jk - 4 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/109f8ba02c1a89f0
* struts validation - sort order of messages - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/50c5d01e913fbe46
* count file pages - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5a8a03f1b71d9c4
* AXIS to emit SoapHeader in WSDL - 2 messages, 2 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c6572aa0541c7f8
* Help for Windows CE - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/22d41cba0f8e9174
* How to underline a string in Java? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61b7646810bb7470
* NoClassDefFoundError on UNIX, but not on PC - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fcd4321ef5ca8215
* dynamically change struts' form's action - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854
* JSTL and Atom feed parsing - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/921a303637ad225f
* deploying to Sun ONE app server? - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e52bec1bdbb29431
* Telnet client - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34b0931dc564995f
* Simple question about GUI - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b45ee198b1c9b650
* Design Question: Access Permissions and Client Synchronisation via a DB - 2 
messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/395d058db0cde3bd
* Help: What is a .do web page extension? - 3 messages, 3 authors
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/399bdb61556ff2ca
* Tomcat JNDI LDAP config object map - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ae4566aeb5ae6f9
* J2ee example in Jboss - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d283362ec4397f86
* minor JAXP annoyance - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d383ed8017967c05
* JSP EL and explicit error messages - 1 messages, 1 author
 
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65e5ee92bf562a84

==============================================================================
TOPIC: Apache 2.0.52 + Tomcat 5.0.28 + mod_jk
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/109f8ba02c1a89f0
==============================================================================

== 1 of 4 ==
Date: Wed, Dec 15 2004 9:04 am
From: "Brent"  

Hi,

I'm trying to connect Apache 2.0.52 with Tomcat 5.0.28 using the mod_jk
connector, to no avail.

The documentation at
http://jakarta.apache.org/tomcat/connectors-doc/index.html only really
covers Tomcat 4.*.

Has anyone been able to do this on a Windows or Linux platform?  Are
there any good resources out there that anyone knows of that I can look
to?

It seems like everything I find refers to mod_jk2, which I just found
out is being discontinued and everything is moving to mod_jk, so I'd
like to use something that will be around for a while.
All help/information is greatly appreciated.

Thanks,
Brent




== 2 of 4 ==
Date: Wed, Dec 15 2004 12:36 pm
From: "Brent"  

Juha,

Thanks for the checklist.  I did find most of the information you
listed and I am now getting errors in my mod_jk.log file.  Would you be
willing to review my config files and error message to see if you
happen to know what is wrong?

workers.properties
----------------------------------------------------------
worker.list=localtomcat

worker.localtomcat.type=ajp13
worker.localtomcat.host=localhost
worker.localtomcat.port=8080
worker.localtomcat.cachesize=50
worker.localtomcat.cache_timeout=600
worker.localtomcat.socket_keepalive=1
worker.localtomcat.reclycle_timeout=300




server.xml (snippets from Tomcat config file)
----------------------------------------------------------
<Server port="8005" shutdown="SHUTDOWN" debug="0">

<Listener
className="org.apache.jk.config.ApacheConfig"
modJk="D:/Apache2/modules/mod_jk.dll"
workersConfig="D:/Apache2/conf/workers.properties"/>

<Service name="Catalina">

<Engine
name="Standalone"
defaultHost="localhost"
debug="0"
jvmRoute="localtomcat">

<Host
name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">

<ApacheConfig
forwardAll="false"
noRoot="false"
jkDebug="info"
jkWorker="localtomcat"
configHome="D:/Apache2/"
jkLog="D:/Apache2/logs/mod_jk.log"
modJk="D:/Apache2/modules/mod_jk.dll"
jkConfig="D:/Apache2/conf/mod_jk.conf"
workersConfig="D:/Apache2/conf/workers.properties"/>

<Ajp13Connector port="8080"/>

<Listener
className="org.apache.jk.config.ApacheConfig"
append="true"
forwardAll="false"
modJk="D:/Apache2/modules/mod_jk.dll"/>

</Host>
</Engine>
</Service>
</Server>



mod_jk.config (I copied and pasted this into my Apache httpd.conf file)
----------------------------------------------------------
########## Auto generated on Wed Dec 15 14:14:20 CST 2004##########

<IfModule !mod_jk.c>
LoadModule jk_module "D:/Apache2/modules/mod_jk.dll"
</IfModule>

JkWorkersFile "D:/Apache2/conf/workers.properties"
JkLogFile "D:/Apache2/logs/mod_jk.log"

JkLogLevel debug

<VirtualHost localhost>
ServerName localhost

#################### localhost:/corpapps ####################

# Static files
Alias /corpapps "D:/tomcat5/webapps/corpapps"

<Directory "D:/tomcat5/webapps/corpapps">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm
</Directory>


# Deny direct access to WEB-INF and META-INF
#
<Location "/corpapps/WEB-INF/*">
AllowOverride None
deny from all
</Location>

<Location "/corpapps/META-INF/*">
AllowOverride None
deny from all
</Location>
#
# Use Directory too. On Windows, Location doesn't work unless case
matches
#
<Directory "D:/tomcat5/webapps/corpapps/WEB-INF/">
AllowOverride None
deny from all
</Directory>

<Directory "D:/tomcat5/webapps/corpapps/META-INF/">
AllowOverride None
deny from all
</Directory>

JkMount /corpapps/UploadFeedServlet  localtomcat
JkMount /corpapps/SetupServlet  localtomcat
JkMount /corpapps/LoginServlet  localtomcat
JkMount /corpapps/*.jspx  localtomcat
JkMount /corpapps/PlacementPerformanceServlet  localtomcat
JkMount /corpapps/*.jsp  localtomcat
JkMount /corpapps/ReconcileServlet  localtomcat
</VirtualHost>



Errror Messages in mod_jk.log file
----------------------------------------------------------
[Wed Dec 15 14:25:04 2004]  [jk_uri_worker_map.c (445)]: Into
jk_uri_worker_map_t::map_uri_to_worker
[Wed Dec 15 14:25:04 2004]  [jk_uri_worker_map.c (459)]: Attempting to
map URI '/corpapps/main.jsp'
[Wed Dec 15 14:25:04 2004]  [jk_uri_worker_map.c (539)]:
jk_uri_worker_map_t::map_uri_to_worker, Found a suffix match
localtomcat -> *.jsp
[Wed Dec 15 14:25:04 2004]  [mod_jk.c (1689)]: Into handler
r->proxyreq=0 r->handler=jakarta-servlet r->notes=4983192
worker=localtomcat
[Wed Dec 15 14:25:04 2004]  [jk_worker.c (90)]: Into
wc_get_worker_for_name localtomcat
[Wed Dec 15 14:25:04 2004]  [jk_worker.c (94)]: wc_get_worker_for_name,
done found a worker
[Wed Dec 15 14:25:04 2004]  [mod_jk.c (472)]: agsp=80 agsn=localhost
hostn=localhost shostn=localhost cbsport=0 sport=0
[Wed Dec 15 14:25:04 2004]  [jk_ajp_common.c (1741)]: Into
jk_worker_t::get_endpoint
[Wed Dec 15 14:25:04 2004]  [jk_ajp_common.c (1367)]: Into
jk_endpoint_t::service
[Wed Dec 15 14:25:04 2004]  [jk_ajp_common.c (257)]: Into
ajp_marshal_into_msgb
[Wed Dec 15 14:25:04 2004]  [jk_ajp_common.c (425)]:
ajp_marshal_into_msgb - Done
[Wed Dec 15 14:25:04 2004]  [jk_connect.c (136)]: Into jk_open_socket
[Wed Dec 15 14:25:04 2004]  [jk_connect.c (143)]: jk_open_socket, try
to connect socket = 1392 to 127.0.0.1:8080
[Wed Dec 15 14:25:05 2004]  [jk_connect.c (159)]: jk_open_socket, after
connect ret = -1
[Wed Dec 15 14:25:05 2004]  [jk_connect.c (188)]: jk_open_socket,
connect() failed errno = 61
[Wed Dec 15 14:25:05 2004]  [jk_ajp_common.c (720)]: Error connecting
to tomcat. Tomcat is probably not started or is listening on the wrong
host/port (127.0.0.1:8080). Failed errno = 61




== 3 of 4 ==
Date: Wed, Dec 15 2004 3:56 pm
From: RC  



Brent wrote:
> Hi,
> 
> I'm trying to connect Apache 2.0.52 with Tomcat 5.0.28 using the mod_jk
> connector, to no avail.
> 
> The documentation at
> http://jakarta.apache.org/tomcat/connectors-doc/index.html only really
> covers Tomcat 4.*.
> 
> Has anyone been able to do this on a Windows or Linux platform?  Are
> there any good resources out there that anyone knows of that I can look
> to?

Very easy, I made them work on my Redhat Linux OS 7.2

1. appended a line to bottom of $APACHE2/conf/httpd.conf

LoadModule jk2_module modules/mod_jk2.so

cp the workers2.properties into $APACHE2/conf/

2. # For your *.jsp files
    mkdir -p $TOMCAT5.28/webapps/your_project/jsp
    # For your servlet *.class files
    mkdir -p $TOMCAT5.28/webapps/your_project/WEB-INF/classes

    create a web.xml file under $TOMCAT5.28/webapps/your_project/WEB-INF
    see it from examples

3. start apache2 and tomcat 5
$APACHE2bin/apachectl start
$TOMCAT5.28/bin/catalina.sh start

Good luck!



== 4 of 4 ==
Date: Wed, Dec 15 2004 1:28 pm
From: "Brent"  

Status - success!

Thanks for everyone's help. (Now the next step is clustering...ugh..I
think the trick is matching the jvmRoute Engine attribute to the load
balancing worker defined in workers.properties...or something along
those lines??)

Couple of things I'd like to mention in case anyone else needs the
information (or I forget!):

server.xml (Should look more like this)
---------------------------------------------------------------
<Server port="8005" shutdown="SHUTDOWN" debug="0">

<!--
Note I had to change the class from
org.apache.ajp.tomcat4.config.ApacheConfig to
org.apache.jk.config.ApacheConfig because the install of Tomcat I have
does not include a jar file that contains the ApacheConfig class in
that package
-->
<Listener
className="org.apache.jk.config.ApacheConfig"
forwardAll="false"
noRoot="false"
jkDebug="info"
jkWorker="localtomcat"
configHome="D:/Apache2/"
jkLog="D:/Apache2/logs/mod_jk.log"
modJk="D:/Apache2/modules/mod_jk.dll"
jkConfig="D:/Apache2/conf/mod_jk.conf"
workersConfig="D:/Apache2/conf/workers.properties"/>

<Service name="Catalina">

<!-- CONNECTOR FOR JK / AJP1.3 -->
<Connector port="8080"
enableLookups="false"
redirectPort="8443"
debug="0"
protocol="AJP/1.3"/>

<Engine
name="Standalone"
defaultHost="localhost"
debug="0"
jvmRoute="localtomcat">

<Host
name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="true"
xmlValidation="false"
xmlNamespaceAware="false">

<!--
Note I had to change the class from
org.apache.ajp.tomcat4.config.ApacheConfig to
org.apache.jk.config.ApacheConfig because the install of Tomcat I have
does not include a jar file that contains the ApacheConfig class in
that package
-->
<Listener
className="org.apache.jk.config.ApacheConfig"
forwardAll="false"
noRoot="false"
jkDebug="info"
jkWorker="localtomcat"
configHome="D:/Apache2/"
jkLog="D:/Apache2/logs/mod_jk.log"
modJk="D:/Apache2/modules/mod_jk.dll"
jkConfig="D:/Apache2/conf/mod_jk.conf"
workersConfig="D:/Apache2/conf/workers.properties"/>

</Host>
</Engine>
</Service>
</Server>




workers.properties (stayed the same)
---------------------------------------------------------------
worker.list=localtomcat
worker.localtomcat.type=ajp13
worker.localtomcat.host=localhost
worker.localtomcat.port=8080
worker.localtomcat.cachesize=50
worker.localtomcat.cache_timeout=600
worker.localtomcat.socket_keepalive=1
worker.localtomcat.reclycle_timeout=300




httpd.conf (copied from auto-generated mod_jk.conf file from Tomcat)
to generate from Tomcat use:
.\startup.bat -jkconfg
---------------------------------------------------------------
<IfModule !mod_jk.c>
LoadModule jk_module "D:/Apache2/modules/mod_jk.dll"
</IfModule>

JkWorkersFile "D:/Apache2/conf/workers.properties"
JkLogFile "D:/Apache2/logs/mod_jk.log"

JkLogLevel debug

<VirtualHost localhost>
ServerName localhost

# localhost:/corpapps

######
# Static files
######
Alias           /corpapps "D:/tomcat5/webapps/corpapps"

<Directory "D:/tomcat5/webapps/corpapps">
Options Indexes FollowSymLinks
DirectoryIndex index.jsp index.html index.htm
</Directory>


######
# Deny direct access to WEB-INF and META-INF
######
<Location "/corpapps/WEB-INF/*">
AllowOverride None
deny from all
</Location>

<Location "/corpapps/META-INF/*">
AllowOverride None
deny from all
</Location>

######
# Use Directory too. On Windows, Location doesn't work unless case
matches
######
<Directory "D:/tomcat5/webapps/corpapps/WEB-INF/">
AllowOverride None
deny from all
</Directory>

<Directory "D:/tomcat5/webapps/corpapps/META-INF/">
AllowOverride None
deny from all
</Directory>

JkMount /corpapps/UploadFeedServlet  localtomcat
JkMount /corpapps/SetupServlet  localtomcat
JkMount /corpapps/LoginServlet  localtomcat
JkMount /corpapps/*.jspx  localtomcat
JkMount /corpapps/PlacementPerformanceServlet  localtomcat
JkMount /corpapps/*.jsp  localtomcat
JkMount /corpapps/ReconcileServlet  localtomcat
</VirtualHost>





==============================================================================
TOPIC: struts validation - sort order of messages
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/50c5d01e913fbe46
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 9:23 am
From: "ctyberg"  

Is there a way to keep the sort order of the validation messages in the
same order as they were entered into the validation.xml?

It seems to be implemented by a HashMap so the validation messages are
coming out randomly...
Also, is there any Usenet Group specifically for Struts questions?





==============================================================================
TOPIC: count file pages
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e5a8a03f1b71d9c4
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 6:28 am
From: [EMAIL PROTECTED] 

Are you printing Postscript?





==============================================================================
TOPIC: AXIS to emit SoapHeader in WSDL
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/2c6572aa0541c7f8
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 15 2004 9:26 am
From: "bangeye"  

Tribe,

Using AXIS and C# winforms to build an app.

I'm building my services in java and exposing them through AXIS and
consuming them just fine with C#.

I want now to add some soapheader data for session mgmt and
authorization. I'm building my own WSDD for the service deployment in
AXIS and so I'm allowing AXIS to emit the WSDL which describes the
services.

I want to add something somewhere to direct axis now to emit a
SoapHeader in the WSDL which Visual Studio will then swallow and build
into my reference.cs class.
I've looked and looked. No luck.

Any ideas?

Dave Cline
~bangeye~




== 2 of 2 ==
Date: Wed, Dec 15 2004 12:37 pm
From: Steve Sobol  

bangeye wrote:
> Tribe,

Shut up already. I've now seen this exact post between ten and twelve times 
(all except one post was posted within a five minute period yesterday). Go away 
and bother someone else.

-- 
JustThe.net Internet & New Media Services, http://JustThe.net/
Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED]
PGP Key available from your friendly local key server (0xE3AE35ED)
Apple Valley, California     Nothing scares me anymore. I have three kids.




==============================================================================
TOPIC: Help for Windows CE
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/22d41cba0f8e9174
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 6:37 am
From: [EMAIL PROTECTED] (Fabrizio) 

Hi 
I'm a student and I need to develope an application in java for
Windows CE.
Now I've installed on my pc Eclipse and a sun virtual machine for
windows XP.
My question is: What I can do in order to use my eclipse for develope
an application for my pocket pc with windows CE?
How I can do for make graphical applicationin windows CE? Under
Windows I use the VE plugin but under winCE what I can do for this
problem?

thank very much for all people who help me!
Fabrizio Dominici




==============================================================================
TOPIC: How to underline a string in Java?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/61b7646810bb7470
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 10:33 am
From: "Yamin"  

I am curious to know where you want to underline the string?  That is
what is the output or display you want to see the underline?  A String
on its own does not have any attributes like underline or bold or
anything.  All it holds are the characters.

Is the output just a label?  Then the method used by Thomas is the
easiest.  I've always liked this method.  It makes things really easy
to customize the display.

Is the output a file, then you have to find out what the file format
says about underlining if any.





==============================================================================
TOPIC: NoClassDefFoundError on UNIX, but not on PC
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/fcd4321ef5ca8215
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 8:28 am
From: "clay"  

Morning,

Created a program with Eclipse which pulls in data, formats it, and
sends to a web service.  Having no trouble getting everything to run on
the PC side.

Trouble comes up when moving to UNIX. Seems that any way I run the
program I get the error: Exception in thread "main"
java.NoClassDefFoundError: com/supplychain/DemandForecast, whether I
execute from inside the directory with no classpath, using the
classpath, or using the script below.

The script file I am using to run the program sets up the file path and
the classpath as follows:

#!/bin/ksh
export PROG_HOME=/opt/c20/batch/lib
java -cp
.:$PROG_HOME/c20.jar:$PROG_HOME:$PROG_HOME/rt.jar:$PROG_HOME/classes12.zip:$PROG_HOME/log4j-1.2.9.jar:$PROG_HOME/soap.jar:$PROG_HOME/mail.jar:$PROG_HOME/activation.jar:$PROG_HOME/wsif.jar:$PROG_HOME/wsif-j2c.jar:$PROG_HOME/wsdl4j.jar:$PROG_HOME/qname.jar:$PROG_HOME/xerces.jar:$PROG_HOME/commons-logging-api.jar:$PROG_HOME/xalan.jar:$PROG_HOME/j2ee.jar:$PROG_HOME/wsatlib.jar:$PROG_HOME
com.supplychain.DemandForecast $1

I have checked the jar file and the Manifest contains the correct
location of main and I have included all of the libraries that were
included by eclipse.
Any help you can provide would be most appreciated. 

Thanks.





==============================================================================
TOPIC: dynamically change struts' form's action
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bc28d63a3a8fb854
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 9:32 am
From: "ctyberg"  

I need to have two actions because the validations are different for
each one.

Here's what I did -

<c:if test="${param.isNew == 'true'}">
<c:set var="formAction" value="/saveNew.do"/>
</c:if>
<c:if test="${param.isNew == 'false'}">
<c:set var="formAction" value="/saveExisting.do"/>
</c:if>

 <html-el:form action="${formAction}" >





==============================================================================
TOPIC: JSTL and Atom feed parsing
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/921a303637ad225f
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 10:19 am
From: "Marc Dugger"  

Can anyone recommend an online tutorial, article, etc. where I can
find more info on parsing Atom 0.3 feeds using JSTL?  RSS 2.0 is no
problem, but I'm getting nothing from Atom.  Thanks in advance.





==============================================================================
TOPIC: deploying to Sun ONE app server?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/e52bec1bdbb29431
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 12:46 pm
From: [EMAIL PROTECTED] 

has anyone used Ant to deploy to Sun ONE app server?  i was trying to
find a target to compile EJB files, but was unsure if "iplanet-ejb"
would work.  if not, maybe something else?





==============================================================================
TOPIC: Telnet client
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/34b0931dc564995f
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 9:12 pm
From: "Jani Jalkala"  

I'm trying to build a telnet client with Java. I have found full
applications with open source from the web, but I'd like to code my own
thing from scratch so that I can learn from the process instead of copying
code without fully understanding what it does. This link provided some good
information for me:

http://utenti.lycos.it/yanorel6/2/ch31.htm

It works, but the application performs quite slow (makes DSL feel like 2400
modem). So if anyone could point me to the bottleneck, that would be much
appeciated. I'm guessing that it is something in the implementation of
NVTInputStream class, but I don't want to spend too much time investigating
what it could be.

Thanks,
Jani






==============================================================================
TOPIC: Simple question about GUI
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b45ee198b1c9b650
==============================================================================

== 1 of 1 ==
Date: Thurs, Dec 16 2004 10:17 am
From: "HS1"  

Hello

I have window application. In this application I have a button (inside a
JPanel of a JFrame). When I click on this button, a JDialog will be shown. I
want to have this JDialog appearing in the centre of this application. Could
you please tell me how to do that

I look in the manual but did not find you
Thank you
SH1






==============================================================================
TOPIC: Design Question: Access Permissions and Client Synchronisation via a DB
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/395d058db0cde3bd
==============================================================================

== 1 of 2 ==
Date: Wed, Dec 15 2004 10:19 pm
From: Stephen Riehm  

Hi,

I'm designing a small stand-alone planning tool whose sole purpose is to 
provide an intuitive way to manipulate data in two tables of a Database 
(Oracle 9iR2). One table is a list of items to be planned (id, name, 
duration etc), and the other table contains the planned use of those 
items. There will never be more than 3 or 4 users and they normally 
don't work concurrently (they also sit more or less in the same office). 
Of those users, only 2 of them are allowed to edit the item definitions, 
but all users need write access to the plan table. Planning is always 
done on a 24 hour basis, so when one planner starts planing a day, the 
others should only be allowed to plan other-days.

I was planing on writing this as a client-only program which would use 
JDBC to connect to the database directly. A check-out table (recording 
who has been using which data since when) and an oracle sequence is 
sufficient for simple collision detection. A full-blown client-server 
architecture for this setup seems like hitting flies with a sledgehammer 
(since most of the work is done right behind the gui, the complexity and 
level of distribution. It wont grow more complex either, since the 
workload is directly related to the number of hours in a day, and 
nothing else).

The use case would be something like: The user choses a day that they 
wish to plan, at which point the relevant data for that day would be 
"checked out" from the database into memory, manipulated off-line and 
then sent back to the database when the user is finished.

Obviously, a user should not be able to check-out data if the data is 
already checked out, or if they don't have the priveleges to change that 
particular set of data.

Which brings my to my question:

are the java.security.Permissions and GuardedObject suitable for this? 
The java.security package seems to be more interested in protection 
against nasties than simple, friendly access control. Also, 
GuardedObject only checks the permissions when you try to "run" the 
object. I want to be able to show the user what they can and can't do 
BEFORE they try (a bit like greyed out menus etc). I was thinking of 
getting the user's name from the OS, loading the permissions as a 
collection of objects from the database and then checking those 
permissions while putting the GUI together (setting up overview lists, 
edit buttons etc).

Does anyone have any tips? Am I barking up the wrong tree? Although I'm 
an experienced programmer, I haven't been writing java for very long and 
I'm still coming to grips with the API. (It's a "can't see the forest 
for the trees" problem :-)

Thanks in advance for your guidance!

Steve



== 2 of 2 ==
Date: Wed, Dec 15 2004 10:25 pm
From: Stephen Riehm  

[yuk! Thunderbird didn't word-wrap - sorry]

Hi,

I'm designing a small stand-alone planning tool whose sole purpose is
to provide an intuitive way to manipulate data in two tables of a
Database (Oracle 9iR2). One table is a list of items to be planned
(id, name, duration etc), and the other table contains the planned use
of those items. There will never be more than 3 or 4 users and they
normally don't work concurrently (they also sit more or less in the
same office). Of those users, only 2 of them are allowed to edit the
item definitions, but all users need write access to the plan table.
Planning is always done on a 24 hour basis, so when one planner starts
planing a day, the others should only be allowed to plan other-days.

I was planing on writing this as a client-only program which would use
JDBC to connect to the database directly. A check-out table (recording
who has been using which data since when) and an oracle sequence is
sufficient for simple collision detection. A full-blown client-server
architecture for this setup seems like hitting flies with a
sledgehammer (since most of the work is done right behind the gui, the
complexity and level of distribution. It wont grow more complex
either, since the workload is directly related to the number of hours
in a day, and nothing else).

The use case would be something like: The user choses a day that they
wish to plan, at which point the relevant data for that day would be
"checked out" from the database into memory, manipulated off-line and
then sent back to the database when the user is finished.

Obviously, a user should not be able to check-out data if the data is
already checked out, or if they don't have the priveleges to change
that particular set of data.

Which brings my to my question:

are the java.security.Permissions and GuardedObject suitable for this?
The java.security package seems to be more interested in protection
against nasties than simple, friendly access control. Also,
GuardedObject only checks the permissions when you try to "run" the
object. I want to be able to show the user what they can and can't do
BEFORE they try (a bit like greyed out menus etc). I was thinking of
getting the user's name from the OS, loading the permissions as a
collection of objects from the database and then checking those
permissions while putting the GUI together (setting up overview lists,
edit buttons etc).

Does anyone have any tips? Am I barking up the wrong tree? Although
I'm an experienced programmer, I haven't been writing java for very
long and I'm still coming to grips with the API. (It's a "can't see
the forest for the trees" problem :-)

Thanks in advance for your guidance!

Steve




==============================================================================
TOPIC: Help: What is a .do web page extension?
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/399bdb61556ff2ca
==============================================================================

== 1 of 3 ==
Date: Wed, Dec 15 2004 1:36 pm
From: [EMAIL PROTECTED] 

Since I am new to Java web development, I was stummped when one of my
clients asked me if I could do some web page maintenance to a ".do" web
page file.  He tells me that this page was written in Java.

Can someone explain to me what a ".do" file is and where I can find
information on it's structure and syntax?

Thanks in advance,
deeman




== 2 of 3 ==
Date: Wed, Dec 15 2004 2:05 pm
From: Joona I Palaste  

[EMAIL PROTECTED] scribbled the following:
> Since I am new to Java web development, I was stummped when one of my
> clients asked me if I could do some web page maintenance to a ".do" web
> page file.  He tells me that this page was written in Java.

> Can someone explain to me what a ".do" file is and where I can find
> information on it's structure and syntax?

It can be anything it wants. Really. Filename extensions do not mandate
the format of the file, or how it is used. At least not generally. ".do"
is none of the extensions I've heard Java ever define for anything, so
it must be defined by some other thing. This thing, then, can be your
client, one of their clients, a third party, the FBI, aliens, whatever.

-- 
/-- Joona Palaste ([EMAIL PROTECTED]) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"C++. C++ run. Run, ++, run."
   - JIPsoft



== 3 of 3 ==
Date: Wed, Dec 15 2004 2:17 pm
From: Chavi Tyberg  

Is it a struts application?  In their web.xml they probably mapped the 
servlet's actions to .do or something like that...

Joona I Palaste wrote:
> [EMAIL PROTECTED] scribbled the following:
> 
>>Since I am new to Java web development, I was stummped when one of my
>>clients asked me if I could do some web page maintenance to a ".do" web
>>page file.  He tells me that this page was written in Java.
> 
> 
>>Can someone explain to me what a ".do" file is and where I can find
>>information on it's structure and syntax?
> 
> 
> It can be anything it wants. Really. Filename extensions do not mandate
> the format of the file, or how it is used. At least not generally. ".do"
> is none of the extensions I've heard Java ever define for anything, so
> it must be defined by some other thing. This thing, then, can be your
> client, one of their clients, a third party, the FBI, aliens, whatever.
> 





==============================================================================
TOPIC: Tomcat JNDI LDAP config object map
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7ae4566aeb5ae6f9
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 1:47 pm
From: [EMAIL PROTECTED] (Clayton) 

For some reason, I'm brain dead when it comes to this one. Does anyone
have any idea (code examples or whatever!!) how I can map a JNDI
object in JSP to the previously authenticated user (via JNDI/LDAP) so
I can retireive settings, etc. and disply them on a JSP page?

I have a <Realm> in Tomcat (<Realm
className="org.apache.catalina.realm.JNDIRealm" debug="99"
connectionURL="ldap://brandonrha.mb.ca:389/DC=brandonrha,DC=mb,DC=ca";
userSearch="(sAMAccountName={0})" userPattern="BRHA\{0}"
userSubtree="true"/>) and as SOON as I log into the secure web area I
want to be able to grab that authenticated object (the user) and put
it into a JNDIRealm object, and display all their info onto the web
page...

How can I get access to this specific object? I know how to create a
new one, but does that new one map to the current authenticated user
from tocat? How can I get access to that authenticated user?

Any help or suggestions would be very much appreciated!

thanks

-Clayton




==============================================================================
TOPIC: J2ee example in Jboss
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d283362ec4397f86
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 2:02 pm
From: Flex  

Il Wed, 15 Dec 2004 13:24:19 -0500, Sudsy ha scritto:

>> Good , Now the error changes , now when I digit java 
>> SimpleQueueReceiver myQueue the error is :
>> 
>> Queue name is myQueue
>> JNDI API lookup failed: javax.naming.NoInitialContextException: 
>> Need to specify class name in environment or system property, or as an
>> applet parameter, or in an application resource file: 
>> java.naming.factory.initial
>> 
>> It's strange because , like I wrote
> 
> So now you have to look at the source for SimpleQueueReceiver and
> find out where it obtains the initial naming context. Dig through
> the archives at <http://groups.google.com> for some examples. Use
> "+initialcontext +jboss" as your search string.

I try to find a solution there , but I find only questions not reply, I
read Jboss documentation , and ,perhaps , I had to add something into
jndi.properties, but I don't' know other.
I'm very confusing, if I read again I became more confuse, I need to sleep,
I hope to solve this problem tomorrow :-)

-- 
Ciao Flex
[X contattarmi togli NONSPAMM RE dall'indirizzo Per SPAM scrivete a: /dev/null]
________________________________________________
Chi sa ascoltare non solo รจ simpatico a tutti ,
ma prima o poi finisce con l'imparare qualcosa





==============================================================================
TOPIC: minor JAXP annoyance
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/d383ed8017967c05
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 2:12 pm
From: [EMAIL PROTECTED] 

I've got an XSLT stylesheet which I've written and maintained for over
2 years now. I've always simply processed it with java
org.apache.xalan.xslt.Process, but now I'm trying to speed things up,
by compiling the stylesheet once, and processing hundreds of XML docs
with it. The output is HTML.

This is Java 1.4.1 on a Sparc9.

The relevant code:
in main():
TransformerFactory tFactory = TransformerFactory.newInstance();
translet = tFactory.newTemplates(new StreamSource(xslInURI));

and then, in a method:

Transformer transformer = translet.newTransformer();
transformer.setParameter("baseurl", baseurlParam);
transformer.setParameter("directory", dirParam);
transformer.setParameter("imageurl", imageParam);
transformer.transform(new StreamSource(xmlInURI),
new StreamResult(new
FileOutputStream(htmlOutURI)));

The problem is, unlike when using Process, the following bit of XSLT
inserts a newline between the </img> and the </a>, which causes the
HTML to display an undesirable underscore after cite.gif (which is a
small paragraph symbol the user is expected to click to invoke the
javascript).

In the source for this stylesheet, all the text within the <xsl:if> is
on a single line of nearly 700 characters.


<xsl:if test="@seqNum">
<a><xsl:attribute
name="href">javascript:showCitation(&apos;<xsl:value-of
select="$citableAuthors"/>&apos;,&apos;<xsl:value-of
select="$citableTitle"/>&apos;,&apos;<xsl:value-of
select="$journalName"/>&apos;,&apos;<xsl:value-of
select="$volume"/>&apos;,&apos;<xsl:value-of
select="$pages"/>&apos;,&apos;<xsl:value-of
select="$citableSectionTitle"/>&apos;,&apos;<xsl:value-of
select="@seqNum"/>&apos;)</xsl:attribute><img border="0"><xsl:attribute
name="src">/images/cite.gif</xsl:attribute><xsl:attribute
name="alt"><xsl:value-of select="$citableAuthors"/> S-<xsl:value-of
select="ancestor::*/@sectNum"/> #<xsl:value-of
select="@seqNum"/></xsl:attribute></img></a>
</xsl:if>

- Paul M Lieberman
American Psychological Association





==============================================================================
TOPIC: JSP EL and explicit error messages
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65e5ee92bf562a84
==============================================================================

== 1 of 1 ==
Date: Wed, Dec 15 2004 2:54 pm
From: "massdriver"  

Hi,

I sometimes mistype object and property names in JSP EL expressions,
and find that no error is generated. It just doesn't evaluate the
expression.

For example, for an object named foo with a property of name, this
would throw an error:

<%= foo.getNAme() %>

where this won't:

${foo.nAme}

Is there any way to make it produce explicit errors in a case like this?




==============================================================================

You received this message because you are subscribed to the Google
Groups "comp.lang.java.programmer" group.

To post to this group, send email to [EMAIL PROTECTED] or
visit http://groups-beta.google.com/group/comp.lang.java.programmer

To unsubscribe from this group, send email to
[EMAIL PROTECTED]

To change the way you get mail from this group, visit:
http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe

To report abuse, send email explaining the problem to [EMAIL PROTECTED]

==============================================================================
Google Groups: http://groups-beta.google.com 

Reply via email to