converting a href with variable target into html:link

2004-01-13 Thread Ricky Purnomo
I am converting a pure JSP page into Struts, and am having problem
converting links which calls a javascript and has dynamically specified
target. The particular line is below:

a href=javascript:if (confirm('Do you want to delete this event?'))
location = 'delete.jsp?e=%= EventId %' class=eventheaderlinkDelete/a

My current converted line reads:

a href=javascript:if (confirm('Do you want to delete this event?'))
location = '/EventDelete.do?e=bean:write name=EventForm
property=eventId/' class=eventheaderlink

but I cannot find an equivalent using html:link, problem being I cannot
add the closing single quote back (or more generally stated, I cannot have
constant+variable+constant in the link). My attempt:

html:link href=javascript:if (confirm('Do you want to delete this
event?')) location = '/EventDelete.do paramId=e paramName=EventForm
paramProperty=eventId styleClass=eventheaderlink

is missing the last ' and causes error.

So is there a way to do this in html:link?

And is there a need to convert all a to html:link in the first place?
Because I am also having problem converting

a href=mailto:%= htmlescape(contactemail) % class=eventemaillink%=
htmlescape(evcontactemail) %/a

into html:link, since there is no paramId that I can specify, and using
paramId always automatically add a ? to the created link.


Thanks in advance on any pointers,
Ricky Purnomo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Initializing application data source org.apache.struts.action.DATA_SOURCE

2003-12-26 Thread Ricky Purnomo
Hello,

I am new to Struts, and am trying to deploy to Tomcat an application that
uses mySQL as database. However I am encountering the following errors:

2003-12-24 14:28:33 StandardWrapper[/necdcstruts1:action]: Marking servlet
action as unavailable
2003-12-24 14:28:33 StandardContext[/necdcstruts1]: Servlet /necdcstruts1
threw load() exception
javax.servlet.UnavailableException: Initializing application data source
org.apache.struts.action.DATA_SOURCE
 at
org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.j
ava:1091)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:472)
 at javax.servlet.GenericServlet.init(GenericServlet.java:256)
 at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:93
5)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:823)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
3422)
 at
org.apache.catalina.core.StandardContext.start(StandardContext.java:3623)
 at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:8
21)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
 at
org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.j
ava:307)
 at org.apache.catalina.core.StandardHost.install(StandardHost.java:788)
 at
org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:559
)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:401)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:718)
 at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:358)
 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1196)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:754)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1188)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:363)
 at org.apache.catalina.core.StandardService.start(StandardService.java:497)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2190)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:180)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:203)

In addition to the standard jars I have put the following .jar's in
WEB-INF/lib :

commons-pool-1.1.jar
commons-dbcp-1.1.jar
mysql-connector-java-3.0.9-stable-bin.jar

but it doesn't seem to solve the problem. Please advise what else I can try
to identify and resolve the problem.

Thanks in advance,
Ricky Purnomo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]