Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / November 2005

Tip: Looking for answers? Try searching our database.

newbie JSP question

Thread view: 
Arash Nikkar - 03 Nov 2005 20:02 GMT
this may seem like a stupid question, but i cant figure it out...

i have a simple JSP, in which I want to call a static method in another
class, but tomcat says it can't find the other class. The class I want
to call is no within a package, it is in the same directory as the jsp
file.

here is my jsp code:

<%@ page import="java.util.Enumeration"%>
<%@ page import="java.io.File"%>

<html>
<body>
<form action="unzip.jsp" method=post>
    <SELECT    NAME="File"    SIZE=4>
        <%  File dir = new File("/myDir");

            for(File tempFile : dir.listFiles()) {    %>
        <OPTION><%=tempFile%></OPTION>
        <% } %>

    </SELECT>
    <INPUT TYPE=SUBMIT VALUE=Press>
</form>
<B>Form Content</B><BR>
<TABLE>
<%  Enumeration parameters = request.getParameterNames();
        String parameterName = (String)parameters.nextElement();
        String parameterValue = request.getParameter(parameterName);

        if(parameterValue.endsWith(".zip")) {
           Utils.unzipFile(new File(parameterValue));
        }
        %>
</body>
</html>

thanks!
Andrew Thompson - 04 Nov 2005 00:17 GMT
> this may seem like a stupid question,

It did not sound such a stupid question on c.l.j.programmer
at 4:40, but it does when reposted[1] to c.l.j.gui[2] at 5:02[3].

[1] Please refrain froom multi-posting.
<http://www.physci.org/codes/javafaq.jsp#xpost>

[2] A basic description of the charters of the major
Java groups can be found here.
<http://www.physci.org/codes/javafaq.jsp#groups>
This query is not on-topic for the GUI group.

[3] Don't be so impatient!  This is not a 'help-desk'.
Arash Nikkar - 04 Nov 2005 08:01 GMT
Actually, I posted it first on c.l.j.gui, and once I realized I had
accidentally posted in the wrong group, I removed the post from
c.l.j.gui, and posted it on c.l.j.programmer.

No need to lecture me on "code of conduct" for thse groups, it was a
simple mistake, and rest assured, I am not being impatient.

Sorry for the mix up.
Andrew Thompson - 04 Nov 2005 19:56 GMT
> Actually, I posted it first on c.l.j.gui, and once I realized I had
> accidentally posted in the wrong group, I removed the post from
> c.l.j.gui, and posted it on c.l.j.programmer.

That does not explain to me why the c.l.j.programmer
post predates the c.l.j.gui post by 22 minutes.  That
suggests the opposite.  (And be clear.  If the posts
had occured in the order you state, I would have presumed
much what you stated and ot nothered to comment)

Got a good time machine going there?

> No need to lecture me on "code of conduct" for thse groups,

Only time will tell..

>..it was a
> simple mistake, and rest assured, I am not being impatient.

Can I 'rest assured' you will post to the best
group -only- in future?

> Sorry for the mix up.

OK.

[ Hope you get the technical problem sorted, BTW ]


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.