Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7661197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:33:58+00:00 2026-05-31T13:33:58+00:00

Alright, I am going for the total shotgun question here. I tried to create

  • 0

Alright, I am going for the total shotgun question here. I tried to create a basic JSP on a JBoss 6.0 server with Eclipse SR2. I have a JSP file, a Web.XML and the Build.XML all below. Now bare in mind that Eclipse stores the WAR in C:\JBoss\jboss-6.0.0.Final\server\default\deploy\quote.war

The problem is that the files are not appearing on the localhost. I’m trying to make sense of the problem.

So here’s quote.jsp:

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.Arrays" %>
<%@ page import="java.util.Random" %>

<%
//Word up.
String[] quotes = {
"Eat my shorts!", "Cowabunga dude!","Oh snap!","Psyche!",
"Talk to the hand!","Different strokes for different folks.",
"Dont go there.","Da Bomb!",
"All that, and a bag of potato chips!"};

ArrayList<String> list = new ArrayList<String>(Arrays.asList(quotes));
Random r = new Random(); /*This creates a new random number generator.*/
int x = r.nextInt(list.size()); /*nextInt finds the next integer of the randomized number, between 0 and the integer provided, in this case, nine possible phrases.*/
String saying = (String)list.get(x); //Not sure why they felt they had to cast this as a string...
pageContext.setAttribute("saying",saying); /*Apparently takes whatever string value to be used within the scope of the HTML?*/
%>

<html>
<head>
<title>Behold! And Despair!</title>
</head>
<body>
<br>
<c:set var="sessionCount" scope="session"
value="${sessionCount +1}" />
<c:set var="applicationCount" scope="application"
value="${applicationCount +1}" />
<h1>
<font color="#1230cb">Catchphrases You Wish Time Forgot</font>
</h1>
<h3>
<br>
<font color="#a6a6a6">
${saying}
<br>-your Childhood
</font>
</h3>
<br><br>
You've visited this application ${sessionCount}
times this session. Perhaps its time to get a life.
<br>
Also, this application has been visited ${applicationCount}
by you and others who also have no social outlet.
</body>
</html>

Here’s the web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/j2ee/web-app_2_5.xsd"
version="2.5">
<servlet>
<servlet-name>QuoteServlet</servlet-name>
<jsp-file>/quote.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>QuoteServlet</servlet-name>
<url-pattern>/quote</url-pattern>
</servlet-mapping>
</web-app>

And finally, the build.xml:

    <project name="quote" basedir="../" default="deploy">

    <!-- Project settings -->
    <property name="project.distname" value="quote"/>

    <!-- Local system paths -->
    <property file="${basedir}/ant/build.properties"/>
    <property name="webroot.dir" value="${basedir}\WebContent"/>
    <property name="webinf.dir" value="${webroot.dir}\WEB-INF"/>
    <property name="build.dir" value="build"/>

    <!-- classpath for JSF 1.1.01 -->
    <path id="compile.classpath">
        <pathelement path ="${webinf.dir}/lib/commons-beanutils.jar"/>
        <pathelement path ="${webinf.dir}/lib/commons-collections.jar"/>
        <pathelement path ="${webinf.dir}/lib/commons-digester.jar"/>
        <pathelement path ="${webinf.dir}/lib/commons-logging.jar"/>
        <pathelement path ="${webinf.dir}/lib/jsf-api.jar"/>
        <pathelement path ="${webinf.dir}/lib/jsf-impl.jar"/>
        <pathelement path ="${webinf.dir}/lib/jstl.jar"/>
        <pathelement path ="${webinf.dir}/lib/standard.jar"/>
        <pathelement path ="${webinf.dir}/classes"/>
        <pathelement path ="${classpath.external}"/>
        <pathelement path ="${classpath}"/>
    </path>

    <!-- define your folder for deployment -->
    <property name="deploy.dir" value="deploy"/>


    <!-- Check timestamp on files -->
    <target name="prepare">
        <tstamp/>
    </target>

    <!-- Copy any resource or configuration files -->
    <target name="resources">
        <copy todir="${webinf.dir}/classes" includeEmptyDirs="no">
            <fileset dir="JavaSource">
            <patternset>
                <include name="**/*.conf"/>
                <include name="**/*.properties"/>
                <include name="**/*.xml"/>
            </patternset>
            </fileset>
        </copy>
    </target>

    <!-- Normal build of application -->
    <target name="compile" depends="prepare,resources">
        <javac srcdir="JavaSource" destdir="${webinf.dir}/classes">
            <classpath refid="compile.classpath"/>
        </javac>
    </target>

    <!-- Remove classes directory for clean build -->
    <target name="clean"
      description="Prepare for clean build">
      <delete dir="${webinf.dir}/classes"/>
      <mkdir  dir="${webinf.dir}/classes"/>
    </target>

    <!-- Build entire project -->
    <target name="build" depends="prepare,compile"/>
    <target name="rebuild" depends="clean,prepare,compile"/>

    <!-- Create binary distribution -->
    <target name="war" depends="build">
      <mkdir dir="${build.dir}"/>
      <war
        basedir="${webroot.dir}"
        warfile="${build.dir}/${project.distname}.war"
        webxml="${webinf.dir}\web.xml">
        <exclude name="WEB-INF/${build.dir}/**"/>
        <exclude name="WEB-INF/src/**"/>
        <exclude name="WEB-INF/web.xml"/>
       </war>

    </target>

    <target name="deploy" depends="war">
       <delete file="${deploy.dir}/${project.distname}.war"/>
       <delete dir="${deploy.dir}/${project.distname}"/>
       <copy file="${build.dir}/${project.distname}.war" todir="${deploy.dir}"/>
    </target>

</project>

Sorry for being a clutter bug here. But advice would be appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:33:59+00:00Added an answer on May 31, 2026 at 1:33 pm

    Assuming you deployed your war file under

    C:\JBoss\jboss-6.0.0.Final\server\default\deploy\quote.war
    

    and started JBoss default profile

    C:\JBoss\jboss-6.0.0.Final\bin\run.bat
    

    and NOT see any errors in your log file

    C:\JBoss\jboss-6.0.0.Final\server\default\log\server.log
    

    You should be able to see your application deployed and you should be able to access it using http://localhost:8080/quote.jsp or http://localhost:8080/quote/quote.jsp

    Hope this helps.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright, Here's the gist of what I'm planning to do. I'm going to have
Alright I have two loops going, on in the body and on in the
Alright, here's a quick explanation of what I am doing: I have a website
Alright, I can't seem to figure out what is going on, so I have
Alright, I'm trying to create textviews dynamically with strings i have in an array.
Alright, I'm going to try to explain this as best as possible: I have
Alright, so here's my basic ASP.NET page setup: I've got a page with a
Question Alright, I'm confused by all the buzzwords and press release bingo going on.
Alright I'm going to create a fairly complex form to post via AJAX a
Alright, here's the site in question: http://abramobile.com If you scroll down the page past

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.