Page 2 of 2 FirstFirst 12
Results 21 to 39 of 39
  1. #21
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    Can anyone suggest me what is going in wrong?? with error as:
    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: java.lang.NullPointerException
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:536)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:368)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:389)

    root cause

    java.lang.NullPointerException
    org.apache.jsp.test_jsp._jspInit(test_jsp.java:22)
    org.apache.jasper.runtime.HttpJspBase.init(HttpJsp Base.java:52)
    org.apache.jasper.servlet.JspServletWrapper.getSer vlet(JspServletWrapper.java:164)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:338)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:389)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
    Apache Tomcat/6.0.32

  2. #22
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    Your page name is hello.jsp. But as per the exception stack trace, the exception is most likely getting generated in test.jsp.


    root cause

    java.lang.NullPointerException
    org.apache.jsp.test_jsp._jspInit(test_jsp.java:22)
    Swastik

  3. #23
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    sorry, its test.jsp only... i m giving correct in that.

  4. #24
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    Your code does not seem to have any such thing, which is likely to generate a nullpointerexception. It seems to be some configuration problem. If you have tomcat just try to test this page, without using that framework, and see if it works.
    Swastik

  5. #25
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    ok i ll try it now n post result...

  6. #26
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    i got it resolved whole issues,

    solution::

    i deleted existing project.
    look and update through classpath etc.
    made new project freshly.


    Now i am getting only one error::
    <%@ taglib prefix="ww" uri="webwork" %>

    cannot resolve uri with taglib in jsp file


    and taglib not allowed here in:: web.xml
    <taglib>
    <taglib-uri>webwork</taglib-uri>
    <taglib-location>/WEB-INF/lib/webwork-2.2.7.jar
    </taglib-location>
    </taglib>

    Please help me if anyone knows.... it will be gr8 help... :-)

  7. #27
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    it probably goes under <jsp-config>
    Swastik

  8. #28
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    Hi ,

    Please tell me clearly what i should do in order to resolve the tags issues!!!
    Now i am getting only one error::
    <%@ taglib prefix="ww" uri="webwork" %>

    cannot resolve uri with taglib in jsp file


    and taglib not allowed here in:: web.xml
    <taglib>
    <taglib-uri>webwork</taglib-uri>
    <taglib-location>/WEB-INF/lib/webwork-2.2.7.jar
    </taglib-location>
    </taglib>


    Please help me if anyone knows.... it will be gr8 help... :-)
    Add to mburnwal's Reputation
    I am beginner, so kindly elaborate...
    thanks

  9. #29
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    RESOLVED Previous issues

    Only 2 problems are now is that "unexpected end of file" near HTML closing tag and "Cannot resolve helloWorld.action".
    I doubt is my file corrupt?? my jsp file is ::


    <%@ taglib prefix="ww" uri="/webwork" %>
    <html>
    <head>
    <title>Enter your name</title>
    </head>
    <body>
    <ww:if test="message != null">
    <%--<ww:fontColors="red">--%>
    <ww:property value="message"/>
    <%--</ww:fontColors>--%>
    </ww:if>
    Please enter your name:
    <form action="helloWorld.action">
    <input type="text" name="name" value="<ww:property value= 'name'>" >
    </form>

    </body>
    </html>[/B]

    Please Help me..
    Last edited by mburnwal; 03-24-2011 at 04:48 AM. Reason: modify

  10. #30
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    Just look through below errors.. Solved previous ones...
    Last edited by mburnwal; 03-25-2011 at 10:17 AM. Reason: PREVIOUS ERROR SOLVED.

  11. #31
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default ActionSupport class could not be found in java action file

    import com.symphony.xwork.ActionSupport;

    using execute() method and variable SUCCESS of ActionSupport class in code. HelloWorld.java

    in java file there is error like ActionSupport class file could not be found, Success variable cannot resolve etc. Means it is not able to find the clas file ActionSupport inside jar directory xwork.jar.

    But i kept it inside myproject/lib as well as inside web/WEB-INF/lib. I am using IntellijIDEA. Moreover i checked my classpath is set proper.

    Plz help me. I am struggling with this code since a week nearly.... :-(
    :eek::eek::eek::eek:

  12. #32
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default stack trace of my jsp file 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: An exception occurred processing JSP page /hello.jsp at line 16

    13: </head>
    14: <body>
    15: WebWork says:
    16: <h1><ww:property value="message"/></h1>
    17: </body>
    18: </html>
    19:


    Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handle JspException(JspServletWrapper.java:519)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:410)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:389)

    root cause

    javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class com.opensymphony.xwork.util.OgnlValueStack
    org.apache.jasper.runtime.PageContextImpl.doHandle PageException(PageContextImpl.java:865)
    org.apache.jasper.runtime.PageContextImpl.handlePa geException(PageContextImpl.java:794)
    org.apache.jsp.hello_jsp._jspService(hello_jsp.jav a:78)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:389)

    root cause

    java.lang.NoClassDefFoundError: Could not initialize class com.opensymphony.xwork.util.OgnlValueStack
    com.opensymphony.webwork.views.jsp.TagUtils.getSta ck(TagUtils.java:36)
    com.opensymphony.webwork.views.jsp.WebWorkTagSuppo rt.getStack(WebWorkTagSupport.java:46)
    com.opensymphony.webwork.views.jsp.PropertyTag.doS tartTag(PropertyTag.java:55)
    org.apache.jsp.hello_jsp._jspx_meth_ww_005fpropert y_005f0(hello_jsp.java:95)
    org.apache.jsp.hello_jsp._jspService(hello_jsp.jav a:67)
    org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.jasper.servlet.JspServletWrapper.servic e(JspServletWrapper.java:386)
    org.apache.jasper.servlet.JspServlet.serviceJspFil e(JspServlet.java:313)
    org.apache.jasper.servlet.JspServlet.service(JspSe rvlet.java:260)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
    org.apache.struts2.dispatcher.FilterDispatcher.doF ilter(FilterDispatcher.java:389)

    note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.
    Apache Tomcat/6.0.32


    I AM MAKING HELLOWORLD PROGRAM IN WEBWORK. I TOOK THE REFERNCE FROM WEBWORK IN ACTION E-BOOK.
    PLZ HELP!!

  13. #33
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    Hi, will u plz look through my last 2 posts abt stack trace n package could not foud. I ll b gr8 help!!! I solved all previous ones... Go thru just last two post .....

  14. #34
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default

    All exceptions resolved by adding missing classes from stacktrace to lib folder.

    Now i just could not connect/mapped action file to jsp file through configuration file xwork.xml, web.xml etc.


    My HelloWorld.java file is :

    package sample;

    import com.opensymphony.xwork.ActionSupport;

    public class HelloWorld extends ActionSupport {
    private String message;

    @Override
    public String execute() {
    message = "Hello, WebWorld!";
    return SUCCESS;
    }

    public String getMessage() {
    return message;
    }
    public void setMessage(String message)
    {
    this.message = message;
    }
    }

    hello.jsp file is

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%@ taglib prefix="ww" uri="/webwork" %>
    <html>
    <head>
    <title>Hello Page</title>
    </head>
    <body>
    WebWork says:
    <h1><ww:property value="message"/></h1>
    </body>
    </html>

    xwork.xml

    <!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
    "http://www.opensymphony.com/xwork/xwork-1.0.dtd">
    <xwork>
    <include file="webwork-default.xml"/>
    <package name="default" namespace="/" extends="webwork-default">
    <default-interceptor-ref name="completeStack"/>

    <action name="helloWorld" class="sample.HelloWorld">
    <result name="success" type="dispatcher">hello.jsp</result>

    </action>

    </package>
    </xwork>


    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    version="2.5">
    <servlet>
    <servlet-name>webwork</servlet-name>
    <servlet-class>
    com.opensymphony.webwork.dispatcher.ServletDispatc her
    </servlet-class>
    </servlet>

    <servlet-mapping>
    <servlet-name>webwork</servlet-name>
    <url-pattern>*.action</url-pattern>
    </servlet-mapping>
    <jsp-config>
    <taglib>
    <taglib-uri>webwork</taglib-uri>
    <taglib-location>/WEB-INF/lib/webwork-2.2.7.jar
    </taglib-location>
    </taglib>
    </jsp-config>

    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatch er</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <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>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    </web-app>

    webwork.properties
    webwork.tag.altSyntax = true



    I placed xwork.xml,webwork.properties and package sample inside WEB-INF/classes

    and jsp file inside WEB-INF..

    After compiling java file and running hello.jsp file, i gets only Webwork says. It does not fetch message and displays it on browser meaning mapping is not tking place ... please help me and tell me possible reasons for this problem....

  15. #35
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Do not put your jsps inside the WEB-INF folder. Basically it looks like you are not following the instructions given for that tutorial.

  16. #36
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Question where to place jsp then?

    plz help with good explanationss

  17. #37
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Smile

    Inside tutorials its saying save it inside

    Save this file in the root of your Web application


    but i am using IntellijIDEA for this... There is no Root folder... plz elaborate where to keep??
    My directory structure is::


    project1
    >>>lib
    >>>out
    >>>src
    ////////// inside this HelloWorld.java file is there.
    >>>web
    >>>>>WEB-INF
    >>>>>>>classes
    >>>>>>>>>Sample
    >>>>>>>>>>>>HelloWorld.class
    >>>>>>>>>xwork.xml
    >>>>>>>>>webwork.properties
    >>>>>>web.xml
    >>>>>>lib
    >>>>>>hello.jsp
    >>>>>>index.jsp
    >>>External libraries.
    Last edited by mburnwal; 03-28-2011 at 09:51 AM. Reason: formatting problem

  18. #38
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Don't use IntellijIDEA (yet).
    Follow all the steps given in that tutorial using only the tools that the tutorial tells you to use. Deploy their examples and make sure they work. Then play with their examples making small modifications at at time and see that everything works.

  19. #39
    mburnwal is offline Member
    Join Date
    Mar 2011
    Posts
    27
    Rep Power
    0

    Default Cant u help me with intellij IDEA.??

    I need to make it in that IDEA only.. I am new to this.. plz atleast give a try... i am trying since 1-2 weeks.. solved many exceptions, errors:eek: etc.. now last stage... plz help me......:cool::rolleyes:

Page 2 of 2 FirstFirst 12

Similar Threads

  1. I need help is very urgent
    By ramroum in forum Java Applets
    Replies: 15
    Last Post: 06-27-2010, 03:08 AM
  2. [URGENT]SHA Encryption System...need urgent helps
    By java_idiot in forum New To Java
    Replies: 6
    Last Post: 05-02-2010, 10:04 AM
  3. ERROR DEPLOYING WEB APPLET......help needed urgent
    By bonjovi4u in forum Java Applets
    Replies: 1
    Last Post: 03-16-2010, 03:16 PM
  4. Help Urgent
    By jammyjamsticy in forum Java 2D
    Replies: 2
    Last Post: 04-06-2009, 07:31 AM
  5. Help me ...urgent!
    By googgoo in forum New To Java
    Replies: 7
    Last Post: 04-05-2008, 08:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •