Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

MVC architecture

  Asked By: Reginheraht    Date: Jun 27    Category: Java    Views: 1556

I am doing one sample application using MVC architecture. I am using weblogic server6.1. I am having one Jsp page(in /webapp folder) in that page i am having one submit button which calls a servlet in the form tag. ( Action="/myservlet" ). I have servlet class in the following weblogic folder (/webapp/class/myserlvet). The above myservlet imports another class called shopping.CD. I have created a directory in the /classess/shopping/CD and put the CD class in the CD folder. when i called my servlet from the Jsp it couldnt find the servlet. I have also changed web.xml <servlet-name>myservlet </servlet-name> <servlet-class>myservlet</servlet-class>.

I hope there may be a problem in the url mapping or in the directory structure. Can any one help me...



7 Answers Found

Answer #1    Answered By: Julia Hughes     Answered On: Jun 27

try to give as

/<webapp name >/<servlet name>

Answer #2    Answered By: Scarlett Hughes     Answered On: Jun 27

Not sure about the weblogic  but if you are packing a
standard structure  for your application  , you should
have the classes in WEB-INF/classes in your mapping
base. ( you might see samples in tomcat ,jboss and
other container implementaions too). I am not sure if
weblogic takes the same architecture  though and maybe
Weblogic profis here will help  you more.

Still I wrote you back cause i thaught it may make
sense to leave you a tip on Naming convensions. when
you pack your referenced class  in the classes
directory to let your servlet  access it, you make the
directory structure upto last package name (in your
case not shopping/CD/CD.class rather

PS:You might rather considering standard Class and
package naming though (use all lowercase for package
names "like com.balamurugan.killerapp" and a
uppercase-started attached phrases for your class
names: KillerMain ". So as servlets are Class files
too, you might consider renaming the servlet to
"YourServlet" from "yourservlet"

Answer #3    Answered By: Marina Smith     Answered On: Jun 27

I want to develop a application  so.
after uploading a file in Internet,I may receive the file in LAN and pop-up a dialog box .

Answer #4    Answered By: Verner Fischer     Answered On: Jun 27

If I've got this correctly, you want someone to upload a file (through Internat) and you want to get notified on your terminal connected to the server of that service, correct?

If that's the case then, you might have various choices, but (as this is a J2EE forum) you can user JMS messaging and you can listen (subscribe) to certain events (file upload)?

client front-end could be an applet to send data (file) to the host that it has been loaded from or may be a simple JSP page, and then JMS implementation in background to notify relevant components. you might need another client application  on your terminal to get notified by JMS client on the event of upload complete.

how about this to start a discussion?

Answer #5    Answered By: Luz Hayes     Answered On: Jun 27

There are some concerns to develope an application.
your project scale is very important , if you wanna make an enterpise application  i generally suggest you to use J2EE Platform but for middle and small scale .Net platform has some benefits.
there are a few topics below to find  it out better :

a) learning curve of J2ee is more than .Net platfom.
b) j2ee line of codes is more than .Net
c) there are many reliabe j2ee frameworks (open source) like Struts , Hibernate , Spring , JBoss etc which can help  you make ur project well.
d)event-driven model of ASP.Net and its components help you make ur small scale project quickly.
f) Visual Studio IDE and MSDN ( good reference for development ) are valuable really .

it is better to find middleware documents for comparsion of J2ee vs .Net since 2002.

Answer #6    Answered By: Vidos Fischer     Answered On: Jun 27

how to call webservices in jsf with netbeanse6.5?
please help  me

Answer #7    Answered By: Hoor Khan     Answered On: Jun 27

how to use webservices in jsf?
i create webservices that include queries to database. i effort to use services
in jsf,but, i dont success.

Didn't find what you were looking for? Find more on MVC architecture Or get search suggestion and latest updates.