Struts errors

Well,now I just wanna give my struts project a logoff function.
but there is a error:"No action instrance for path /jsp/logoff could be created"
I don't know what is problem in my code.
1.The setting of this function in struts-config.xml is
" <global-forwards>
<forward name="index" path="/index.jsp"/>
<forward name="logoff" path="/jsp/logoff.do"/>
</global-forwards>"
and "<action path="/jsp/logoff" type="LogoffAction" validate="false"/>"
2.my jsp files all in the folder "jsp" absolutely
3.the code of my LogoffAction is
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionForm;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.ServletException;
import java.io.IOException;
* Created by IntelliJ IDEA.
* User: administrator
* Date: 2003-4-25
* Time: 16:19:05
* To change this template use Options | File Templates.
public class LogoffAction {
public ActionForward perform(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException {
// Extract attributes we will need
HttpSession session = request.getSession();
LoginForm user = (LoginForm)session.getAttribute("user");
// System.out.println("XXXXXXXXXXXXXXXXXX");
// Remove user login
session.removeAttribute("user");
// Return success
return (mapping.findForward ("index"));
So,who can tell me what is wrong?
thank a lot

anybody here???-__-||

Similar Messages

  • Replacing JBO error messages with Struts error messages

    I would like to display Struts error messages on an HTML form instead of the JBO error messages when a user submits a form with data entry error. Has anybody done that? Do I need to extend the DataForwardAction class and write JAVA code to do it or is there a more elegant way?

    Could someone please answer this? As I understand, Steve Meunch says: "our prescriptive architecture's best practice is to implement all validation in your entities" but this is talking more about rules, I think, than about error messages that are customized to specific pages and fields.
    Thanks,
    Jeff

  • Crystal Report/STRUTS: Error (404) when clicking on Control Buttons (Print, Export, Next, Previous, etc...) on report viewer

    Post Author: jwenny
    CA Forum: Deployment
    Need help badly!!!
    We are using the crystal reports plugin for STRUTS.
    We are able to display the report in the crystal report viewer.  However, when we click any control buttons (print, export, etc...), then we get:
    JSPG0036E:  Failed to find resource /Report-viewer.jsp
    We then moved Report-viewer.jsp to the WebContents folder (root directory) and got a different error when we clicked any control button:
    Error:  400 page not found
    Does anyone know how to solve this problem?  For instance, is there a setting or parameter that needs to be set?
    Greatly appreciate any help!

    HI,
    Whenever we print the viewer does an auto postback, I believe due to this some of the values are getting missed. Moreover we are referring to the viewer and reportdocument object, it seems. So can you try this simple code in an application to see if it helps:
    ReportDocument rdoc = new ReportDocument();
    rdoc.Load("C:\TASKECrystalReports\Intraday.rpt");
    rdoc.SetDatabaseLogon("uid","pwd");
    rdoc.SetParameterValues("parameter name","value");
    CrystalReportViewer.ReportSource = rdoc;
    Helps?
    Thanks.

  • Struts Error while loading a page

    Hi Friends,
    In our aplication when i try to load a page am getting the following error , please throw some light if you have come across any such exception:
    <Error> <HTTP> <101017> <[ServletContext(id=22376268,name=QS,context-path=/QS)] Root cause of ServletException
    javax.servlet.jsp.JspException: Cannot find bean null in any scope
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
    at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:274)
    It is very strange that the same .EAR file is workign fine in the dev and the UAT environment but in production it is throwin this error. Am sure its some environment problem, but still searching.If any of you have come across such erro please help.
    Thanks
    Vishy

    Hi,
    You have to see your jsp page.
    It is usually seen in association with a problematic Struts HTML SELECT custom tag. The Struts
    <html:select >
    tag behaves differently depending whether one or both of the name and property attributes is specified for its encompassed
    <html:options> tags.
    If the name attribute is specified, whether or not if the property attribute is specified, then a bean matching the specified name will be expected in some scope (such as page, request, session, or application). If the matching bean is not found in any available scope, the error above will be seen.
    There are two ways to address this. The first approach is to put a bean in one of the scopes so that the html:options might be associated with it. The second approach is to not specify the name attribute and instead use only the property attribute.
    It would be help out you.
    Thanks and Regards
    Maruthi.

  • Struts Error while loading a JSP

    Hi Friends,
    In our aplication when i try to load a page am getting the following error , please throw some light if you have come across any such exception:
    <Error> <HTTP> <101017> <[ServletContext(id=22376268,name=QS,context-path=/QS)] Root cause of ServletException
    javax.servlet.jsp.JspException: Cannot find bean null in any scope
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
    at org.apache.struts.taglib.bean.MessageTag.doStartTag(MessageTag.java:274)
    It is very strange that the same .EAR file is workign fine in the dev and the UAT environment but in production it is throwin this error. AM sure its some environment problem, but still searching.If any of you have come across such erro please help.
    Thanks
    Vishy

    Have you tried asking this on the JSP forum?
    http://forum.java.sun.com/forum.jspa?forumID=45

  • Jrun 4 Struts Error

    I have a web application running with tomcat with no problems
    on my local. But when I try to deploy this in Jrun I get the
    following error. I'm using struts 1.2.9. The Jrun server is running
    on a solaris box which has java 1.4. Any help would be greatly
    appreciated. Thanks.
    04/19 10:19:01 error Exception parsing the TLD null : The tag
    function on line 14 is not a valid TLD element
    [2]jrun.jsp.compiler.JRunTagLibraryInfo$InvalidTLDElementException:
    The tag function on line 14 is not a valid TLD element
    at
    jrun.jsp.compiler.JRunTagLibraryInfo$TLDParser.startElement(JRunTagLibraryInfo.java:617)
    at
    jrunx.util.SAXReflectionHandler.startElement(SAXReflectionHandler.java:24)
    at
    com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXPars er.java:443)
    at
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(X MLDocumentFragmentScannerImpl.java:845)
    at
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis patcher.dispatch(XMLDocumentFragmentScannerImpl.java:1563)
    at
    com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDo cumentFragmentScannerImpl.java:341)
    at
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.ja va:828)
    at
    com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.ja va:758)
    at
    com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
    at
    com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java :1178)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
    at
    jrun.jsp.compiler.JRunTagLibraryInfo.init(JRunTagLibraryInfo.java:190)
    at
    jrun.jsp.compiler.JRunTagLibraryInfo.<init>(JRunTagLibraryInfo.java:119)
    at
    jrun.jsp.JSPEngine.checkResourceForTaglibs(JSPEngine.java:483)
    at
    jrun.jsp.JSPEngine.findImplicitTaglibs(JSPEngine.java:451)
    at jrun.jsp.JSPEngine.<init>(JSPEngine.java:141)
    at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
    at
    jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
    at
    jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java:812)
    at
    jrun.servlet.JRunRequestDispatcher.<init>(JRunRequestDispatcher.java:83)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1075)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1053)
    at
    jrun.servlet.JRunServletContext.getRequestDispatcher(JRunServletContext.java:181)
    at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
    at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    at
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor. java:318)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [1]jrun.jsp.compiler.JRunTagLibraryInfo$TLDParseException:
    Exception parsing the TLD null : The tag function on line 14 is not
    a valid TLD element
    at
    jrun.jsp.compiler.JRunTagLibraryInfo.init(JRunTagLibraryInfo.java:198)
    at
    jrun.jsp.compiler.JRunTagLibraryInfo.<init>(JRunTagLibraryInfo.java:119)
    at
    jrun.jsp.JSPEngine.checkResourceForTaglibs(JSPEngine.java:483)
    at
    jrun.jsp.JSPEngine.findImplicitTaglibs(JSPEngine.java:451)
    at jrun.jsp.JSPEngine.<init>(JSPEngine.java:141)
    at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
    at
    jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
    at
    jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java:812)
    at
    jrun.servlet.JRunRequestDispatcher.<init>(JRunRequestDispatcher.java:83)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1075)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1053)
    at
    jrun.servlet.JRunServletContext.getRequestDispatcher(JRunServletContext.java:181)
    at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
    at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    at
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor. java:318)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
    [0]javax.servlet.ServletException: Exception parsing the TLD
    null : The tag function on line 14 is not a valid TLD element
    at
    jrun.jsp.JSPEngine.findImplicitTaglibs(JSPEngine.java:457)
    at jrun.jsp.JSPEngine.<init>(JSPEngine.java:141)
    at jrun.jsp.JSPServlet.init(JSPServlet.java:62)
    at
    jrun.servlet.WebApplicationService.loadServlet(WebApplicationService.java:1200)
    at
    jrun.servlet.JRunRequestDispatcher.init(JRunRequestDispatcher.java:812)
    at
    jrun.servlet.JRunRequestDispatcher.<init>(JRunRequestDispatcher.java:83)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1075)
    at
    jrun.servlet.WebApplicationService.getRequestDispatcher(WebApplicationService.java:1053)
    at
    jrun.servlet.JRunServletContext.getRequestDispatcher(JRunServletContext.java:181)
    at
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078)
    at
    org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
    at
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    at
    org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor. java:318)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    at
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:541)
    at
    jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:204)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    Hi,
    I am also facing the same problem.
    The tag function on line 14 is not a valid TLD element
    Do let me know if anybody has solution for this.
    Thanks
    JP

  • UiXML Struts error

    I am trying to follow the UIX Developer's Guide "Using uiXML with Struts" but am having problems. I have copied all of the code over to a new workspace/project in JDeveloper.
    I wasn't sure what WEB-INF directory I was supposed to put the uix-config.xml file in. I have put the file in the WEB-INF directory under the JDeveloper project structure.
    The uix pages would not parse correctly, not understanding the struts elements. I followed a solution given in another message post and put the oracle.cabo.servlet.struts.StrutsUIExtension value in the projects web.xml file. This fixed the parsing.
    The error now when I run the logon.uix page is:
    java.lang.NoClassDefFoundError: org/apache/struts/util/MessageResources
         oracle.cabo.ui.data.DataObject oracle.cabo.servlet.struts.ui.MessageDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.TableDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.CachingDataProvider.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.data.provider.DataProviderStack.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.LogicalNodeRenderingContext.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.RootRenderingContext.getDataObject(oracle.cabo.ui.RenderingContext, java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.LogicalNodeRenderingContext.getDataObject(java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.RootRenderingContext.getDataObject(java.lang.String, java.lang.String)
         oracle.cabo.ui.data.DataObject oracle.cabo.ui.laf.browser.MessageBoxRenderer._getMessageData(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
         int oracle.cabo.ui.laf.browser.MessageBoxRenderer._getAutoChildCount(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
         boolean oracle.cabo.ui.laf.browser.MessageBoxRenderer._isRendered(oracle.cabo.ui.RenderingContext, oracle.cabo.ui.UINode)
    etc.....etc.....
    I only encoutered this error after changing the datascope element in the uix page to struts:datascope as in the developers guide. If I change it back to just datascope, the page works.
    Can someone please help ?!
    Thanks
    Brent

    Hey Brent -
    Take a look at this thread:
    Struts
    The thread mentions a couple of possible workarounds. I haven't tested these out myself - but hopefully one of them should do the trick.
    Andy

  • Struts Error Page

    Hi,
    I am getting a 500 error on a data insertion operation since a unique key is violated.
    I am trying to redirect to an error page by adding
    <error-page>
         <error-code>500</error-code>
         <location>/WEB-INF/Error500.jsp</location>
    </error-page>
    in web.xml
    after the error, 500 error is not displayed but neither the page is redirected to errorpage.
    Also i would like to display some error message on error page, is it possible?
    Thanks

    Hi,
    You have to see your jsp page.
    It is usually seen in association with a problematic Struts HTML SELECT custom tag. The Struts
    <html:select >
    tag behaves differently depending whether one or both of the name and property attributes is specified for its encompassed
    <html:options> tags.
    If the name attribute is specified, whether or not if the property attribute is specified, then a bean matching the specified name will be expected in some scope (such as page, request, session, or application). If the matching bean is not found in any available scope, the error above will be seen.
    There are two ways to address this. The first approach is to put a bean in one of the scopes so that the html:options might be associated with it. The second approach is to not specify the name attribute and instead use only the property attribute.
    It would be help out you.
    Thanks and Regards
    Maruthi.

  • Accessing Struts Errors using EL

    Hi All,
    Does anyone know how to access the messages stored by Struts using Expression Language of JSP 2.0, rather than the Struts custom tags.
    Thanks,
    Damian Sutton

    What is wrong with the Struts tags? You are aware of the EL version of them?
    If you have a JSP2.0 container you can use EL expressions for the attributes, otherwise there is a specific struts-el taglib which takes EL expressions rather than standard runtime expressions.
    For stuff like displaying the error messages, I think using the Struts tag will be a lot easier.
    Having said that...
    The messages are stored in request attributes under the keys declared in org.apache.struts.Globals
    public static final String ERROR_KEY =
    "org.apache.struts.action.ERROR";
    public static final String MESSAGE_KEY =
    "org.apache.struts.action.ACTION_MESSAGE";
    So you could access this object in jstl as
    <c:set var="errors" value="${requestScope["org.apache.struts.action.ERROR"]}"/>
    Note you have to use the square brackets syntax as the name includes . in it.
    The problem then becomes interpreting those messages.
    At this point I can't see any easy way to progress. This attribute could be a String, a String[] or an object of type ActionMessages/ActionErrors
    The ActionMessages class isn't written in a way that you can access it using EL.
    It has a simple method "get" which gets the iterator.
    Maybe ${errors[""]} would get the iterator?
    Sure there are ways around these problems, but they all involve coding wrappers/your own custom tags. I think it is easier in the long run just to use the ones provided.
    Good luck,
    evnafets

  • Showing struts errors in alert

    Hi
    i am new to struts.
    I want to have a subscription form where If I didn't enter few fields I need a single POPUP window as common one that displays all the errors at Once when i click save button.
    right now i am using <html:errors/> this is displaying all the errors on the page.
    but i want all the errors on the alert.
    can anybosy help in this.
    thanks.

    <html:errors/> is a JSP element that executes on the server-side. The Alert Pop-Up window is on the client-side. I think you would need to use some JavaScript code in the JSP page that has your subscription form to validate the form data, BEFORE it is sent to the server.
    Search for client-side validation of Struts forms.
    Best,
    Sam
    http://www.softwareleadership.org

  • 9iAS 9.0.2.0.1 Struts Error

    Hi,
    I have developed an application in JDeveloper 9.0.3. It is struts based application. It is working perfectly fine in Jdev runtime enviornment. The problem comes when i deploy it to 9iAS 9.0.2.0.1 (on linux machine), my JSP does not recognize struts taglib tags. It gives parser error. But this error comes if my JSP page is within a folder, if it is at web context root it does not shows up the error, it is working fine. for example if i call my login.jsp as http://myserver/myapplication/login.jsp struts tags are executed, if i put my login.jsp in another folder say web and browse it as http://myserver/myapplication/web/login.jsp it starts giving parser error.
    Can somebody guide me about this ??
    Regards,
    Arvind

    Hi,
    The problem is in your library tags location.
    Look at the web.xml, look for the tags library ok.
    Then look at your jsp, in the header of your jsp you put something like this:
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
    If you put your jsp under a directory, you must change the above line to:
    <%@ taglib uri="../WEB-INF/struts-logic.tld" prefix="logic"%>
    Because it suppose that the jsp is under the root web context.
    Ciao.

  • Struts-error

    what does the follwing errors mean
    u No message text associated with key NULL_MESSAGE_KEY_PASSED in bundle com.ibm.ejs.resources.seriousMessages
    E NULL_MESSAGE_KEY_PASSED

    Isn't the problem that the String passed in the constructor of ActionError should be a key in the resource bundle? - You have it with HTML markup in the form of <li> tags which looks wrong to me.
    If you want to put markup around errors you define the errors.header and errors.footer resources and of course you can put the <li></li> in the value of your resourec string (as opposed to the key)

  • Struts warnings/errors in logs

    I took over someone elses project and there are a lot of struts error messages in the logs, what files/reasons is to root cause of these messages.
    (1) attribute module must be declared for element type forward - 15:34:09 [Digester (Line: 1439)] Parse Error at line 26 column 76: Attribute "module" must be declared for element type "forward". org.xml.sax.SAXParseException: Attribute "module" must be declared for element type "forward". This occurs so many times it is hard to many anything else of value out of the logs at the moment.
    (2) action-mappings - this occurs less often 15:34:10 [Digester (Line: 1439)] Parse Error at line 550 column 21: The content of element type "action-mappings" must match "(action)*". org.xml.sax.SAXParseException: The content of element type "action-mappings" must match "(action)*".

    these errors are the result of module="" attribtue being present even though the message states that it should be present. Even though the dtd states it is acceptable it obviously should not be used yet until struts bugs are removed for this item. I removed all module entries and the error messages disappeared.

  • Are there any struts generated error messages?

    When I make an error in my struts logic, the HTML page generation stops at that point and I see truncated HTML pages. However, I cannot find an error message anywhere. For example, I recently didn't define a setter/getter in an ActionForm for an html:hidden field I added to a JSP page, and so struts failed to complete generating the web page.
    Is there anyway to get error messages from the struts code on why it fails?
    I'm asking because right now I am having to back out changes until I find the offending piece of code which is a slow process, and so I'm looking for a more productive way to find my struts errors.

    When I make an error in my struts logic, the HTML page generation stops at
    that point and I see truncated HTML pages.This is because the page has already been committed, and Tomcat can't redirect to the standard error page.
    There will probably be an error message in the log / console. Check the [TOMCAT]/logs directory.
    On stopping it: There are two causes
    1 - your generated html overflows the buffer and it flushes (commits). Workaround solution - make the buffer bigger for debugging purposes: <%@ page buffer="32kb" %>
    2 - you are using tiles, and it flushes after each tile. No workaround I am aware of, but I don't really use tiles much.

  • Not going to error page( struts)

    Hi,
    I have some problem related to struts application in portal. I have converted my struts jsps as portlets and deployed to the server. application is working properly. but the problem it is not going to the struts error page when any un handled exception is thrown. My intention is to redirect to the error page when ever the application is not able to handle. It is giving 500 internal server error instead of going to error page. any help?
    thanks,
    reddi

    Hi sandeep,
    Thanks for your reply. I am configuring that in my web.xml
    <servlet>
              <servlet-name>error</servlet-name>
              <servlet-class>myapp.ErrorServlet</servlet-class>
         </servlet>
         <servlet-mapping>
              <servlet-name>error</servlet-name>
              <url-pattern>errorServlet</url-pattern>
         </servlet-mapping>
         <error-page>
              <exception-type>javax.servlet.jsp.JspException</exception-type>
              <location>/errorServlet</location>
         </error-page>
         <error-page>
              <error-code>500</error-code>
              <location>/errorServlet</location>
         </error-page>
         <error-page>
              <error-code>404</error-code>
              <location>/errorServlet</location>
         </error-page>
         <error-page>
              <error-code>405</error-code>
              <location>/errorServlet</location>
         </error-page>
    and my ErrorServlet is as follows.
         public void doPost(HttpServletRequest req, HttpServletResponse res)
                   throws IOException, ServletException
              Integer statusCode = (Integer) req
                        .getAttribute("javax.servlet.error.status_code");
              if (statusCode != null)
                   int sc = ((Integer) statusCode).intValue();
                   switch (sc)
                        case 500:
                             req.setAttribute("error.message",
                                       "Please contact the server administrator");
                             break;
                        case 404:
                             req.setAttribute("error.message", "Requested url not found");
                             break;
              RequestDispatcher rd = req.getRequestDispatcher("/ErrorPage.jsp");
              rd.forward(req,res);
    Is this ok?
    I have system error page entries in the struts-config.xml. But I am configuring the redirection to the ErrorPage(This is the last page if everything fails) in web.xml only
    Thanks,
    Reddi

Maybe you are looking for

  • Sound no longer works!

    Hey all. My powerbook has now stopped making any form of noise out of the speakers. If i play any music or dvd no noise will come out of the speakers, there is no startup chime. The volume control is not muted. I have so far done a PRAM and a PMU res

  • How to emai more than one person

    hi, can someone please post some code on how to send more than one person the same email, i tried what's below but get an error: //  Send message out as email via JavaMail //  Emails for group 1 String namesOne[] = {"[email protected], [email protected]

  • Audio Queue Help

    Hi! Using sample code as a base, I've been able to get .wav and .mp3 files playing on the iPhone I'm using a simple AudioQueueCallback that uses AudioFileReadPackets to read audio packets and add them to the AudioQueue buffer using AudioQueueEnqueueB

  • Detail Info Pop Up

    Hi I saw an article a week or two ago about a cool example of having a hover over icon which when clicked showed some detail info in another cell somewhere on the page. I read it and though "Hmm, thats nice" and forgot about it but now I have the nee

  • Presenter 10 Failing During Publish(New Issue)

    All of our daily users(6) are experiencing the same issue that started last week. They start the publish process and it hangs at a point where it says something about audio conversion and then it closes down and there is no file. Has anyone found a f