Help in struts application

Hi guys,
I'm using struts application,from that i will call
one external java file.(i.e) At the time of server(tomcat) will start ,the java class file is also started.
can u give any idea regarding my condition.I wrote some triggering logic in that Java file.
so, i need once the application will start, the corresponding java file will also called.

"SimpleServlet.java"
package com;
import org.quartz.CronExpression;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.quartz.CronTrigger;
import org.quartz.SchedulerException;
import org.quartz.SchedulerFactory;
import org.quartz.impl.StdSchedulerFactory;
import javax.servlet.*;
import java.io.*;
import javax.servlet.http.HttpServlet;
import org.quartz.ee.servlet.QuartzInitializerServlet;
public class Simple extends HttpServlet {
//Override
public void init(ServletConfig config) throws ServletException {
System.out.println("Initializing Scheduler PlugIn for Jobs!");
super.init(config);
// Retrieve a scheduler from schedule factory
try {
     Scheduler scheduler;
     SchedulerFactory schedulerFactory = new
StdSchedulerFactory();
     scheduler = schedulerFactory.getScheduler();
ServletContext ctx = config.getServletContext();
//Scheduler scheduler = null;
StdSchedulerFactory factory = (StdSchedulerFactory)
ctx.getAttribute(QuartzInitializerServlet.QUARTZ_FACTORY_KEY);
scheduler = factory.getScheduler();
//JobDetail jd = new JobDetail("job1",
"group1",SimpleQuartzJob.class);
JobDetail jd = new JobDetail("job1", "group1",Hello.class);
CronTrigger cronTrigger = new CronTrigger("trigger1","group1");
CronExpression cexp = new CronExpression("0/5 * * * * ?");
//String cronExpr = null;
//cronExpr = getInitParameter("cronExpr");
//System.out.println(cronExpr);
cronTrigger.setCronExpression(cexp);
scheduler.scheduleJob(jd, cronTrigger);
scheduler.start();
System.out.println("Job scheduled now ..");
} catch (Exception e){
e.printStackTrace();
//Override
public void service(ServletRequest request, ServletResponse
response)throws ServletException, IOException {
PrintWriter pw=response.getWriter();
pw.print("<html> <body> <h1>");
pw.print("Please wait,DataBase Operations is
performing.............");
pw.print("</h1></body></html>");
//Override
public String getServletInfo() {
     System.out.println("servlet started..");
return null;
"web.xml"
<?xml version="1.0" encoding="UTF-8"?>
<web-app>
     <display-name>
     Quartz</display-name>
<servlet>
<servlet-name>QuartzInitializer</servlet-name>
<display-name>Quartz Initializer Servlet</display-name>
<servlet-class>org.quartz.ee.servlet.QuartzInitializerServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<init-param>
<param-name>config-file</param-name>
<param-value>quartz.properties</param-value>
</init-param>
<init-param>
<param-name>shutdown-on-unload</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>start-scheduler-on-load</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>Simple</servlet-name>
<servlet-class>com.Simple</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Simple</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app>I tried from this site http://www.oreillynet.com/cs/user/view/cs_msg/86579
but it will not work for me.
It throws servlet exception.
Message was edited by:
SARAV_RS

Similar Messages

  • Struts Application: Binding TextArea to Checkbox. Please Help!!!

    Hi
    I am working on a Struts Application, where I have to do the following function
    There is a JSP Page which i have created. The JSP page has these elements. It is basically a page with which a user can specify what problem he/she has and can use the checkbox to check off the problem. The user also has a textarea, using which he/she can write their own version of the problem and submit the page. The page contains many textareas and checkboxes. I am using Struts and was reading about the Multibox usage in Struts. Can you please tell me how I can apply it in this area to bind a particular checkbox to a textarea.
    Here is some of the JSP Code
    <form name="re1ActionItems" method="post" action="req1ActionRegEntry.do">
      <table width="907" height="667" border="1">
        <tr>
          <th width="578" scope="col">Nature of the Problem </th>
          <th width="432" scope="col">Check</th>
        </tr>
        <tr>
          <td height="53">There is no Firewall Configuration Standard OR There is an improperly drafted Firewall Configuration Standard </td>
          <td><textarea name="fwConfig" cols="30" rows="4"><bean:message key="ate.fwConfig"/></textarea>
          <input name="noFwConfig" type="checkbox" value="yes"></td>
        </tr>
        <tr>
          <td>There is no DMZ which has been established for housing Public Facing Servers </td>
          <td><textarea name="noDmzTxt" cols="30" rows="4"><bean:message key="ate.noDmz"/></textarea>
          <input name="noDmz" type="checkbox" value="yes"></td>
        </tr>
        <tr>
          <td>Firewall rules contains Any-Any rules, or there are no IP and Port Specific Rules which have been configured on the Firewall(s)</td>
          <td><textarea name="anyAnyFwTxt" cols="30" rows="4"><bean:message key="ate.anyAnyFw"/></textarea>
          <input name="anyAnyFw" type="checkbox" value="yes"></td>Can you please help me out with this issue.
    P.S. I would not like to use Client Side Scripting to sort out this problem, please try and give me something which I can use Server side.

    I presume your form is being stored in session scope?
    It is for this purpose that struts has a "reset()" method.
    Have the reset method set the boolean to false every time.
    It will be set to true if the checkbox is checked, otherwise it will be left as false.

  • Java.lang.ClassCastException in simple struts application. please help me!

    I have a simple struts application, it only have a login form. however, it's alway throw java.lang.ClassCastException when I submit the form. Here is full stack trace:
    14-03-2007 17:04:50 org.apache.struts.chain.ComposableRequestProcessor init
    INFO: Initializing composable request processor for module prefix ''
    14-03-2007 17:04:50 org.apache.struts.chain.commands.servlet.CreateAction getAction
    INFO: Initialize action of type: ndlinh.struts.lab.RegistrationForm
    14-03-2007 17:04:50 org.apache.struts.chain.commands.AbstractExceptionHandler execute
    WARNING: Unhandled exception
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         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$Http11ConnectionHandler.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.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    14-03-2007 17:04:50 org.apache.struts.chain.commands.ExceptionCatcher postprocess
    WARNING: Exception from exceptionCommand 'servlet-exception'
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         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$Http11ConnectionHandler.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.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Here is my code:
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class RegistrationForm extends ActionForm {
         private String userid = null;
         private String password = null;
         private String password2 = null;
         public RegistrationForm() {
              System.out.println("************ Registration Form created *************");
          * @return the password
         public String getPassword() {
              return password;
          * @param password the password to set
         public void setPassword(String password) {
              this.password = password;       
          * @return the password2
         public String getPassword2() {
              return password2;
          * @param password2 the password2 to set
         public void setPassword2(String password2) {
              this.password2 = password2;
          * @return the userid
         public String getUserid() {
              return userid;
          * @param userid the userid to set
         public void setUserid(String userid) {
              this.userid = userid;
         public void reset(ActionMapping arg0, HttpServletRequest arg1) {
              userid = "";
              password = "";
              password2 = "";
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class RegistrationAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                             HttpServletRequest request, HttpServletResponse response)
              try {
                   System.out.println("*******************" + actionForm.toString() + "*******************");
                   RegistrationForm form = (RegistrationForm)actionForm;     
                   String username = form.getUserid();
                   String password = form.getPassword();
                   System.out.println(username);
                   // simple login checking.
                   // if userid equals password, user can login to system
                   if ( username.equalsIgnoreCase(password)) {
                        return mapping.findForward("success");
                   } else {
                        return mapping.findForward("failure");
              } catch (Exception e) {
                   e.printStackTrace();
                   return mapping.findForward("failure");
    }registration.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
         <html:form action="/register">
              Username: <html:text property="userid" /> <br />
              Password: <html:password property="password" /> <br />
              Re-type: <html:password property="password2" />
              <html:submit value="Register" />
         </html:form>
    </body>
    </html>struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationForm"
                   name="registrationForm"
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>System information:
    Tomcat 5.5.20
    Struts 1.3.5
    JDK1.5.08

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationAction" // action class
                   name="registrationForm" // form bean name
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>HTH

  • Need help implementing AJAX in an existing Struts Application

    Hi!
    I am trying to implement AJAX in my existing Struts Application. I need a good approach to go ahead and implement Ajax. I was thinking.. may be i will have to club all the code in the forms n actions (in the current Struts application) to one form and action, So I can easily include the dynamic content in the page.
    Please let me know if you have any ideas of how to implement AJAX in a fully developed Struts application.
    Thanks,
    Swapna.

    Hello Friends,
    Check out whether the link below could be of somehelp for you folks...
    http://www.it-eye.nl/weblog/2005/12/13/ajax-in-struts-implementing-dependend-select-boxes/
    http://today.java.net/pub/a/today/2005/10/27/sprinkle-ajax-magic-into-struts-webapp.html
    http://www.theserverside.com/news/thread.tss?thread_id=37355
    http://getahead.ltd.uk/dwr/examples/lists
    http://www.componentsource.com/products/backbase-ajax-struts/summary.html
    http://www.jibbering.com/2002/4/httprequest.html
    added to it there are few implementation frameworks which are addressing this issue you may further search on it and update abt the info which could be very much useful for all of the ppl out here.
    and there is a current thread running on the same topic it'd really appriciated if u can accomadate ur posts there.
    http://forum.java.sun.com/thread.jspa?threadID=784924&tstart=0
    REGARDS,
    RAHUL

  • Error while deploying struts application in tomcat

    Hi,
    I'm getting the following error when I start Tomcat using while auto-deploying a struts application.
    2005-09-21 15:28:17 - ContextManager: Adding DEFAULT:/cna
    2005-09-21 15:28:18 - Ctx(/cna) : Validating web.xml
    2005-09-21 15:28:18 - Ctx(/cna) : Class not found: org.apache.struts.action.Acti
    onServlet
    2005-09-21 15:28:18 - Ctx(/cna) : Class not found: org.apache.axis.transport.htt
    p.AdminServlet
    In case anyone is aware how to resolve this issue, please help.
    Thanks,
    Roseline

    Hi,
    1] Remove following from server.xml
    <Context path="/SEA" docBase="SEA" debug="0"/>
    2] Paste SEA.WAR (test WAR file) into /webapps of TOMCAT
    3] Start Tomcat Server - This will create SEA folder under webapps
    4] Stop server.
    5] Add following to server.xml
    <Context path="/SEA" docBase="SEA" debug="0"/>
    6] Start Tomcat Server
    7] Access the URL.
    This will work. Somehow Tomcat does not extract war file contents which are mentioned in server.xml.
    I have Apache Tomcat 4.0.3 and faced this problem. The above solution works for it.
    Regards,
    Sandesh
    hi.
    I have put my SEA.WAR (test WAR file) into /webapps of
    TOMCAT.
    I checked the server.xml and put:
         <Context path="/SEA" docBase="SEA" debug="0"/>
    I restarted TOMCAT and tried to execute the file:
         http://localhost:8080/SEA/index.jsp
    But I got error message:
    Apache Tomcat/4.0.3 - HTTP Status 404 -
    /SEA/index.jsp
    What was happenning?
    Anyone can help me?
    Thank you.

  • Console error while deploying a struts application..

    I am getting following exception while deploying a struts application:-
    javax.servlet.ServletException: org/apache/commons/logging/LogFactory
         at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:884)
         at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3197)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
         at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5647)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
         at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2022)
         at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2063)
         at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
         at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
         at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    please help me out.

    The ServletException is just a wrapper exception which informs about an underlying failure. When interpreting stacktraces,the bottommost root cause parts is the most important part. I assume that it's just a java.lang.ClassNotFoundException on org/apache/commons/logging/LogFactory. In that case, the exception is self-explaining enough. The mentioned class is missing in the classpath. The solution is also obvious: add the mentioned class (or at least, the JAR file with the mentioned class) to the classpath and you're fine. As the package name already hints, you can download it at [http://commons.apache.org/logging].
    For future java.lang.* exceptions please consult 'New to Java' forum. This is unrelated to Java Servlet.

  • Error in simple struts application

    Hi friends,
    Happy to meet again. Please help me out from this situation which kills me for the past 1 week. While i try to deploy my first struts application through eclipse 3.2 with jdk1.5 and tomcat 5.5.25 and struts 2.0.9 i'm getting this error. what is this regarding.
    FYI
    I'm just using two text boxes and trying to get those in next page....
    The error goes like this
    exception
    org.apache.jasper.JasperException: Failed to load or instantiate TagExtraInfo class: org.apache.struts.taglib.html.MessagesTei
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:281)
         org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:423)
         org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:249)
         org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
         org.apache.jasper.compiler.Parser.parse(Parser.java:127)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    root cause
    java.lang.ClassNotFoundException: org.apache.struts.taglib.html.MessagesTei
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1362)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1208)
         org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:420)
         org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:249)
         org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:163)
         org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:424)
         org.apache.jasper.compiler.Parser.parseDirective(Parser.java:493)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1557)
         org.apache.jasper.compiler.Parser.parse(Parser.java:127)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:212)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:101)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:156)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:296)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:277)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:265)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:564)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:302)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

    See http://forum.java.sun.com/thread.jspa?messageID=3866745&tstart=0

  • Frame issue in jsp/struts application

    I have a problem with jsp struts application .
    i have a jsp page which is inside a frame .
    The action class which receives the request from this page redirects the request to another jsp page.
    I want this new jsp page to be displayed without any frame , but it is getting displayed from inside the frame .
    can anybody help me out ...
    regards,               
    slam

    Possibly:
    1. Browser could be caching the page.
    2. If you use a proxy, the proxy may be caching the page.
    3. The page is not getting recompiled.

  • "Navigator" via JSF in a Struts Application (struts-faces)

    Hi!
    I got an existing Struts application which uses some includes to display a "Menu" on the left side with several links to navigate through the Webapp. Each of the Links points to a Struts-Action, that does some business logic and redirects any of a bundle of JSPs... Each of the JSPs is including this "navigation-jsp".
    Now i want to realize this Navigation with JSF and a TreeViewer (similar to the one in demo components) but the problem i face atm is, that when i click a link, and come back to any of the JSPs (after struts-action) how should this Tree-Navigator be rendered correctly???
    As said in topic, im using struts-faces.
    Any ideas?
    Greetings
    Patrick

    please guys - try to help me :-(

  • PDK-Struts Application requires pdkstruts.jar & pdk-struts-html.tld

    Hi All,
    Scenario is this, that I've created a pdk-struts application via JDeveloper with normal struts taglibs, and deployed it to Oracle Portal 10.1.4. default-action tags specified action.do is working fine and displays the welcome page within portlet region but after clicking any button within that welcome page opens a new browser page within same window and the URL pattern changes too.
    I want this to be executed within portlet region.
    Another problem is this, when I tried to use pdk-struts-html.tld within application;
    first warning within JDeveloper is this; Metadata Namespace for pdk-struts-html is not loaded, all entries are fine, and within Portal after successful deployment it gives an error (500 Server Listener Error) on viewing that portlet body.
    I want these issues to be resolved as soon as possible.
    Or if anybody knows about pdkstruts.jar and pdk-struts-html.tld with latest versions, plz do tell me the site-url to download these things.
    Plz help me out about these issues.
    Thanks in advance.

    Look in the Building Struts Portlets with Oracle Jdevelper section of the Oracle Application Server Portal Developers Guide. You need additional jar files besides the pdkstruts one. Also, look in the server logs to see more detailed messages about why it failed, it will help you debug.

  • Sample struts application

    Hello,
    I am new to struts, i installed struts in my tomcat web server 5.0, and allso i installed the struts examples in my tomcat server,
    i studied all the examples in the strutsexamples.war but it wont help me,i need to develope a small application using struts with the back end of mysql server5.0, i dont know how to retrive data from database and show it in page using struts,
    i know very well in jsp, but i dont know struts,
    plese any body give some useful reference links for developing struts application.
    thanking u in advance.
    plese help me.

    There are numerous resources around online, but I found this particular one very useful. It gives a good overview of several things in Struts and then you can build on.
    http://courses.coreservlets.com/Course-Materials/struts.html

  • Sorting Columns in a Struts application

    Hi,
    I am new to struts and I would request help on the following.
    I have a struts application that uses struts nested tags to display data from a database table on a JSP page in a tabular manner in multiple columns. I want to be able to sort (either asending or decending) the results by clicking on a column header . Could someone provide a code example as how this could be done?
    Thanks.

    provide the links on your jsp page like
    sort asc
    sort desc
    and in your action file
    sort the query accrding to result variable
    if("asc".equals(result)){
    query for ascending
    if("desc".equals(result)){
    query for desc
    }

  • Exception while running STRUTS application???

    HI,
    This is my 2nd post regarding my struts application, previous error was solved, but when i'm tryin to run my application with tomcat i'm getting error(plz help me tellin what changes i've to do in my application).It is actually the first page of the application which is a simple index.jsp, from where i've links to other main pages.The error i'm getting is:-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
    org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521)
    org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436)
    org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)
    org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
    org.apache.jsp.index_jsp._jspx_meth_html_link_0(index_jsp.java:96)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27

    Here i'm posting my index.jsp(where link tag is used), search.jsp, web.xml and struts.xml.frm index.jsp i just want to go to search.jasp frm where all the real thing will start.plz have look on all these files and let me no where i'm wrong.
    index.jsp :-
    <%@ page langiuage="java" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head>
    <title>Gaurav, Human Resource Portal</title>
    <head>
    <body>
    <font size="+1"><b>Gaurav Human Resource Portal</b></font><br>
    <hr wodth="100%" noshade="true">
    &#149; Add an Employee<br>
    &#149;<html:link forward="search">Search for Employees</html:link><br>
    </body>
    </html>
    search.jsp :-
    <%@ page language="java" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <html>
    <head>
    <title>Gaurav, Human Resource Portal</title>
    </head>
    <body>
    <font size="+1"><b>Gaurav, Human Resource Portal - search.jsp</b></font>
    <hr width="100%" noshade="true">
    <html:errors/>
    <html:form action="/search">
         <table>
              <tr>
                   <td align="right"><bean:message key="label.search.name"/>:</td>
                   <td><html:text property="name"/></td>
              </tr>
              <tr>
                   <td></td>
                   <td>--- or ---</td>
              </tr>
              <tr>
                   <td align="right"><bean:message key="label.search.ssNum"/>:</td>
                   <td><html:text property="ssNum"/> (xxx-xx-xxxx)</td>
              </tr>
              <tr>
                   <td></td>
                   <td><html:submit/></td>
              </tr>
         </table>
    </html:form>
    <logic:present name="searchForm" property="results">
         <hr width="100%" size="1" noshade="true">
         <bean:size id="size" name"searchForm" property="results"/>
              <logic:equal name="size" value="0">
                   <center><font color="red"><b>No Employees Found</b></font></center>
              </logic:equal>
              <logic:greaterThan name="size" value="0">
                   <table border="1">
                        <tr>
                             <th>Name</th>
                             <th>Social Security number</th>
                        </tr>
                        <logic:iterate id="result" name="searchForm" property="results">
                        <tr>
                             <td><bean:write name="result" property="name"/></td>
                             <td><bean:write name="result" property="ssNum"/></td>
                        </tr>
                        </logic:iterate>
                   </table>
              </logic:greaterThan>
    </logic:present>
    </body>
    </html>
    web.xml :-
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <display-name>Gaurav MiniHR Portal</display-name>
    <!-- Standard Action Servlet Configuration (with debugging) -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Standard Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!-- The Usual Welcome File List -->
    <welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/tags/struts-bean</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-html</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-logic</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-nested</taglib-uri>
    <taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/tags/struts-tiles</taglib-uri>
    <taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
    </taglib>
    </web-app>
    struts-config.xml :-
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
         <!-- ==========Form Beans configuration section.(i.e ActionForm objects)========== -->
         <form-beans>
              <form-bean name="searchForm" type="com.jamesholmes.minihr.SearchForm" />
    </form-beans>
    <global-forwards>
              <forward name="search" path="/search.jsp" />
    </global-forwards>
    <!-- =================================== Action Mapping Definitions -->
    <action-mappings>
              <action path="/search"
                        type="com.jamesholmes.minih.SearchAction"
                        name="searchForm"
                        scope="request"
                        validat="true"
                        input="/search.jsp"
              </action>
    </action-mappings>
    <!-- ================================ Message Resources Definitions -->
    <message-resources parameter="com.jamesholmes.minihr.ApplicationResources"/>
    </struts-config>

  • Deploying struts application

    Hi everybody,
    I am trying to deploy a struts application in sun java application server.
    But it is giving error as element taglib is incorrect in web.xml.
    I have defined <taglib > in <web-apps> in web.xml.
    Is it compulsary to make sun-web.xml for all web applications. I am new to using sun application server.
    Thanks in advance.

    Hi,
    Refer this link,
    http://help.sap.com/saphelp_nw04/helpdata/en/43/2eafd8d2f30d24e10000000a1553f7/plain.htm
    Regards,
    Sunaina Reddy T

  • ALBPM5.7: Using ALUI with struts application??

    I have a fully functional struts application that uses PAPI to interact with ALBPM5.7. Now I want to Expose all UI screens on the portal server. This need not be portlets, rather using ALUI framework/ EDK to wrap the UI JSPs and expose them in our portal
    Can I reuse my Struts Application with ALUI in some way.
    Thanks.
    Edited by [email protected] at 12/11/2007 9:49 PM

    Ravinder,
    Yes, of course you can bring your struts web application on ALUI portal as a portlet.In general, any web application running either on remote server or ALUI server can be brought up to the ALUI portal.
    If your Struts application is running on the remote server ,here is the steps to view this application on ALUI Portal :
    Login to your ALUI admin ( http://<hostname>:<portnumber >/portal/server.pt(like http://yh759.yashind.com:7001/portal/server.pt) with Administrator as userid(no password required by default)
    Create a Remote server in ALUI where you need to have the info of your Struts application server info
    Create a remote webservice for portlet
    Create a portlet out of that remote webservice
    Put this portlet on any page.
    Alo you can find the online help on ALUI admin conosle for doing all the above steps.
    Thanks
    Bishnu
    Regards
    Bishnu

Maybe you are looking for

  • IPod touch music dissapears from album view and other things

    I'm honestly suprised to the fact that my old iPod video works better on this factor than the iPod touch I upgraded to. My problem lies in the fact of syncing makes my iPod decide certain things stay on Album view and dissapear from it. To give an ex

  • Another java newbie question:  "Link errors"

    In the environments I've attempted compiling in, it seems that there is a just-in-time default, which means that any missing classes are not found until run time. Is there any way to to run javac so that what we used to call "link errors" will be dis

  • JAVA�@Program Problems�iMemory Copy�j

    ���L���R�[�h�����s������ The Result of Execute �� import java.util.HashMap; import java.util.Map; public class Test {      * @param args     public static void main(String[] args) throws Exception{         Map map = new HashMap();         Map in1 = n

  • Suddenly, I cannot print any webpages.

    Printing icon appears on toolbar but nothing happens, and page does not go to pending document queue [sp?]. I am able to print webpages using Internet Explorer; I can also print Word documents. Printing test also confirms my printer is working.

  • Curious about apple loops

    As I cruise around the apple forums and manuals, I'm curious to what makes a loop an "apple Loop" as compared to just a loop. As I read further I'm pretty sure that I noticed somewhere that all loops created can become "apple loops". Is this true? So